From 1112571618ce49397ba281a77d8684ffb1b4e5e6 Mon Sep 17 00:00:00 2001 From: bigboydiamonds <57741810+bigboydiamonds@users.noreply.github.com> Date: Wed, 11 Sep 2024 12:01:25 -0700 Subject: [PATCH] require approval before confirm modal shows --- .../components/StateManagedBridge/BridgeTransactionButton.tsx | 1 + .../synapse-interface/components/buttons/TransactionButton.tsx | 1 + packages/synapse-interface/utils/hooks/useStaleQuoteUpdater.ts | 2 -- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx b/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx index 14527f4aff..38a1b196bb 100644 --- a/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx +++ b/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx @@ -182,6 +182,7 @@ export const BridgeTransactionButton = ({ pendingLabel: t('Switching chains'), } } else if ( + isApproved && hasValidQuote && hasQuoteOutputChanged && hasSameSelectionsAsPreviousQuote && diff --git a/packages/synapse-interface/components/buttons/TransactionButton.tsx b/packages/synapse-interface/components/buttons/TransactionButton.tsx index e868868dc8..59baf8755b 100644 --- a/packages/synapse-interface/components/buttons/TransactionButton.tsx +++ b/packages/synapse-interface/components/buttons/TransactionButton.tsx @@ -12,6 +12,7 @@ const baseClassNames = { disabled: 'disabled:opacity-50 disabled:cursor-not-allowed', background: 'bg-zinc-400 dark:bg-bgLight', gradient: 'enabled:bg-gradient-to-r', + transition: 'transition', } export const TransactionButton = ({ diff --git a/packages/synapse-interface/utils/hooks/useStaleQuoteUpdater.ts b/packages/synapse-interface/utils/hooks/useStaleQuoteUpdater.ts index 0101f7d4cc..0bd8162aaa 100644 --- a/packages/synapse-interface/utils/hooks/useStaleQuoteUpdater.ts +++ b/packages/synapse-interface/utils/hooks/useStaleQuoteUpdater.ts @@ -8,8 +8,6 @@ import { convertUuidToUnix } from '@/utils/convertUuidToUnix' export const useStaleQuoteUpdater = ( quote: BridgeQuote, refreshQuoteCallback: () => Promise, - // isQuoteLoading: boolean, - // isWalletPending: boolean, isActive: boolean, staleTimeout: number = 15000, // in ms autoRefreshDuration: number = 30000 // in ms