Skip to content
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 max button on send page #396

Merged
merged 6 commits into from May 20, 2021

Conversation

tuhalang
Copy link
Contributor

Resolves #393

  • Fill max amount when clicking the max button
  • Clear the Dollar Equivalence field when the DCR Amount field is also cleared, and vice versa
  • Clear input field error when exit send page
  • Show the spendable balance in the account selector widget

@oshorefueled
Copy link
Contributor

  • I get a "not enough funds" error on the input field when I click the max button
  • The USD field has the exact value as the DCR field when I use the max button. It should display the USD equivalent.

Screenshot 2021-05-01 at 18 34 26

bal := page.info.Wallets[page.wallAcctSelector.selectedSendWallet].Accounts[page.wallAcctSelector.selectedSendAccount].TotalBalance
return d(gtx, acctName, walName, bal, page.wallAcctSelector.sendAccountBtn)
bal := page.info.Wallets[page.wallAcctSelector.selectedSendWallet].Accounts[page.wallAcctSelector.selectedSendAccount].SpendableBalance
return d(gtx, acctName, walName, dcrutil.Amount(bal).String(), page.wallAcctSelector.sendAccountBtn)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

set page.info.Wallets[page.wallAcctSelector.selectedSendWallet] to a variable to make the code line shorter and easier to read.

@oshorefueled
Copy link
Contributor

I still get the "insufficient balance" bug when I use the max button.

max_bug

@oshorefueled
Copy link
Contributor

I'm currently experiencing this issue when using the button on different accounts

max_button_bug

- Fill max amount when clicking the max button
- Clear the Dollar Equivalence field when the DCR Amount field is also cleared, and vice versa
- Clear input field error when exit send page
- Show the spendable balance in the account selector widget
@oshorefueled
Copy link
Contributor

Clicking the max button take 2 or 3 seconds to populate the input field. And when I use the max button on an account with zero balance, it causes the entire window to freeze.

max_button

@oshorefueled oshorefueled merged commit 332cada into planetdecred:master May 20, 2021
song50119 pushed a commit to song50119/godcr that referenced this pull request May 29, 2021
song50119 pushed a commit to song50119/godcr that referenced this pull request Apr 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

max buttons on send page don't work
2 participants