Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
jami-nameservice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
jami-nameservice
Commits
22b86dcb
Commit
22b86dcb
authored
8 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
nameservice: handle address starting with "0" in formatAddress
Change-Id: I95b68fcd1d081e57e58af636b25f9924a9243885
parent
463f5c9d
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
index.js
+2
-3
2 additions, 3 deletions
index.js
with
2 additions
and
3 deletions
index.js
+
2
−
3
View file @
22b86dcb
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment