Skip to content

Commit 22a1919

Browse files
chore: Cherry pick 5849444 (#11007)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** chore: Cherry pick 5849444 ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [ ] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. Co-authored-by: Matthew Walsh <[email protected]>
1 parent 4180cd5 commit 22a1919

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

app/components/Views/confirmations/SendFlow/Confirm/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ import CustomGasModal from './components/CustomGasModal';
112112
import { ResultType } from '../../components/BlockaidBanner/BlockaidBanner.types';
113113
import { withMetricsAwareness } from '../../../../../components/hooks/useMetrics';
114114
import {
115-
selectTransactionGasFeeEstimates,
116115
selectCurrentTransactionMetadata,
116+
selectGasFeeEstimates,
117117
} from '../../../../../selectors/confirmTransaction';
118118
import { selectGasFeeControllerEstimateType } from '../../../../../selectors/gasFeeController';
119119
import { createBuyNavigationDetails } from '../../../../UI/Ramp/routes/utils';
@@ -1475,7 +1475,7 @@ const mapStateToProps = (state) => ({
14751475
selectedAsset: state.transaction.selectedAsset,
14761476
transactionState: state.transaction,
14771477
primaryCurrency: state.settings.primaryCurrency,
1478-
gasFeeEstimates: selectTransactionGasFeeEstimates(state),
1478+
gasFeeEstimates: selectGasFeeEstimates(state),
14791479
gasEstimateType: selectGasFeeControllerEstimateType(state),
14801480
isPaymentRequest: state.transaction.paymentRequest,
14811481
securityAlertResponse:

app/core/Engine.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1540,6 +1540,7 @@ class Engine {
15401540
this.configureControllersOnNetworkChange();
15411541
this.startPolling();
15421542
this.handleVaultBackup();
1543+
this.transactionController.clearUnapprovedTransactions();
15431544

15441545
Engine.instance = this;
15451546
}

app/selectors/confirmTransaction.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ const selectCurrentTransactionGasFeeEstimatesStrict = createSelector(
1919
(transactionMetadata) => transactionMetadata?.gasFeeEstimates,
2020
);
2121

22-
const selectCurrentTransactionGasFeeEstimatesLoaded = createSelector(
23-
selectCurrentTransactionMetadata,
24-
(transactionMetadata) => transactionMetadata?.gasFeeEstimatesLoaded,
25-
);
26-
2722
export const selectCurrentTransactionGasFeeEstimates = createDeepEqualSelector(
2823
selectCurrentTransactionGasFeeEstimatesStrict,
2924
(gasFeeEstimates) => gasFeeEstimates,
@@ -45,10 +40,3 @@ export const selectGasFeeEstimates = createSelector(
4540
return gasFeeControllerEstimates;
4641
},
4742
);
48-
49-
export const selectTransactionGasFeeEstimates = createSelector(
50-
selectCurrentTransactionGasFeeEstimatesLoaded,
51-
selectGasFeeEstimates,
52-
(transactionGasFeeEstimatesLoaded, gasFeeEstimates) =>
53-
transactionGasFeeEstimatesLoaded ? gasFeeEstimates : undefined,
54-
);

0 commit comments

Comments
 (0)