Skip to content

Commit

Permalink
chore: cherry pick sync hot fixes 7.29.1 & 7.29.2 (#11016)
Browse files Browse the repository at this point in the history
## **Description**

chore: cherry pick c8000b1

## **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: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: runway-github[bot] <73448015+runway-github[bot]@users.noreply.github.com>
Co-authored-by: Jyoti Puri <[email protected]>
Co-authored-by: Matthew Walsh <[email protected]>
  • Loading branch information
5 people authored Sep 4, 2024
1 parent ef6667a commit 442d840
Show file tree
Hide file tree
Showing 7 changed files with 942 additions and 944 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@
- [#10640](https://github.com/MetaMask/metamask-mobile/pull/10640): fix: notification small fixes (#10640)
- [#10693](https://github.com/MetaMask/metamask-mobile/pull/10693): fix: notification second round fixes (#10693)

## 7.29.2 - Sep 2, 2024
### Fixed
- [#10965](https://github.com/MetaMask/metamask-mobile/pull/10965): fix: gas never loading during send + high gas fee after deep link (#10965)
- [#11005](https://github.com/MetaMask/metamask-mobile/pull/11005): fix: Add missing allowedAction NetworkController:findNetworkClientIdByChainId to transactionController (#11005)

## 7.29.1 - Aug 29, 2024
### Fixed
- [#10831](https://github.com/MetaMask/metamask-mobile/pull/10831): feat: Update Polygon from MATIC to POL (#10831)

## 7.29.0 - Aug 2, 2024
### Added
- [#9578](https://github.com/MetaMask/metamask-mobile/pull/9578): feat: type `renderHookWithProvider` (#9578)
Expand Down
1 change: 0 additions & 1 deletion app/components/Views/confirmations/Send/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,6 @@ class Send extends PureComponent {
newTxMeta = {
symbol: 'ETH',
assetType: 'ETH',
type: 'ETHER_TRANSACTION',
paymentRequest: true,
selectedAsset: { symbol: 'ETH', isETH: true },
...txRecipient,
Expand Down
4 changes: 2 additions & 2 deletions app/components/Views/confirmations/SendFlow/Confirm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ import CustomGasModal from './components/CustomGasModal';
import { ResultType } from '../../components/BlockaidBanner/BlockaidBanner.types';
import { withMetricsAwareness } from '../../../../../components/hooks/useMetrics';
import {
selectTransactionGasFeeEstimates,
selectCurrentTransactionMetadata,
selectCurrentTransactionSecurityAlertResponse,
selectGasFeeEstimates,
} from '../../../../../selectors/confirmTransaction';
import { selectGasFeeControllerEstimateType } from '../../../../../selectors/gasFeeController';
import { createBuyNavigationDetails } from '../../../../UI/Ramp/routes/utils';
Expand Down Expand Up @@ -1468,7 +1468,7 @@ const mapStateToProps = (state) => ({
selectedAsset: state.transaction.selectedAsset,
transactionState: state.transaction,
primaryCurrency: state.settings.primaryCurrency,
gasFeeEstimates: selectTransactionGasFeeEstimates(state),
gasFeeEstimates: selectGasFeeEstimates(state),
gasEstimateType: selectGasFeeControllerEstimateType(state),
isPaymentRequest: state.transaction.paymentRequest,
isNativeTokenBuySupported: isNetworkRampNativeTokenSupported(
Expand Down
2 changes: 2 additions & 0 deletions app/core/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,7 @@ class Engine {
`${accountsController.name}:getSelectedAccount`,
`${approvalController.name}:addRequest`,
`${networkController.name}:getNetworkClientById`,
`${networkController.name}:findNetworkClientIdByChainId`,
],
allowedEvents: [`NetworkController:stateChange`],
}),
Expand Down Expand Up @@ -1545,6 +1546,7 @@ class Engine {
this.configureControllersOnNetworkChange();
this.startPolling();
this.handleVaultBackup();
this.transactionController.clearUnapprovedTransactions();

Engine.instance = this;
}
Expand Down
12 changes: 0 additions & 12 deletions app/selectors/confirmTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ const selectCurrentTransactionGasFeeEstimatesStrict = createSelector(
(transactionMetadata) => transactionMetadata?.gasFeeEstimates,
);

const selectCurrentTransactionGasFeeEstimatesLoaded = createSelector(
selectCurrentTransactionMetadata,
(transactionMetadata) => transactionMetadata?.gasFeeEstimatesLoaded,
);

export const selectCurrentTransactionGasFeeEstimates = createDeepEqualSelector(
selectCurrentTransactionGasFeeEstimatesStrict,
(gasFeeEstimates) => gasFeeEstimates,
Expand All @@ -52,10 +47,3 @@ export const selectGasFeeEstimates = createSelector(
return gasFeeControllerEstimates;
},
);

export const selectTransactionGasFeeEstimates = createSelector(
selectCurrentTransactionGasFeeEstimatesLoaded,
selectGasFeeEstimates,
(transactionGasFeeEstimatesLoaded, gasFeeEstimates) =>
transactionGasFeeEstimatesLoaded ? gasFeeEstimates : undefined,
);
2 changes: 1 addition & 1 deletion app/util/custom-gas/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export async function getGasLimit(transaction, resetGas = false) {
let estimation;
try {
const newTransactionObj = resetGas
? { ...transaction, gas: undefined }
? { ...transaction, gas: undefined, gasPrice: undefined }
: transaction;

estimation = await estimateGas(newTransactionObj);
Expand Down
Loading

0 comments on commit 442d840

Please sign in to comment.