From 378cdcbc1d57b160416371ad314e82e5b61387a2 Mon Sep 17 00:00:00 2001 From: httpjunkie Date: Thu, 16 Jan 2025 12:48:31 -0500 Subject: [PATCH] feat: add SmartTransactionsEnabledBanner to Swaps Quotes VIew --- app/components/UI/Swaps/QuotesView.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/components/UI/Swaps/QuotesView.js b/app/components/UI/Swaps/QuotesView.js index 9273641eabb..33ad546435c 100644 --- a/app/components/UI/Swaps/QuotesView.js +++ b/app/components/UI/Swaps/QuotesView.js @@ -118,6 +118,7 @@ import { selectGasFeeControllerEstimateType } from '../../../selectors/gasFeeCon import { addSwapsTransaction } from '../../../util/swaps/swaps-transactions'; import { getTransaction1559GasFeeEstimates } from './utils/gas'; import { getGlobalEthQuery } from '../../../util/networks/global-network'; +import SmartTransactionsEnabledBanner from '../../Views/confirmations/components/SmartTransactionsEnabledBanner/SmartTransactionsEnabledBanner'; const LOG_PREFIX = 'Swaps'; const POLLING_INTERVAL = 30000; @@ -148,6 +149,11 @@ const createStyles = (colors) => marginVertical: 10, width: '100%', }, + smartTransactionsBanner: { + paddingHorizontal: 20, + marginHorizontal: 16, + marginVertical: 10, + }, timerWrapper: { backgroundColor: colors.background.alternative, borderRadius: 20, @@ -1788,7 +1794,9 @@ function SwapsQuotesView({ keyboardShouldPersistTaps="handled" > + {(!hasEnoughTokenBalance || !hasEnoughEthBalance) && ( + <> @@ -1810,12 +1818,16 @@ function SwapsQuotesView({ )} + )} {!!selectedQuote && hasEnoughTokenBalance && hasEnoughEthBalance && shouldDisplaySlippage && ( + + +