-
Notifications
You must be signed in to change notification settings - Fork 62
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
Allow rest base 32 addresses #804
Conversation
cc7f8e6
to
8a709a9
Compare
8a709a9
to
f90260c
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
* @return the Address object. | ||
*/ | ||
public static toAddress(value: string): Address { | ||
return Convert.isHexString(value, 48) ? Address.createFromEncoded(value) : Address.createFromRawAddress(value); |
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.
Example in transfer transaction, If the recipientAddress is alias THBIMC3THGH5RUYAAAAAAAAAAAAAAAAAAAAAAAA
It will throw an error Address Network unsupported
right?
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.
We haven't removed private/mijin network support from the old SDKs yet. Unsure if it makes sense to remove them, this SDK would fade off eventually.
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.
Ignore my question.
Actually, I misunderstood, even though the alias namespace is still converted to a valid address format from REST.
This is the SDK side of symbol/catapult-rest#611
The new rest mappers will accept both encoded/hex and plain/decoded addresses. It will buffer the migration allowing the SDK rest client to be compatible with old and new rests. Eventually, we should only allow base32 addresses. Apps only need to upgrade the SDK, no code change is required.
A migration plan could be:
No flag is required.
Related issues:
#801
#802