Commit 22b86dcb authored by Adrien Béraud's avatar Adrien Béraud

nameservice: handle address starting with "0" in formatAddress

Change-Id: I95b68fcd1d081e57e58af636b25f9924a9243885
parent 463f5c9d
......@@ -145,10 +145,9 @@ function formatAddress(s) {
s = s.substr(5);
if (!s.startsWith("0x"))
s = "0x" + s;
var n = new BigNumber(s);
if (n == 0)
if (new BigNumber(s) == 0)
return undefined;
return web3.toHex(n);
return s;
} catch (err) {}
}
return undefined;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment