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 for non ALPH Tokens #185

Merged
merged 3 commits into from
Feb 28, 2024

Conversation

h0ngcha0
Copy link
Member

No description provided.

: balanceBn.sub(maxFee)
if (token.balance) {
let maxAmount = token.balance
if (feeToken?.id === token.id) {
Copy link
Member

Choose a reason for hiding this comment

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

Why don't we just check token.id === ALPH?

if (feeToken?.id === token.id) {
maxAmount =
account?.networkId ===
"devnet" /** FIXME: workaround for localhost fee estimate with devnet 0.3.4 */
Copy link
Member

Choose a reason for hiding this comment

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

What was the issue for devnet?

Copy link
Member Author

Choose a reason for hiding this comment

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

Tested on devnet, doesn't have any issues, removing this now.

Copy link
Member

@polarker polarker left a comment

Choose a reason for hiding this comment

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

LGTM, but please test both ALPH and token before making the final release.

@h0ngcha0 h0ngcha0 merged commit 68caa98 into master Feb 28, 2024
2 checks passed
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.

2 participants