Skip to content

Commit

Permalink
Merge pull request #88 from HaloDAO/develop
Browse files Browse the repository at this point in the history
Fix: Approve button, viewOriginSwap without approval, copy change
  • Loading branch information
0xAplki authored Sep 15, 2021
2 parents 33fde6a + 0c48d26 commit e4d730c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions src/pages/Tailwind/Swap/SwapPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,12 @@ const SwapPanel = () => {
value={fromInputValue}
canSelectToken={false}
didChangeValue={async val => {
if (approveState === ApproveButtonState.Approved) {
if (parseFloat(fromAmountBalance) >= parseFloat(val)) {
setButtonState(SwapButtonState.Swap)
} else if (parseFloat(fromAmountBalance) < parseFloat(val)) {
setButtonState(SwapButtonState.InsufficientBalance)
}
getMinimumAmount(val, CurrencySide.TO_CURRENCY)
if (parseFloat(fromAmountBalance) >= parseFloat(val)) {
setButtonState(SwapButtonState.Swap)
} else if (parseFloat(fromAmountBalance) < parseFloat(val)) {
setButtonState(SwapButtonState.InsufficientBalance)
}
getMinimumAmount(val, CurrencySide.TO_CURRENCY)

setFromInputValue(val)
}}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Tailwind/Swap/modals/SwapTransactionModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ const SwapTransactionModal = ({
target="_blank"
rel="noopener noreferrer"
>
View on Etherscan
View on {chainId === ChainId.MATIC ? 'Chain Explorer' : 'Etherscan'}
</a>
</div>
<div className="mt-12">
Expand Down

0 comments on commit e4d730c

Please sign in to comment.