diff --git a/app/scripts/controllers/swaps.js b/app/scripts/controllers/swaps.js index 6eb800793..e4df14746 100644 --- a/app/scripts/controllers/swaps.js +++ b/app/scripts/controllers/swaps.js @@ -139,9 +139,7 @@ export default class SwapsController { if ( !refreshRates || typeof refreshRates.quotes !== 'number' || - typeof refreshRates.quotesPrefetching !== 'number' || - typeof refreshRates.stxGetTransactions !== 'number' || - typeof refreshRates.stxBatchStatus !== 'number' + typeof refreshRates.quotesPrefetching !== 'number' ) { throw new Error( `MetaMask - invalid response for refreshRates: ${response}`, diff --git a/ui/pages/swaps/countdown-timer/countdown-timer.js b/ui/pages/swaps/countdown-timer/countdown-timer.js index b34301ebb..c2558b268 100644 --- a/ui/pages/swaps/countdown-timer/countdown-timer.js +++ b/ui/pages/swaps/countdown-timer/countdown-timer.js @@ -5,7 +5,10 @@ import classnames from 'classnames'; import { Duration } from 'luxon'; import { I18nContext } from '../../../contexts/i18n'; import InfoTooltip from '../../../components/ui/info-tooltip'; -import { getSwapsQuoteRefreshTime } from '../../../ducks/swaps/swaps'; +import { + getSwapsQuoteRefreshTime, + getSwapsQuotePrefetchingRefreshTime, +} from '../../../ducks/swaps/swaps'; import { SECOND } from '../../../../shared/constants/time'; import TimerIcon from './timer-icon'; @@ -43,7 +46,13 @@ export default function CountdownTimer({ const initialTimeStartedRef = useRef(); const swapsQuoteRefreshTime = useSelector(getSwapsQuoteRefreshTime); - const timerStart = Number(timerBase) || swapsQuoteRefreshTime; + const swapsQuotePrefetchingRefreshTime = useSelector( + getSwapsQuotePrefetchingRefreshTime, + ); + const refreshTime = initialTimeStartedRef.current + ? swapsQuoteRefreshTime + : swapsQuotePrefetchingRefreshTime; + const timerStart = Number(timerBase) || refreshTime; const [currentTime, setCurrentTime] = useState(() => Date.now()); const [timer, setTimer] = useState(() => diff --git a/ui/pages/swaps/index.scss b/ui/pages/swaps/index.scss index ed0c06a33..faa2e8b9e 100644 --- a/ui/pages/swaps/index.scss +++ b/ui/pages/swaps/index.scss @@ -121,7 +121,7 @@ flex: 1; } - &__notification-close-button { + .actionable-message__message &__notification-close-button { background-color: transparent; position: absolute; right: 0; diff --git a/ui/pages/swaps/view-quote/view-quote.js b/ui/pages/swaps/view-quote/view-quote.js index a3e920fd1..1770c0751 100644 --- a/ui/pages/swaps/view-quote/view-quote.js +++ b/ui/pages/swaps/view-quote/view-quote.js @@ -955,7 +955,7 @@ export default function ViewQuote() {