Skip to content

Commit 9755e63

Browse files
authored
chore(runway): cherry-pick fix: cp-7.47.0 stop quote polling when "quote expired" modal is open (#15645)
2 parents b823e60 + 8c204c3 commit 9755e63

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6262

6363
### Added
6464

65+
- fix(bridge): prevent quote polling when "quote expired" modal is open ([#15602](https://github.com/MetaMask/metamask-mobile/issues/15602))
6566
- feat(bridge): improve bridge screen layout and user experience ([#15425](https://github.com/MetaMask/metamask-mobile/pull/15425))
6667
- fix(browser): fix browser PermissionsSummary origin spoofing when browser redirects issue ([#13394](https://github.com/MetaMask/metamask-mobile/pull/13394))
6768
- feat: migrate eth_accounts and permittedChains to CAIP-25 endowment ([#13970](https://github.com/MetaMask/metamask-mobile/pull/13970))

app/components/UI/Bridge/components/QuoteExpiredModal/QuoteExpiredModal.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useRef } from 'react';
1+
import React, { useEffect, useRef } from 'react';
22
import { View } from 'react-native';
33
import { useNavigation } from '@react-navigation/native';
44
import { strings } from '../../../../../../locales/i18n';
@@ -53,6 +53,13 @@ const QuoteExpiredModal = () => {
5353
navigation.goBack();
5454
};
5555

56+
useEffect(() => {
57+
// Stop polling when modal opens
58+
if (Engine.context.BridgeController?.stopAllPolling) {
59+
Engine.context.BridgeController.stopAllPolling();
60+
}
61+
}, []);
62+
5663
const footerButtonProps = [
5764
{
5865
label: strings('quote_expired_modal.get_new_quote'),

0 commit comments

Comments
 (0)