-
Notifications
You must be signed in to change notification settings - Fork 49
fix: added details in history for Bittensor dTAO operations #2288
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
base: dev
Are you sure you want to change the base?
Conversation
0xKheops
left a comment
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.
looks great now, but can be further simplified
0xKheops
left a comment
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.
2 little issues to fix
| fromTokenId: nativeToken.id, | ||
| toTokenId: nativeToken.id, |
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.
if using native token id for both, the label in the details form will be incorrect for unstake txs.
one of them is not the native token but alpha for netuid 0, can generate its id using subDTaoTokenId("bittensor", 0).
| defaults={ | ||
| isStake | ||
| ? "Stake <FromTokens /> for <ToTokens />" | ||
| : "Unstake <FromTokens /> for <ToTokens />" | ||
| } |
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.
i18n strings cannot be conditional or they wont be parsed and sent to our translation platform.
sadly we need 2 different <Trans /> components here.
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 maybe have the operation name being output by a 3rd entry in the components property


Added TAO/Alpha information for dTAO staking events (unstake/stake).

It seems like even for swap details (SimpleSwap), we still just say "Confirmed/Failed", so I didn't change the dTAO history items to stay "Stake/Unstake" (but this can easily be added if we want).