-
Notifications
You must be signed in to change notification settings - Fork 298
[DDW-827] Show helpful message when trying to empty wallet containing native tokens #2783
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
[DDW-827] Show helpful message when trying to empty wallet containing native tokens #2783
Conversation
# Conflicts: # CHANGELOG.md
source/renderer/app/components/wallet/send-form/WalletSendConfirmationDialog.js
Show resolved
Hide resolved
|
Hi @mchappell , On build 20533, I noticed when: I have ada and native tokens Observation: The error message contained NaN ADA. Please see screenshot Note: This is new which didn't exist in the last few builds during testing. |
|
@mchappell This looks good overall, but I noticed some strange scenarios:
|
|
Hi @mchappell , This is an interim report for build 20898 as test is still ongoing (as discussed) and for ease of reference for everybody |
Hey @miorsufianiohk, thanks for testing this Can you confirm if 1. is a behaviour that exists in develop, if so it's out of scope for this PR but please discuss future improvement with the team Thanks for being really rigorous with this one 👍 |
| > => { | ||
| // @ts-ignore ts-migrate(2322) FIXME: Type 'unknown' is not assignable to type 'Download... Remove this comment to see the full error message | ||
| > => localStorage.getAll(); | ||
| return localStorage.getAll(); | ||
| }; |
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.
Apologies, but is there any reason to change that? :) I assume that previous ts-ignore was working.
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.
git merge didn't work out the right way and reverted to a previous configuration. That's the sad part about long lived branches with multiple migrations run
gabriela-ponce
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.
This looks ok, good job 💯
Regarding the issues mentioned here, we think the API is returning a smaller value than is actually required to stay in the wallet to move the tokens. As it's out of the scope of this PR we'll check this with the Adrestia team and if required, address it on another card.
miorsufianiohk
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.
Hi @mchappell,
LGTM. I could confirm that issue 1 exists on develop too of which I have created a Jira ticket for it. Issue 2 is now fixed. Great work 👍 . Tested on 20909
source/renderer/app/api/api.ts
Outdated
| GetNetworkParametersApiResponse, | ||
| } from './network/types'; | ||
| // Transactions Types | ||
| // @ts-ignore ts-migrate(2307) FIXME: Cannot find module './transactions/types' or its c... Remove this comment to see the full error message |
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.
Not sure how it happened, is it a result of running ts-migrate, but could we ideally please not introduce new ts-ignore's?
source/renderer/app/components/wallet/send-form/WalletSendAssetsConfirmationDialog.tsx
Show resolved
Hide resolved
source/renderer/app/components/wallet/send-form/WalletSendConfirmationDialog.tsx
Show resolved
Hide resolved
danielmain
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.
Great job @mchappell I have some questions if you still have some minutes for us :)
| } | ||
|
|
||
| trigger(params: Params) { | ||
| trigger(params?: Params) { |
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 this is optional, why not checking it its null the next line?
… native tokens (#2783) Co-authored-by: Daniel Main <daniel.main.cernhoff@icloud.com> Co-authored-by: Marcin Mazurek <marcin.mazurek@iohk.io> Co-authored-by: Renan Ferreira <renan.ferreira@iohk.io> Co-authored-by: Szymon Masłowski <szymon.maslowski@iohk.io>
… native tokens (#2783) Co-authored-by: Daniel Main <daniel.main.cernhoff@icloud.com> Co-authored-by: Marcin Mazurek <marcin.mazurek@iohk.io> Co-authored-by: Renan Ferreira <renan.ferreira@iohk.io> Co-authored-by: Szymon Masłowski <szymon.maslowski@iohk.io>
This PR shows a more helpful error message when trying to an amount of funds out of the wallet, which would not leave enough funds left to support native tokens in a wallet.
Screenshots
Testing Checklist
Testing Scenarios
Review Checklist
Basics
feature/bug/chore,release-x.x.x)yarn test)yarn dev)yarn package/ CI builds)yarn flow:test)yarn lint)yarn prettier:check)yarn manage:translationsproduces no changes)yarn storybook)yarn.lockfile is updatedCode Quality
Testing
After Review
donecolumn on the YouTrack board