-
Notifications
You must be signed in to change notification settings - Fork 3
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
add KSM (Kusama) support #109
Conversation
src/services/dot.ts
Outdated
async decodeTx(txSerialized: string): Promise<UnsignedTransaction> { | ||
const { data } = await api.get<UnsignedTransaction>(`/v1/dot/transaction/decode?tx_serialized=${txSerialized}`); | ||
return data; | ||
mainToPlanck(amount: string): string { |
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.
why name it "generically" if it does not do the same for KSM and DOT ?
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.
this function has the same role for all substrate tokens, converting from the main token to planck however the conversion rate is different for DOT, WND & KSM hence the abstract
keyword. Does this not look straight forward to you?
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.
for all other protocols we have a naming with token names no ?
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.
for consistency I guess we should have ksmToPlanck and dotToPlanck no ?
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.
Ok let me find a workaround. Let me know if this looks good for you
38ef7b7
to
3fd3984
Compare
No description provided.