-
Notifications
You must be signed in to change notification settings - Fork 109
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: state data for aborted tx amount #1395
Conversation
!!!WARNING!!! Be very careful about using Only suppress a single rule (or a specific set of rules) within a section of code, while continuing to scan for other problems. To do this, you can list the rule(s) to be suppressed within the #nosec annotation, e.g: /* #nosec G401 */ or //#nosec G201 G202 G203 Pay extra attention to the way |
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.
It looks good to me.
I'm just wondering, for future-proofing purposes, maybe we could use a more general state variable ZetaAccounting
instead AbortedZetaAmount
and add abortedAmount
in this state variable. It would reduce complexity and refactoring work in case we want to add a new variable for accounting purpose in the store in the future.
What do you think?
docs/cli/zetacored/zetacored_query_crosschain_get-aborted-zeta-amount.md
Outdated
Show resolved
Hide resolved
@@ -51,6 +47,9 @@ func (k Keeper) SetCctxAndNonceToCctxAndInTxHashToCctx(ctx sdk.Context, send typ | |||
Tss: tss.TssPubkey, | |||
}) | |||
} | |||
if send.CctxStatus.Status == types.CctxStatus_Aborted { | |||
k.AddZetaAccounting(ctx, send.GetCurrentOutTxParam().Amount) |
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.
- The function name AddZetaAccounting can be more specific.
- Do you need to test whether the outbound is supposed to be ZETA token transfer, not some other tokens?
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.
Thanks , good catch !
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.
Just a typo in a file name: x/crosschain/keeper/zeta_accountin.go
Description
Closes:
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Include instructions and any relevant details so others can reproduce.
Checklist: