Skip to content
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

How to handle the SS58-prefix in the dart API. #567

Closed
clangenb opened this issue Apr 27, 2022 · 0 comments · Fixed by #1111
Closed

How to handle the SS58-prefix in the dart API. #567

clangenb opened this issue Apr 27, 2022 · 0 comments · Fixed by #1111

Comments

@clangenb
Copy link
Member

clangenb commented Apr 27, 2022

Currently, we have some RPCs that return AccountIds. Substrate encodes them by default with the generic SS58-prefix 42. This is transformed into the node-specific SS58-address format by the client side, e.g., polkadot-js/api usually.

In our dart api, we don't have such a logic. Hence, this leads to inconsistency in the address format, when compared to the values returned by the polkadot-js api.

#568 hardcodes the prefixes to 42 for all networks, to fix inconsistencies with the js-api, which would use the network-specific prefix. This fix might be acceptable if we assume that the users will never use their account with polkadot-js/apps or with subscan. But is this a valid assumption?

We might want to internally the prefix 42 always, but we show the network specific one to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant