Skip to content

Commit

Permalink
change address icon
Browse files Browse the repository at this point in the history
  • Loading branch information
kurry authored and kurry committed Jun 11, 2018
1 parent fba4186 commit 5e87922
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions js/ui-block.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,21 @@ var uiBlock = function () {
(attrDisabled ? " disabled" : ' data-i18n=placeholder/addr data-validate-order-matters="required lengthEq35"') +
(attrId ? " id=" + attrId : "") +
"><canvas class=placeholder></canvas>")
.on("input", "input", onInput);
.on("input", "input", onInput)
}

function onInput(e) {
var val = e.target.value,
$canvas = $(this).closest(".icon-address").find("canvas");

if (val.length == 35)
if (val.length == 35)
$canvas.replaceWith(blockies.create({
seed: val.toLowerCase(),
seed: val, // 不采用eth转化为小写的方法了
}));
else if (!$canvas.hasClass("placeholder"))
$canvas.replaceWith("<canvas class=placeholder></canvas>");
if (!$canvas.hasClass("placeholder"))
$canvas.replaceWith("<canvas class=placeholder></canvas>");
}
}
}

function logoMain(selector) {
var i, len, apiList, langList,
Expand Down

0 comments on commit 5e87922

Please sign in to comment.