Skip to content
Snippets Groups Projects
Commit 22b86dcb authored by Adrien Béraud's avatar Adrien Béraud
Browse files

nameservice: handle address starting with "0" in formatAddress

Change-Id: I95b68fcd1d081e57e58af636b25f9924a9243885
parent 463f5c9d
Branches
Tags
No related merge requests found
...@@ -145,10 +145,9 @@ function formatAddress(s) { ...@@ -145,10 +145,9 @@ function formatAddress(s) {
s = s.substr(5); s = s.substr(5);
if (!s.startsWith("0x")) if (!s.startsWith("0x"))
s = "0x" + s; s = "0x" + s;
var n = new BigNumber(s); if (new BigNumber(s) == 0)
if (n == 0)
return undefined; return undefined;
return web3.toHex(n); return s;
} catch (err) {} } catch (err) {}
} }
return undefined; return undefined;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment