Skip to content

Commit

Permalink
improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
jonator committed Jun 4, 2024
1 parent 67d8b87 commit b9a1c1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/web/hooks/use-swap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export function useSwap(
// with the input amount when switching assets
inAmountInput.debouncedInAmount?.currency.coinMinimalDenom ===
swapAssets.fromAsset?.coinMinimalDenom &&
!Boolean(account?.txTypeInProgress) &&
!account?.txTypeInProgress &&
!isWalletLoading;

const {
Expand Down Expand Up @@ -789,6 +789,7 @@ function useSwapAmountInput({
!isLoadingWallet &&
Boolean(swapAssets.fromAsset) &&
Boolean(swapAssets.toAsset) &&
// since the in amount is debounced, the asset could be wrong when switching assets
inAmountInput.debouncedInAmount?.currency.coinMinimalDenom ===
swapAssets.fromAsset!.coinMinimalDenom &&
!!inAmountInput.balance &&
Expand Down Expand Up @@ -817,7 +818,7 @@ function useSwapAmountInput({
// includes check for balanceQuoteQueryEnabled
!isQuoteForCurrentBalanceLoading &&
Boolean(quoteForCurrentBalance) &&
!Boolean(account?.txTypeInProgress);
!account?.txTypeInProgress;
const {
data: currentBalanceNetworkFee,
isLoading: isLoadingCurrentBalanceNetworkFee_,
Expand Down

0 comments on commit b9a1c1a

Please sign in to comment.