From 5e87922395abf6a978ede76376bfe422e37d954c Mon Sep 17 00:00:00 2001 From: kurry Date: Mon, 11 Jun 2018 11:57:50 +0800 Subject: [PATCH] change address icon --- js/ui-block.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/js/ui-block.js b/js/ui-block.js index 630adcb..da2b9d0 100644 --- a/js/ui-block.js +++ b/js/ui-block.js @@ -117,21 +117,21 @@ var uiBlock = function () { (attrDisabled ? " disabled" : ' data-i18n=placeholder/addr data-validate-order-matters="required lengthEq35"') + (attrId ? " id=" + attrId : "") + ">") - .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(""); + if (!$canvas.hasClass("placeholder")) + $canvas.replaceWith(""); + } } - } function logoMain(selector) { var i, len, apiList, langList,