Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add /accounts/:address/validate endpoint #726
feat: add /accounts/:address/validate endpoint #726
Changes from 19 commits
83376b6
166e5c3
54cf986
c9c7f39
2b18fc5
9ed2625
a09a58f
ec0682e
b308aed
0286a84
cfa65dd
a4307b1
e9c16e3
213dc10
2ef30d6
6020802
b2f8174
cedc3e1
d1991c8
9d3dab6
775ab83
8b0964c
c35d4bd
98d1efa
a313139
d9903b0
3de3b46
de9a232
f784667
a48642b
948de5f
3cb824e
4c9dc04
b585222
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should change this to
ss58Prefix
for clarity. SS58 is the name of the address formatThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And specify what happens when an address has no prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think any valid base58 will provide a "ss58Prefix" that we plug into
checkAddressChecksum
,so in this case do you think we should just say if the address is not valid a prefix may still be returned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or if we receive a non valid address we just return null for the ss58Prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should have a test for a hex value with no prefix and a ss58 value with no prefix to show it works and what the expected prefix is (
null
?)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is an ss58 address with no prefix just a base58 address?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea so to build on that too, every base58 address will always have a prefix as well