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
fix: not visible surplus #5968
fix: not visible surplus #5968
Conversation
The second test case is not showing storage deposit, nor is it showing an asset. This leads to the following transaction: https://explorer.shimmer.network/testnet/transaction/0xed58b2af79a2ef81bed56dc41d398e00c4a338497e05003b3a7d7a7eb37a030c Perhaps the other prs need to be merged first?? |
2,3,4 test cases are not working |
Only test case 2 is not working now |
@maxwellmattryan @nicole-obrien I'm sorry, I've removed the assetId param from the deep links by mistake, it should test the native tokens, now it should work, you just need to put an assetId that the account is holding |
Im not sure the expected results of the last test case are actually correct. Lets look at the test cases tomorrow. |
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.
Code looks good. Some feedback:
- On the third test case, it only showed 600 glow rather than 49,600.
- If the storage deposit is zero, then imo we shouldn't show the "Gift storage deposit" key value box in the send confirmation popup. It's interesting because this is happening in the 6th case but in the 4th case it's the opposite.
- Cases 5 and 7 are showing surpluses and 0 for the storage deposits. Case 8 shows the correct storage deposit but it also shows the surplus.
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.
LGTM 🔥
Summary
Adds visibility of surplus field when conditions are satisfied, the surplus was not showing before
Changelog
Testing
Platforms
Instructions
With native token ID
should show surplus with 1,000,000 glow & should show storage deposit with 0 glow
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableToggleGift=true&disableChangeExpiration=true&amount=1&giftStorageDeposit=true&surplus=1000000&assetId=<NATIVE_TOKEN_ID_THAT_ACCOUNT_IS_HOLDING>
should not show surplus & should show storage deposit with 49,600 glow
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableToggleGift=true&disableChangeExpiration=true&amount=1&giftStorageDeposit=true&assetId=<NATIVE_TOKEN_ID_THAT_ACCOUNT_IS_HOLDING>
should show surplus with 49,000 glow & should show storage deposit with 49,600 glow
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableToggleGift=true&disableChangeExpiration=true&amount=1&giftStorageDeposit=true&surplus=49000&assetId=<NATIVE_TOKEN_ID_THAT_ACCOUNT_IS_HOLDING>
should show surplus with 60,000 glow & no storage deposit
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableToggleGift=true&disableChangeExpiration=true&amount=1&surplus=60000&assetId=<NATIVE_TOKEN_ID_THAT_ACCOUNT_IS_HOLDING>
Without native token ID
should show surplus not supported error
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableToggleGift=true&disableChangeExpiration=true&amount=1&giftStorageDeposit=true&surplus=1000000
should not show surplus and should show 42,599 in storage deposit
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableToggleGift=true&disableChangeExpiration=true&amount=1&giftStorageDeposit=true
should show surplus not supported error
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableToggleGift=true&disableChangeExpiration=true&amount=1&giftStorageDeposit=true&surplus=49000
should show surplus not supported error
firefly-alpha://wallet/sendConfirmation?address=rms1qpwed3kpaju5rwe4nhplaj3ya6tujzvyuepypya4us95yf2rkp80u5ja230&disableChangeExpiration=true&amount=1&surplus=50000
Checklist