Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

feat: disable max button after setting max balance #360

Merged
merged 5 commits into from
Jul 4, 2022

Conversation

LuizAsFight
Copy link
Contributor

  • disable max button when max balance is already set in the coin input
  • fix network fee being applied to DAI token
  • added tests to helper function which calculates maximun balance
  • added tests to make sure max button is disabled after clicked

Closes #357
Closes #359

@LuizAsFight LuizAsFight added bug Something isn't working enhancement New feature or request page:swap labels Jul 2, 2022
@LuizAsFight LuizAsFight self-assigned this Jul 2, 2022
@LuizAsFight LuizAsFight marked this pull request as ready for review July 2, 2022 00:35
@LuizAsFight LuizAsFight requested review from luizstacio and pedronauck and removed request for luizstacio July 2, 2022 00:35
@@ -40,8 +41,13 @@ export const CoinBalance = ({
aria-label="Set Maximun Balance"
size="sm"
onPress={onSetMaxBalance}
className="text-xs py-0 px-1 h-auto bg-primary-800/60 text-primary-500 hover:bg-primary-800"
variant="ghost"
className={`text-xs py-0 px-1 h-auto ${
Copy link
Member

Choose a reason for hiding this comment

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

You can use csx here to add conditional classes in a better way

@LuizAsFight LuizAsFight merged commit e2fedbf into master Jul 4, 2022
@LuizAsFight LuizAsFight deleted the lf-357/feat/swap-recalculate-max branch July 4, 2022 23:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request page:swap
Projects
None yet
2 participants