-
Notifications
You must be signed in to change notification settings - Fork 42
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
GIX-1890: Add Transaction Fee confirm screen #3327
Conversation
@dskloetd please review |
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.
In the screenshot, the transaction fee is larger than the entire amount disbursed.
How does this work? Where is the transaction fee subtracted from?
And should we prevent this or at least warn against it?
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.
Yes, I have another branch that solves that.
@@ -26,8 +26,8 @@ | |||
$snsProjectMainAccountStore?.identifier ?? "" | |||
); | |||
|
|||
let token: Token | undefined; | |||
$: token = $tokensStore[$selectedUniverseIdStore.toText()]?.token; | |||
let token: IcrcTokenMetadata | undefined; |
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 are still getting token
from the $tokensStore
. How can it be that the type is different now?
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.
IcrcTokenMetadata
extends Token
on:nnsDisburseMaturity={disburseMaturity} | ||
on:nnsClose | ||
/> | ||
{#if nonNullish(token)} |
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 is this needed now but not before?
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.
Beucase it was passing only the tokenSymbol
and falling back to ""
.
@@ -77,8 +84,9 @@ describe("SnsDisburseMaturityModal", () => { | |||
await po.clickNextButton(); | |||
|
|||
expect(await po.getConfirmPercentage()).toBe("50%"); | |||
expect(await po.getConfirmTokens()).toBe("0.48-0.53 ICP"); |
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 looks like a bug? Are you fixing a bug at the same time in this PR?
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 was not a bug, but the setup of the test was wrong.
When I set it for the transaction fee, this surfaced. I didn't fee it was big enough to deserve its own PR.
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.
Done: #3328
|
||
async getTransactionFee(): Promise<string> { | ||
return ( | ||
await this.getNeuronConfirmActionScreenPo().getText("token-value-label") |
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.
Is this relying on there being only 1 token amount in the modal?
Might be better to explicitly refer to the fee.
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.
Yes. I also thought so, I didn't want to add anything else to this PR, but I'll add a testId prop to the AmountDisplay
The fee is not deducted, it's only used as a minimum. Therefore, there is no need to show it in the confirmation screen. |
PENDING
Confirm: The fee is not subtracted from the maturity. Instead, it just used as an arbitrary minimum to mint the tokens.
Motivation
Add transaction fee in the confirmation screen when disbursing maturity.
Changes
IcrcTokenMetadata
as prop instead of just thetokenSymbol
inDisburseMaturityModal
.DisburseMaturityModal
confirmation screen.Tests
"should display summary information in the last step"
.Todos
Not necessary. It's covered by the disburse maturity changelog entry.