From 94235ff9c7928ad8b9b06e9e26af821e5b291492 Mon Sep 17 00:00:00 2001 From: MetaMask Bot Date: Thu, 3 Feb 2022 01:31:59 +0000 Subject: [PATCH 01/10] Version v10.10.0 --- CHANGELOG.md | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++- package.json | 2 +- 2 files changed, 90 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index aa9288a3c..f3f377306 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,93 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [10.10.0] +### Uncategorized +- Removing EIP_1559_V2 feature flag ([#13481](https://github.com/MetaMask/metamask-extension/pull/13481)) +- Sync `master` with `develop` ([#13492](https://github.com/MetaMask/metamask-extension/pull/13492)) +- Merge remote-tracking branch 'origin/develop' into master-sync +- Adding Brazilian Portuguese translation ([#13470](https://github.com/MetaMask/metamask-extension/pull/13470)) +- Feat/hide 0 balances ([#13306](https://github.com/MetaMask/metamask-extension/pull/13306)) +- Adding metrics events for EIP-1559 V2 flow ([#13329](https://github.com/MetaMask/metamask-extension/pull/13329)) +- Use ActionableMessage for ConfirmAddSuggestionToken warnings ([#13402](https://github.com/MetaMask/metamask-extension/pull/13402)) +- #10168 - Fix to Can't open settings if browser zoom level > 100% part 2 ([#13460](https://github.com/MetaMask/metamask-extension/pull/13460)) +- Bump cached-path-relative from 1.0.2 to 1.1.0 ([#13424](https://github.com/MetaMask/metamask-extension/pull/13424)) +- changed icon to button for connected-sites-list ([#13476](https://github.com/MetaMask/metamask-extension/pull/13476)) +- Avoid repeating CSS color vars ([#13464](https://github.com/MetaMask/metamask-extension/pull/13464)) +- Yet more NFT UX cleanups ([#13435](https://github.com/MetaMask/metamask-extension/pull/13435)) +- Add TextArea to safe components list ([#13468](https://github.com/MetaMask/metamask-extension/pull/13468)) +- Capturing default gas estimates in txMeta and passing it to metrics ([#13385](https://github.com/MetaMask/metamask-extension/pull/13385)) +- Fixed multiple-notifications css ([#13469](https://github.com/MetaMask/metamask-extension/pull/13469)) +- Bump node-fetch from 2.6.1 to 2.6.7 ([#13397](https://github.com/MetaMask/metamask-extension/pull/13397)) +- add resolution for simple-get ([#13471](https://github.com/MetaMask/metamask-extension/pull/13471)) +- EIP-1559 V2 UI/UX improvements ([#13419](https://github.com/MetaMask/metamask-extension/pull/13419)) +- Revert "#10168 - Fix to Can't open settings if browser zoom level > 100% (#13281)" ([#13281](https://github.com/MetaMask/metamask-extension/pull/13281)) +- Added `subjectType` to `setupProviderConnection` and `setupUntrustedCommunication` ([#13437](https://github.com/MetaMask/metamask-extension/pull/13437)) +- Removed memo status from snap-settings-card ([#13458](https://github.com/MetaMask/metamask-extension/pull/13458)) +- lavamoat - @lavamoat/allow-scripts v2 ([#13428](https://github.com/MetaMask/metamask-extension/pull/13428)) +- Up year in License ([#13330](https://github.com/MetaMask/metamask-extension/pull/13330)) +- added extension changes from snaps branch ([#13433](https://github.com/MetaMask/metamask-extension/pull/13433)) +- batch fix misspelling ([#13449](https://github.com/MetaMask/metamask-extension/pull/13449)) +- Enable buying MATIC on Polygon, BNB on BSC, AVAX on Avalanche, FTM on Fantom, CELO on Celo, and respective stablecoins on Transak ([#13398](https://github.com/MetaMask/metamask-extension/pull/13398)) +- Sync `master` with `develop` ([#13439](https://github.com/MetaMask/metamask-extension/pull/13439)) +- Fix policies +- Merge remote-tracking branch 'origin/develop' into master-sync +- Revert "Revert "New Crowdin translations by Github Action ([#13206](https://github.com/MetaMask/metamask-extension/pull/13206)) +- Fix className misspelling in `awaiting-swap.js ` +- More nft ux fixes ([#13388](https://github.com/MetaMask/metamask-extension/pull/13388)) +- EIP-1559 v2 - small fixes ([#13392](https://github.com/MetaMask/metamask-extension/pull/13392)) +- Move component into another folder ([#13380](https://github.com/MetaMask/metamask-extension/pull/13380)) +- Using new graph images for edit gas fee popover ([#13382](https://github.com/MetaMask/metamask-extension/pull/13382)) +- Bump @metamask/controllers from 25.0.0 to 25.1.0 ([#13399](https://github.com/MetaMask/metamask-extension/pull/13399)) +- Fix failing test:unit pipeline ([#13387](https://github.com/MetaMask/metamask-extension/pull/13387)) +- Update vulnerability ignore list ([#13390](https://github.com/MetaMask/metamask-extension/pull/13390)) +- Convert ConfirmAddSuggestedToken to a functional component + cleanup ([#13377](https://github.com/MetaMask/metamask-extension/pull/13377)) +- Feat: Label hardware wallets ([#13339](https://github.com/MetaMask/metamask-extension/pull/13339)) +- fix node-forge vulnerability ([#13389](https://github.com/MetaMask/metamask-extension/pull/13389)) +- Update phishing.html ([#13323](https://github.com/MetaMask/metamask-extension/pull/13323)) +- SRP copy-paste language ([#12012](https://github.com/MetaMask/metamask-extension/pull/12012)) +- Maintain leading whitespace in sig req window ([#13340](https://github.com/MetaMask/metamask-extension/pull/13340)) +- UI fixes in EIP-1559 V2 screens ([#13367](https://github.com/MetaMask/metamask-extension/pull/13367)) +- Fix for checkbox on advance gas fee modal ([#13366](https://github.com/MetaMask/metamask-extension/pull/13366)) +- Proper calculation of the gas limit ([#12784](https://github.com/MetaMask/metamask-extension/pull/12784)) +- Add German subtitles for SRP Video ([#13368](https://github.com/MetaMask/metamask-extension/pull/13368)) +- Fix typo in from-import-ui.spec.js ([#13369](https://github.com/MetaMask/metamask-extension/pull/13369)) +- NFT UX cleanup grab-bag ([#13352](https://github.com/MetaMask/metamask-extension/pull/13352)) +- Upgrade ganache - continued ([#13354](https://github.com/MetaMask/metamask-extension/pull/13354)) +- implement event fragments for tx controller ([#13331](https://github.com/MetaMask/metamask-extension/pull/13331)) +- Refactor currency input component and ensure currency toggle persists between settings ([#12813](https://github.com/MetaMask/metamask-extension/pull/12813)) +- Incorrect Rounding Down of Balance #10167 ([#13337](https://github.com/MetaMask/metamask-extension/pull/13337)) +- Update global link hover color from orange to blue (--Blue-400) ([#13344](https://github.com/MetaMask/metamask-extension/pull/13344)) +- Add modal with directions to re-add token as NFT ([#13291](https://github.com/MetaMask/metamask-extension/pull/13291)) +- Adding e2e test for edit gas fee modal ([#13303](https://github.com/MetaMask/metamask-extension/pull/13303)) +- Fixing warnings in unit test cases ([#13349](https://github.com/MetaMask/metamask-extension/pull/13349)) +- Create "inline" type for Button component ([#13304](https://github.com/MetaMask/metamask-extension/pull/13304)) +- Add error that redirects users to Import NFT page when they attempt to add an NFT on the Import Token page ([#13271](https://github.com/MetaMask/metamask-extension/pull/13271)) +- Adding support for EIP-1559 in E2E tests ([#13282](https://github.com/MetaMask/metamask-extension/pull/13282)) +- Fix issue with dapp suggested option being visible in edit gas fee popover even if dapp has no gas suggestion ([#13316](https://github.com/MetaMask/metamask-extension/pull/13316)) +- UpdateNickname story : convert knobs and actions to controls/args ([#13189](https://github.com/MetaMask/metamask-extension/pull/13189)) +- Fix token ordering: prioritize top before owned ([#13270](https://github.com/MetaMask/metamask-extension/pull/13270)) +- Box story: convert knobs to controls ([#13274](https://github.com/MetaMask/metamask-extension/pull/13274)) +- SendHeader, ContactListTab and AdvancedTab story: converted knobs and actions to controls / args ([#13230](https://github.com/MetaMask/metamask-extension/pull/13230)) +- Fix UI issues at top of confirm page container ([#13314](https://github.com/MetaMask/metamask-extension/pull/13314)) +- Fix manually connecting sites ([#13320](https://github.com/MetaMask/metamask-extension/pull/13320)) +- V10.9.0: Mainnet should have a capital `M` in the import token warning message ([#13310](https://github.com/MetaMask/metamask-extension/pull/13310)) +- V10.9.0: Disconnect all accounts flow ([#13309](https://github.com/MetaMask/metamask-extension/pull/13309)) +- use PAT for `GITHUB_TOKEN` ([#13307](https://github.com/MetaMask/metamask-extension/pull/13307)) +- fix send duck standard setting bug in updateSendAsset ([#13289](https://github.com/MetaMask/metamask-extension/pull/13289)) +- Typography stories : convert knobs and actions to controls / args ([#13220](https://github.com/MetaMask/metamask-extension/pull/13220)) +- use object.values to get array for iteration ([#13300](https://github.com/MetaMask/metamask-extension/pull/13300)) +- Improve first time flow css - select action ([#12799](https://github.com/MetaMask/metamask-extension/pull/12799)) +- Remove unnecessary Yarn resolution ([#13305](https://github.com/MetaMask/metamask-extension/pull/13305)) +- convert knobs and actions to controls / args ([#13203](https://github.com/MetaMask/metamask-extension/pull/13203)) +- Add resolution for follow-redirects ([#13301](https://github.com/MetaMask/metamask-extension/pull/13301)) +- Implement event fragments ([#12251](https://github.com/MetaMask/metamask-extension/pull/12251)) +- Flask devx fix ([#13280](https://github.com/MetaMask/metamask-extension/pull/13280)) +- #10168 - Fix to Can't open settings if browser zoom level > 100% ([#13281](https://github.com/MetaMask/metamask-extension/pull/13281)) +- Adding user setting option for EIP-1559 V2 ([#13242](https://github.com/MetaMask/metamask-extension/pull/13242)) +- Update Bug Report issue template ([#13267](https://github.com/MetaMask/metamask-extension/pull/13267)) +- Remove unused localized messages ([#13272](https://github.com/MetaMask/metamask-extension/pull/13272)) + ## [10.9.1] ### Fixed - Fixed application error when adding certain tokens ([#13484](https://github.com/MetaMask/metamask-extension/pull/13484)) @@ -2691,7 +2778,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Uncategorized - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.9.1...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.10.0...HEAD +[10.10.0]: https://github.com/MetaMask/metamask-extension/compare/v10.9.1...v10.10.0 [10.9.1]: https://github.com/MetaMask/metamask-extension/compare/v10.9.0...v10.9.1 [10.9.0]: https://github.com/MetaMask/metamask-extension/compare/v10.8.2...v10.9.0 [10.8.2]: https://github.com/MetaMask/metamask-extension/compare/v10.8.1...v10.8.2 diff --git a/package.json b/package.json index 3b950a139..029f255ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "metamask-crx", - "version": "10.9.1", + "version": "10.10.0", "private": true, "repository": { "type": "git", From 4bb4ab460c82120b72b68056671795ae534689a3 Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 10 Feb 2022 20:25:03 -0330 Subject: [PATCH 02/10] Update Changelog v10.10.0 (#13596) * Update Changelog v10.10.0 * Fix changelog lint Co-authored-by: ryanml --- CHANGELOG.md | 112 +++++++++++++-------------------------------------- 1 file changed, 27 insertions(+), 85 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e8f175b6..6efb5d05a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,91 +7,34 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] ## [10.10.0] -### Uncategorized -- Removing EIP_1559_V2 feature flag ([#13481](https://github.com/MetaMask/metamask-extension/pull/13481)) -- Sync `master` with `develop` ([#13492](https://github.com/MetaMask/metamask-extension/pull/13492)) -- Merge remote-tracking branch 'origin/develop' into master-sync -- Adding Brazilian Portuguese translation ([#13470](https://github.com/MetaMask/metamask-extension/pull/13470)) -- Feat/hide 0 balances ([#13306](https://github.com/MetaMask/metamask-extension/pull/13306)) -- Adding metrics events for EIP-1559 V2 flow ([#13329](https://github.com/MetaMask/metamask-extension/pull/13329)) -- Use ActionableMessage for ConfirmAddSuggestionToken warnings ([#13402](https://github.com/MetaMask/metamask-extension/pull/13402)) -- #10168 - Fix to Can't open settings if browser zoom level > 100% part 2 ([#13460](https://github.com/MetaMask/metamask-extension/pull/13460)) -- Bump cached-path-relative from 1.0.2 to 1.1.0 ([#13424](https://github.com/MetaMask/metamask-extension/pull/13424)) -- changed icon to button for connected-sites-list ([#13476](https://github.com/MetaMask/metamask-extension/pull/13476)) -- Avoid repeating CSS color vars ([#13464](https://github.com/MetaMask/metamask-extension/pull/13464)) -- Yet more NFT UX cleanups ([#13435](https://github.com/MetaMask/metamask-extension/pull/13435)) -- Add TextArea to safe components list ([#13468](https://github.com/MetaMask/metamask-extension/pull/13468)) -- Capturing default gas estimates in txMeta and passing it to metrics ([#13385](https://github.com/MetaMask/metamask-extension/pull/13385)) -- Fixed multiple-notifications css ([#13469](https://github.com/MetaMask/metamask-extension/pull/13469)) -- Bump node-fetch from 2.6.1 to 2.6.7 ([#13397](https://github.com/MetaMask/metamask-extension/pull/13397)) -- add resolution for simple-get ([#13471](https://github.com/MetaMask/metamask-extension/pull/13471)) -- EIP-1559 V2 UI/UX improvements ([#13419](https://github.com/MetaMask/metamask-extension/pull/13419)) -- Revert "#10168 - Fix to Can't open settings if browser zoom level > 100% (#13281)" ([#13281](https://github.com/MetaMask/metamask-extension/pull/13281)) -- Added `subjectType` to `setupProviderConnection` and `setupUntrustedCommunication` ([#13437](https://github.com/MetaMask/metamask-extension/pull/13437)) -- Removed memo status from snap-settings-card ([#13458](https://github.com/MetaMask/metamask-extension/pull/13458)) -- lavamoat - @lavamoat/allow-scripts v2 ([#13428](https://github.com/MetaMask/metamask-extension/pull/13428)) -- Up year in License ([#13330](https://github.com/MetaMask/metamask-extension/pull/13330)) -- added extension changes from snaps branch ([#13433](https://github.com/MetaMask/metamask-extension/pull/13433)) -- batch fix misspelling ([#13449](https://github.com/MetaMask/metamask-extension/pull/13449)) +### Added +- Enable toggle to turn on the new gas fee customization UI ([#13481](https://github.com/MetaMask/metamask-extension/pull/13481)) + - Select between new 'Low', 'Market', and 'Aggressive' gas options + - Improved advanced gas fee editing + - Adds the ability to save custom gas values as defaults + - More informative tooltips about suggested gas options + - More information about the status of the network - Enable buying MATIC on Polygon, BNB on BSC, AVAX on Avalanche, FTM on Fantom, CELO on Celo, and respective stablecoins on Transak ([#13398](https://github.com/MetaMask/metamask-extension/pull/13398)) -- Sync `master` with `develop` ([#13439](https://github.com/MetaMask/metamask-extension/pull/13439)) -- Fix policies -- Merge remote-tracking branch 'origin/develop' into master-sync -- Revert "Revert "New Crowdin translations by Github Action ([#13206](https://github.com/MetaMask/metamask-extension/pull/13206)) -- Fix className misspelling in `awaiting-swap.js ` -- More nft ux fixes ([#13388](https://github.com/MetaMask/metamask-extension/pull/13388)) -- EIP-1559 v2 - small fixes ([#13392](https://github.com/MetaMask/metamask-extension/pull/13392)) -- Move component into another folder ([#13380](https://github.com/MetaMask/metamask-extension/pull/13380)) -- Using new graph images for edit gas fee popover ([#13382](https://github.com/MetaMask/metamask-extension/pull/13382)) -- Bump @metamask/controllers from 25.0.0 to 25.1.0 ([#13399](https://github.com/MetaMask/metamask-extension/pull/13399)) -- Fix failing test:unit pipeline ([#13387](https://github.com/MetaMask/metamask-extension/pull/13387)) -- Update vulnerability ignore list ([#13390](https://github.com/MetaMask/metamask-extension/pull/13390)) -- Convert ConfirmAddSuggestedToken to a functional component + cleanup ([#13377](https://github.com/MetaMask/metamask-extension/pull/13377)) -- Feat: Label hardware wallets ([#13339](https://github.com/MetaMask/metamask-extension/pull/13339)) -- fix node-forge vulnerability ([#13389](https://github.com/MetaMask/metamask-extension/pull/13389)) -- Update phishing.html ([#13323](https://github.com/MetaMask/metamask-extension/pull/13323)) -- SRP copy-paste language ([#12012](https://github.com/MetaMask/metamask-extension/pull/12012)) -- Maintain leading whitespace in sig req window ([#13340](https://github.com/MetaMask/metamask-extension/pull/13340)) -- UI fixes in EIP-1559 V2 screens ([#13367](https://github.com/MetaMask/metamask-extension/pull/13367)) -- Fix for checkbox on advance gas fee modal ([#13366](https://github.com/MetaMask/metamask-extension/pull/13366)) -- Proper calculation of the gas limit ([#12784](https://github.com/MetaMask/metamask-extension/pull/12784)) - Add German subtitles for SRP Video ([#13368](https://github.com/MetaMask/metamask-extension/pull/13368)) -- Fix typo in from-import-ui.spec.js ([#13369](https://github.com/MetaMask/metamask-extension/pull/13369)) -- NFT UX cleanup grab-bag ([#13352](https://github.com/MetaMask/metamask-extension/pull/13352)) -- Upgrade ganache - continued ([#13354](https://github.com/MetaMask/metamask-extension/pull/13354)) -- implement event fragments for tx controller ([#13331](https://github.com/MetaMask/metamask-extension/pull/13331)) -- Refactor currency input component and ensure currency toggle persists between settings ([#12813](https://github.com/MetaMask/metamask-extension/pull/12813)) -- Incorrect Rounding Down of Balance #10167 ([#13337](https://github.com/MetaMask/metamask-extension/pull/13337)) -- Update global link hover color from orange to blue (--Blue-400) ([#13344](https://github.com/MetaMask/metamask-extension/pull/13344)) -- Add modal with directions to re-add token as NFT ([#13291](https://github.com/MetaMask/metamask-extension/pull/13291)) -- Adding e2e test for edit gas fee modal ([#13303](https://github.com/MetaMask/metamask-extension/pull/13303)) -- Fixing warnings in unit test cases ([#13349](https://github.com/MetaMask/metamask-extension/pull/13349)) -- Create "inline" type for Button component ([#13304](https://github.com/MetaMask/metamask-extension/pull/13304)) -- Add error that redirects users to Import NFT page when they attempt to add an NFT on the Import Token page ([#13271](https://github.com/MetaMask/metamask-extension/pull/13271)) -- Adding support for EIP-1559 in E2E tests ([#13282](https://github.com/MetaMask/metamask-extension/pull/13282)) -- Fix issue with dapp suggested option being visible in edit gas fee popover even if dapp has no gas suggestion ([#13316](https://github.com/MetaMask/metamask-extension/pull/13316)) -- UpdateNickname story : convert knobs and actions to controls/args ([#13189](https://github.com/MetaMask/metamask-extension/pull/13189)) -- Fix token ordering: prioritize top before owned ([#13270](https://github.com/MetaMask/metamask-extension/pull/13270)) -- Box story: convert knobs to controls ([#13274](https://github.com/MetaMask/metamask-extension/pull/13274)) -- SendHeader, ContactListTab and AdvancedTab story: converted knobs and actions to controls / args ([#13230](https://github.com/MetaMask/metamask-extension/pull/13230)) -- Fix UI issues at top of confirm page container ([#13314](https://github.com/MetaMask/metamask-extension/pull/13314)) -- Fix manually connecting sites ([#13320](https://github.com/MetaMask/metamask-extension/pull/13320)) -- V10.9.0: Mainnet should have a capital `M` in the import token warning message ([#13310](https://github.com/MetaMask/metamask-extension/pull/13310)) -- V10.9.0: Disconnect all accounts flow ([#13309](https://github.com/MetaMask/metamask-extension/pull/13309)) -- use PAT for `GITHUB_TOKEN` ([#13307](https://github.com/MetaMask/metamask-extension/pull/13307)) -- fix send duck standard setting bug in updateSendAsset ([#13289](https://github.com/MetaMask/metamask-extension/pull/13289)) -- Typography stories : convert knobs and actions to controls / args ([#13220](https://github.com/MetaMask/metamask-extension/pull/13220)) -- use object.values to get array for iteration ([#13300](https://github.com/MetaMask/metamask-extension/pull/13300)) -- Improve first time flow css - select action ([#12799](https://github.com/MetaMask/metamask-extension/pull/12799)) -- Remove unnecessary Yarn resolution ([#13305](https://github.com/MetaMask/metamask-extension/pull/13305)) -- convert knobs and actions to controls / args ([#13203](https://github.com/MetaMask/metamask-extension/pull/13203)) -- Add resolution for follow-redirects ([#13301](https://github.com/MetaMask/metamask-extension/pull/13301)) -- Implement event fragments ([#12251](https://github.com/MetaMask/metamask-extension/pull/12251)) -- Flask devx fix ([#13280](https://github.com/MetaMask/metamask-extension/pull/13280)) -- #10168 - Fix to Can't open settings if browser zoom level > 100% ([#13281](https://github.com/MetaMask/metamask-extension/pull/13281)) -- Adding user setting option for EIP-1559 V2 ([#13242](https://github.com/MetaMask/metamask-extension/pull/13242)) -- Update Bug Report issue template ([#13267](https://github.com/MetaMask/metamask-extension/pull/13267)) -- Remove unused localized messages ([#13272](https://github.com/MetaMask/metamask-extension/pull/13272)) +- Adding Brazilian Portuguese translation for some copy in Settings ([#13470](https://github.com/MetaMask/metamask-extension/pull/13470)) + +### Changed +- Hide 0 balance tokens in send screen dropdown if the "Hide Tokens Without Balance" toggle is on ([#13306](https://github.com/MetaMask/metamask-extension/pull/13306)) +- Change the 'Connected Sites' removal icon to a button ([#13476](https://github.com/MetaMask/metamask-extension/pull/13476)) +- Add specific hardware wallet names next to HW accounts in the account dropdown ([#13339](https://github.com/MetaMask/metamask-extension/pull/13339)) +- Update title of phishing.html ([#13323](https://github.com/MetaMask/metamask-extension/pull/13323)) +- Update language while importing an SRP to limit encouragement of copy-pasting seed phrases ([#12012](https://github.com/MetaMask/metamask-extension/pull/12012)) +- Maintain leading whitespace in for data to be signed in the signature request popup ([#13340](https://github.com/MetaMask/metamask-extension/pull/13340)) +- Update global link hover color from orange to blue ([#13344](https://github.com/MetaMask/metamask-extension/pull/13344)) +- Adjust ordering of tokens in the Swaps token dropdown ([#13270](https://github.com/MetaMask/metamask-extension/pull/13270)) + +### Fixed +- Ensure a correct update of the gas limit upon editing of a transaction recipient ([#12784](https://github.com/MetaMask/metamask-extension/pull/12784)) +- Ensure that the toggled display of currency in the send flow persists when editing a transaction ([#12813](https://github.com/MetaMask/metamask-extension/pull/12813)) +- Ensure settings can be opened if browser zoom level > 100% ([#13460](https://github.com/MetaMask/metamask-extension/pull/13460)) +- Ensure displayed balances of tokens are not incorrectly rounded down ([#13337](https://github.com/MetaMask/metamask-extension/pull/13337)) +- Improve visual spacing on the wallet selection flow of onboarding ([#12799](https://github.com/MetaMask/metamask-extension/pull/12799)) + ## [10.9.2] ### Fixed - Prevent errors on the swaps "View Quote" screen that can occur if the swaps API returns incorrect refund and max gas fees on some test networks ([#13511](https://github.com/MetaMask/metamask-extension/pull/13511)) @@ -2784,8 +2727,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added the ability to restore accounts from seed words. [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.10.0...HEAD -[10.10.0]: https://github.com/MetaMask/metamask-extension/compare/v10.9.1...v10.10.0 -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.9.2...HEAD +[10.10.0]: https://github.com/MetaMask/metamask-extension/compare/v10.9.2...v10.10.0 [10.9.2]: https://github.com/MetaMask/metamask-extension/compare/v10.9.1...v10.9.2 [10.9.1]: https://github.com/MetaMask/metamask-extension/compare/v10.9.0...v10.9.1 [10.9.0]: https://github.com/MetaMask/metamask-extension/compare/v10.8.2...v10.9.0 From 44cb377ec000855f0f928086e803b32be0d778ae Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Thu, 10 Feb 2022 13:54:36 -0330 Subject: [PATCH 03/10] Add resolution for engine.io, a nested dependency of 3box (#13589) --- package.json | 1 + yarn.lock | 40 ++++++++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 029f255ba..1c8fd9617 100644 --- a/package.json +++ b/package.json @@ -85,6 +85,7 @@ "3box/ipfs/prometheus-gc-stats/gc-stats/node-pre-gyp/tar": "^6.1.2", "3box/**/libp2p-crypto/node-forge": "^1.0.0", "3box/**/libp2p-keychain/node-forge": "^1.0.0", + "3box/ipfs/libp2p-webrtc-star/socket.io/engine.io": "^4.0.0", "analytics-node/axios": "^0.21.2", "ganache-core/lodash": "^4.17.21", "netmask": "^2.0.1", diff --git a/yarn.lock b/yarn.lock index c2c7fe226..3300bc9fb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8470,6 +8470,14 @@ core-util-is@1.0.2, core-util-is@~1.0.0: resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= +cors@~2.8.5: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-6.0.0.tgz#da4fee853c52f6b1e6935f41c1a2fc50bd4a9982" @@ -8954,10 +8962,10 @@ debug@3.2.6, debug@3.X, debug@^3.0.0, debug@^3.1.0, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== +debug@4, debug@^4.0.0, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.2.0, debug@^4.3.1, debug@^4.3.2, debug@~4.3.1: + version "4.3.3" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" + integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" @@ -10022,16 +10030,24 @@ engine.io-parser@~2.2.0: blob "0.0.5" has-binary2 "~1.0.2" -engine.io@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-3.5.0.tgz#9d6b985c8a39b1fe87cd91eb014de0552259821b" - integrity sha512-21HlvPUKaitDGE4GXNtQ7PLP0Sz4aWLddMPw2VTyFz1FVZqu/kZsJUO8WNpKuE/OCL7nkfRaOui2ZCJloGznGA== +engine.io-parser@~4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/engine.io-parser/-/engine.io-parser-4.0.3.tgz#83d3a17acfd4226f19e721bb22a1ee8f7662d2f6" + integrity sha512-xEAAY0msNnESNPc00e19y5heTPX4y/TJ36gr8t1voOaNmTojP9b3oK3BbJLFufW2XFPQaaijpFewm2g2Um3uqA== + dependencies: + base64-arraybuffer "0.1.4" + +engine.io@^4.0.0, engine.io@~3.5.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/engine.io/-/engine.io-4.1.2.tgz#f96ceb56d4b39cc7ca5bd29a20e9c99c1ad1a765" + integrity sha512-t5z6zjXuVLhXDMiFJPYsPOWEER8B0tIsD3ETgw19S1yg9zryvUfY3Vhtk3Gf4sihw/bQGIqQ//gjvVlu+Ca0bQ== dependencies: accepts "~1.3.4" base64id "2.0.0" cookie "~0.4.1" - debug "~4.1.0" - engine.io-parser "~2.2.0" + cors "~2.8.5" + debug "~4.3.1" + engine.io-parser "~4.0.0" ws "~7.4.2" enhanced-resolve@^4.5.0: @@ -19708,7 +19724,7 @@ obj-multiplex@^1.0.0: once "^1.4.0" readable-stream "^2.3.3" -object-assign@4.X, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: +object-assign@4.X, object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= @@ -26854,7 +26870,7 @@ varuint-bitcoin@^1.0.4, varuint-bitcoin@^1.1.2: dependencies: safe-buffer "^5.1.1" -vary@^1.1.2, vary@~1.1.2: +vary@^1, vary@^1.1.2, vary@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= From 64706c502190c812dcfa8545919a7bbe3968f30c Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Thu, 10 Feb 2022 13:27:29 -0500 Subject: [PATCH 04/10] Updating the direct deposit messages to native currency (#13576) --- app/_locales/am/messages.json | 6 --- app/_locales/ar/messages.json | 6 --- app/_locales/bg/messages.json | 6 --- app/_locales/bn/messages.json | 6 --- app/_locales/ca/messages.json | 6 --- app/_locales/cs/messages.json | 6 --- app/_locales/da/messages.json | 6 --- app/_locales/de/messages.json | 39 +++++++++++++++++-- app/_locales/el/messages.json | 6 --- app/_locales/en/messages.json | 8 ++-- app/_locales/es/messages.json | 6 --- app/_locales/es_419/messages.json | 8 ++-- app/_locales/et/messages.json | 6 --- app/_locales/fa/messages.json | 6 --- app/_locales/fi/messages.json | 6 --- app/_locales/fil/messages.json | 6 --- app/_locales/fr/messages.json | 6 --- app/_locales/he/messages.json | 6 --- app/_locales/hi/messages.json | 6 --- app/_locales/hn/messages.json | 6 --- app/_locales/hr/messages.json | 6 --- app/_locales/ht/messages.json | 6 --- app/_locales/hu/messages.json | 6 --- app/_locales/id/messages.json | 6 --- app/_locales/it/messages.json | 6 --- app/_locales/ja/messages.json | 6 --- app/_locales/kn/messages.json | 6 --- app/_locales/ko/messages.json | 6 --- app/_locales/lt/messages.json | 6 --- app/_locales/lv/messages.json | 6 --- app/_locales/ms/messages.json | 6 --- app/_locales/nl/messages.json | 6 --- app/_locales/no/messages.json | 6 --- app/_locales/ph/messages.json | 6 --- app/_locales/pl/messages.json | 6 --- app/_locales/pt/messages.json | 6 --- app/_locales/pt_BR/messages.json | 8 ++-- app/_locales/ro/messages.json | 6 --- app/_locales/ru/messages.json | 6 --- app/_locales/sk/messages.json | 6 --- app/_locales/sl/messages.json | 6 --- app/_locales/sr/messages.json | 6 --- app/_locales/sv/messages.json | 6 --- app/_locales/sw/messages.json | 6 --- app/_locales/ta/messages.json | 6 --- app/_locales/th/messages.json | 6 --- app/_locales/tl/messages.json | 6 --- app/_locales/tr/messages.json | 6 --- app/_locales/uk/messages.json | 6 --- app/_locales/vi/messages.json | 6 --- app/_locales/zh_CN/messages.json | 6 --- app/_locales/zh_TW/messages.json | 6 --- .../deposit-ether-modal.component.js | 4 +- 53 files changed, 47 insertions(+), 308 deletions(-) diff --git a/app/_locales/am/messages.json b/app/_locales/am/messages.json index 6c747ac6e..b957c16c4 100644 --- a/app/_locales/am/messages.json +++ b/app/_locales/am/messages.json @@ -286,12 +286,6 @@ "details": { "message": "ዝርዝሮች" }, - "directDepositEther": { - "message": "Ether በቀጥታ ያስቀምጡ" - }, - "directDepositEtherExplainer": { - "message": "ቀደም ሲል የተወሰነ Ether ካለዎት፣ በአዲሱ ቋትዎ Ether ለማግኘት ፈጣኑ መንገድ ቀጥተኛ ተቀማጭ ነው።" - }, "done": { "message": "ተጠናቅቋል" }, diff --git a/app/_locales/ar/messages.json b/app/_locales/ar/messages.json index b64d23ccb..05dcd23ce 100644 --- a/app/_locales/ar/messages.json +++ b/app/_locales/ar/messages.json @@ -303,12 +303,6 @@ "details": { "message": "التفاصيل" }, - "directDepositEther": { - "message": "إيداع مباشرة لعملة الأثير" - }, - "directDepositEtherExplainer": { - "message": "إذا كان لديك بالفعل بعض الأثير، فإن أسرع طريقة للحصول على الأثير في محفظتك الجديدة عن طريق الإيداع المباشر." - }, "done": { "message": "تم" }, diff --git a/app/_locales/bg/messages.json b/app/_locales/bg/messages.json index ee655931b..898167e0e 100644 --- a/app/_locales/bg/messages.json +++ b/app/_locales/bg/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Подробности" }, - "directDepositEther": { - "message": "Директно депозиране на етер" - }, - "directDepositEtherExplainer": { - "message": "Ако вече имате някакъв етер, най-бързият начин да получите етер в новия си портфейл е чрез директен депозит." - }, "done": { "message": "Готово" }, diff --git a/app/_locales/bn/messages.json b/app/_locales/bn/messages.json index df49e9050..c1106e23f 100644 --- a/app/_locales/bn/messages.json +++ b/app/_locales/bn/messages.json @@ -295,12 +295,6 @@ "details": { "message": "বিশদ বিবরণ" }, - "directDepositEther": { - "message": "সরাসরি ইথার জমা করুন" - }, - "directDepositEtherExplainer": { - "message": "আপনার ইতিমধ্যে কিছু ইথার থেকে থাকলে আপনার নতুন ওয়ালেটে ইথার পাওয়ার দ্রুততম উপায় হল সরাসরি জমা করা।" - }, "done": { "message": "সম্পন্ন " }, diff --git a/app/_locales/ca/messages.json b/app/_locales/ca/messages.json index bebf48582..75633f307 100644 --- a/app/_locales/ca/messages.json +++ b/app/_locales/ca/messages.json @@ -292,12 +292,6 @@ "details": { "message": "Detalls" }, - "directDepositEther": { - "message": "Diposita Ether directament" - }, - "directDepositEtherExplainer": { - "message": "Si ja tens una mica d'Ether, la manera més ràpida de posar Ether al teu nou moneder és per dipòsit directe." - }, "done": { "message": "Fet" }, diff --git a/app/_locales/cs/messages.json b/app/_locales/cs/messages.json index 45f437aee..ea156aee5 100644 --- a/app/_locales/cs/messages.json +++ b/app/_locales/cs/messages.json @@ -111,12 +111,6 @@ "details": { "message": "Podrobnosti" }, - "directDepositEther": { - "message": "Vložit Ether přímo" - }, - "directDepositEtherExplainer": { - "message": "Pokud už vlastníte nějaký Ether, nejrychleji ho dostanete do peněženky přímým vkladem." - }, "done": { "message": "Hotovo" }, diff --git a/app/_locales/da/messages.json b/app/_locales/da/messages.json index 4a45e5e43..9f6806dc7 100644 --- a/app/_locales/da/messages.json +++ b/app/_locales/da/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Detaljer" }, - "directDepositEther": { - "message": "Indskyd Ether direkte" - }, - "directDepositEtherExplainer": { - "message": "Hvis du allerede har Ether, er den hurtigste måde at få Ether i din nye tegnebog ved direkte indbetaling." - }, "done": { "message": "Færdig" }, diff --git a/app/_locales/de/messages.json b/app/_locales/de/messages.json index 19e5ecf54..633e9d7a0 100644 --- a/app/_locales/de/messages.json +++ b/app/_locales/de/messages.json @@ -283,11 +283,42 @@ "deleteNetworkDescription": { "message": "Sind Sie sicher, dass Sie dieses Netzwerk löschen möchten?" }, - "directDepositEther": { - "message": "Sofort Ether einzahlen" + "description": { + "message": "Beschreibung" }, - "directDepositEtherExplainer": { - "message": "Wenn du bereits Ether besitzt, ist die sofortige Einzahlung die schnellste Methode Ether in deine neue Wallet zu bekommen." + "details": { + "message": "Details" + }, + "disabledGasOptionToolTipMessage": { + "message": "“$1” ist deaktiviert, weil es nicht das Minimum einer zehnprozentigen Erhöhung gegenüber der ursprünglichen Gasgebühr erfüllt.", + "description": "$1 is gas estimate type which can be market or aggressive" + }, + "disconnect": { + "message": "Verbindung trennen" + }, + "disconnectAllAccounts": { + "message": "Alle Konten trennen" + }, + "disconnectAllAccountsConfirmationDescription": { + "message": "Sind Sie sicher, dass Sie die Verbindung trennen möchten? Sie könnten die Site-Funktionalität verlieren." + }, + "disconnectPrompt": { + "message": "$1 trennen" + }, + "disconnectThisAccount": { + "message": "Dieses Konto trennen" + }, + "dismiss": { + "message": "Verwerfen" + }, + "dismissReminderDescriptionField": { + "message": "Aktivieren Sie diese Option, um die Erinnerungsmeldung zur Sicherung des Geheime Wiederherstellungsphrase zu deaktivieren. Wir empfehlen Ihnen dringend, eine Sicherungskopie Ihrer Geheime Wiederherstellungsphrase zu erstellen, um den Verlust von Geldern zu vermeiden" + }, + "dismissReminderField": { + "message": "Erinnerung Geheime Wiederherstellungsphrase abweisen" + }, + "domain": { + "message": "Domäne" }, "done": { "message": "Fertig" diff --git a/app/_locales/el/messages.json b/app/_locales/el/messages.json index 84c2c8c6d..7fcf656d3 100644 --- a/app/_locales/el/messages.json +++ b/app/_locales/el/messages.json @@ -721,12 +721,6 @@ "details": { "message": "Λεπτομέρειες" }, - "directDepositEther": { - "message": "Απευθείας Κατάθεση Ether" - }, - "directDepositEtherExplainer": { - "message": "Αν έχετε ήδη κάποια Ether, ο πιο γρήγορος τρόπος για να πάρετε τα Ether στο νέο σας πορτοφόλι με άμεση κατάθεση." - }, "disconnect": { "message": "Αποσύνδεση" }, diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 9ee9a52a9..6c970be91 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -757,11 +757,11 @@ "details": { "message": "Details" }, - "directDepositEther": { - "message": "Directly Deposit Ether" + "directDepositCrypto": { + "message": "Directly Deposit $1" }, - "directDepositEtherExplainer": { - "message": "If you already have some Ether, the quickest way to get Ether in your new wallet by direct deposit." + "directDepositCryptoExplainer": { + "message": "If you already have some $1, the quickest way to get $1 in your new wallet by direct deposit." }, "disabledGasOptionToolTipMessage": { "message": "“$1” is disabled because it does not meet the minimum of a 10% increase from the original gas fee.", diff --git a/app/_locales/es/messages.json b/app/_locales/es/messages.json index 110ff0fee..dd4e8bf61 100644 --- a/app/_locales/es/messages.json +++ b/app/_locales/es/messages.json @@ -519,12 +519,6 @@ "details": { "message": "Detalles" }, - "directDepositEther": { - "message": "Depositar ether directamente" - }, - "directDepositEtherExplainer": { - "message": "Si ya tiene algunos ethers, la forma más rápida de tenerlos en la cartera nueva es mediante depósito directo." - }, "disconnect": { "message": "Desconectar" }, diff --git a/app/_locales/es_419/messages.json b/app/_locales/es_419/messages.json index 2d0b0c652..7c6703669 100644 --- a/app/_locales/es_419/messages.json +++ b/app/_locales/es_419/messages.json @@ -528,11 +528,9 @@ "details": { "message": "Detalles" }, - "directDepositEther": { - "message": "Depositar ether directamente" - }, - "directDepositEtherExplainer": { - "message": "Si ya tiene algunos ethers, la forma más rápida de tenerlos en la cartera nueva es mediante depósito directo." + "disabledGasOptionToolTipMessage": { + "message": "\"1$\" está desactivado porque no cumple el mínimo de un aumento del 10% respecto a la tarifa de gas original.", + "description": "$1 is gas estimate type which can be market or aggressive" }, "disconnect": { "message": "Desconectar" diff --git a/app/_locales/et/messages.json b/app/_locales/et/messages.json index 9e60e88de..ece38c7c2 100644 --- a/app/_locales/et/messages.json +++ b/app/_locales/et/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Üksikasjad" }, - "directDepositEther": { - "message": "Eetri otsene sissemakse" - }, - "directDepositEtherExplainer": { - "message": "Kui teil on juba veidi eetrit, on kiirem viis eetri rahakotti saamiseks otsene sissemakse." - }, "done": { "message": "Valmis" }, diff --git a/app/_locales/fa/messages.json b/app/_locales/fa/messages.json index 8f875e8f9..5a98de248 100644 --- a/app/_locales/fa/messages.json +++ b/app/_locales/fa/messages.json @@ -295,12 +295,6 @@ "details": { "message": "جزئیات" }, - "directDepositEther": { - "message": "پرداخت مستقیم ایتر" - }, - "directDepositEtherExplainer": { - "message": "در صورتیکه شما کدام ایتر داشته باشید، سریعترین روش برای گرفتن ایتر در کیف جدید تان توسط پرداخت مستقیم." - }, "done": { "message": "تمام" }, diff --git a/app/_locales/fi/messages.json b/app/_locales/fi/messages.json index ef644d7ba..2ecf88f27 100644 --- a/app/_locales/fi/messages.json +++ b/app/_locales/fi/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Tiedot" }, - "directDepositEther": { - "message": "Talleta etheriä suoraan" - }, - "directDepositEtherExplainer": { - "message": "Jos sinulla on jo etheriä, nopein tapa hankkia etheriä uuteen lompakkoosi on suoratalletus." - }, "done": { "message": "Valmis" }, diff --git a/app/_locales/fil/messages.json b/app/_locales/fil/messages.json index b712d7644..c2227ef84 100644 --- a/app/_locales/fil/messages.json +++ b/app/_locales/fil/messages.json @@ -271,12 +271,6 @@ "details": { "message": "Mga Detalye" }, - "directDepositEther": { - "message": "Direktang Magdeposito ng Ether" - }, - "directDepositEtherExplainer": { - "message": "Kung mayroon ka nang Ether, ang pinakamabilis na paraan para magkaroon ng Ether sa iyong bagong wallet ay sa pamamagitan ng direkang deposito." - }, "done": { "message": "Tapos na" }, diff --git a/app/_locales/fr/messages.json b/app/_locales/fr/messages.json index e27785877..c925c9708 100644 --- a/app/_locales/fr/messages.json +++ b/app/_locales/fr/messages.json @@ -721,12 +721,6 @@ "details": { "message": "Détails" }, - "directDepositEther": { - "message": "Dépôt direct d'Ether" - }, - "directDepositEtherExplainer": { - "message": "Si vous avez déjà de l'Ether, le moyen le plus rapide d'obtenir des Ether dans votre nouveau portefeuille est par dépôt direct." - }, "disconnect": { "message": "Déconnecter" }, diff --git a/app/_locales/he/messages.json b/app/_locales/he/messages.json index 5a8a936b3..733227dab 100644 --- a/app/_locales/he/messages.json +++ b/app/_locales/he/messages.json @@ -295,12 +295,6 @@ "details": { "message": "פרטים" }, - "directDepositEther": { - "message": "הפקד את'ר ישירות" - }, - "directDepositEtherExplainer": { - "message": "אם כבר יש ברשותך את'ר (Ether) , הדרך המהירה ביותר להכניס את'ר לארנק החדש שלך היא באמצעות הפקדה ישירה." - }, "done": { "message": "סיום" }, diff --git a/app/_locales/hi/messages.json b/app/_locales/hi/messages.json index 9dfa6f75b..f67679859 100644 --- a/app/_locales/hi/messages.json +++ b/app/_locales/hi/messages.json @@ -721,12 +721,6 @@ "details": { "message": "विवरण" }, - "directDepositEther": { - "message": "सीधे Ether जमा करें" - }, - "directDepositEtherExplainer": { - "message": "यदि आपके पास पहले से ही कुछ Ether है, तो सीधे जमा करना आपके नए वॉलेट में Ether पाने का सबसे तेज़ तरीका है।" - }, "disconnect": { "message": "डिस्कनेक्ट करें" }, diff --git a/app/_locales/hn/messages.json b/app/_locales/hn/messages.json index 82883518f..f4a87833b 100644 --- a/app/_locales/hn/messages.json +++ b/app/_locales/hn/messages.json @@ -87,12 +87,6 @@ "details": { "message": "संदेश विवरण" }, - "directDepositEther": { - "message": "सीधे ईथर जमा करें" - }, - "directDepositEtherExplainer": { - "message": "यदि आपके पास पहले से कुछ ईथर है, तो सीधे जमा द्वारा अपने नए बटुए में ईथर प्राप्त करने का तेज़ तरीका है।" - }, "done": { "message": "संपन्न" }, diff --git a/app/_locales/hr/messages.json b/app/_locales/hr/messages.json index ea8254d9d..d7aed7296 100644 --- a/app/_locales/hr/messages.json +++ b/app/_locales/hr/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Detalji" }, - "directDepositEther": { - "message": "Izravan polog Ether" - }, - "directDepositEtherExplainer": { - "message": "Ako imate nešto Ethera, najbrži je način prebacivanja Ethera u vaš novi novčanik izravan polog." - }, "done": { "message": "Gotovo" }, diff --git a/app/_locales/ht/messages.json b/app/_locales/ht/messages.json index 60edde94d..82f382c25 100644 --- a/app/_locales/ht/messages.json +++ b/app/_locales/ht/messages.json @@ -162,12 +162,6 @@ "details": { "message": "Detay yo" }, - "directDepositEther": { - "message": "Dirèkteman Depo Ether" - }, - "directDepositEtherExplainer": { - "message": "Si ou deja gen kèk Ether, fason ki pi rapid yo ka resevwa Ether nan nouvo Wallet ou pa depo dirèk." - }, "done": { "message": "Fini" }, diff --git a/app/_locales/hu/messages.json b/app/_locales/hu/messages.json index c13dcc19b..bb16bdb00 100644 --- a/app/_locales/hu/messages.json +++ b/app/_locales/hu/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Részletek" }, - "directDepositEther": { - "message": "Fizess be ethert közvetlenül" - }, - "directDepositEtherExplainer": { - "message": "Amennyiben már rendelkezik némi Ether-rel, a közvetlen letéttel gyorsan elhelyezheti azt új pénztárcájában." - }, "done": { "message": "Kész" }, diff --git a/app/_locales/id/messages.json b/app/_locales/id/messages.json index 6148f18f9..e1b0499eb 100644 --- a/app/_locales/id/messages.json +++ b/app/_locales/id/messages.json @@ -721,12 +721,6 @@ "details": { "message": "Detail" }, - "directDepositEther": { - "message": "Deposit Ether Secara Langsung" - }, - "directDepositEtherExplainer": { - "message": "Jika Anda sudah memiliki beberapa Ether, cara tercepat untuk mendapatkan Ether di dompet baru Anda adalah dengan deposit langsung." - }, "disconnect": { "message": "Putuskan koneksi" }, diff --git a/app/_locales/it/messages.json b/app/_locales/it/messages.json index 7bad7940d..806fb0d8a 100644 --- a/app/_locales/it/messages.json +++ b/app/_locales/it/messages.json @@ -453,12 +453,6 @@ "details": { "message": "Dettagli" }, - "directDepositEther": { - "message": "Deposita Direttamente Ether" - }, - "directDepositEtherExplainer": { - "message": "Se possiedi già degli Ether, questa è la via più veloce per aggiungere Ether al tuo portafoglio con un deposito diretto." - }, "disconnect": { "message": "Disconnetti" }, diff --git a/app/_locales/ja/messages.json b/app/_locales/ja/messages.json index b1fae7296..6ad6e024d 100644 --- a/app/_locales/ja/messages.json +++ b/app/_locales/ja/messages.json @@ -721,12 +721,6 @@ "details": { "message": "詳細" }, - "directDepositEther": { - "message": "Ether を直接入金" - }, - "directDepositEtherExplainer": { - "message": "Ether を既に所有している場合、Ether を新しいウォレットに入れる最短の方法は直接入金です。" - }, "disconnect": { "message": "接続解除" }, diff --git a/app/_locales/kn/messages.json b/app/_locales/kn/messages.json index 5126c5b97..e3f037ebc 100644 --- a/app/_locales/kn/messages.json +++ b/app/_locales/kn/messages.json @@ -295,12 +295,6 @@ "details": { "message": "ವಿವರಗಳು" }, - "directDepositEther": { - "message": "ಎಥರ್ ನೇರವಾಗಿ ಠೇವಣಿ ಮಾಡಿ" - }, - "directDepositEtherExplainer": { - "message": "ನೀವು ಈಗಾಗಲೇ ಕೆಲವು ಎಥರ್ ಹೊಂದಿದ್ದರೆ, ನೇರ ಠೇವಣಿ ಮೂಲಕ ನಿಮ್ಮ ಹೊಸ ವ್ಯಾಲೆಟ್‌ನಲ್ಲಿ ಎಥರ್ ಅನ್ನು ಪಡೆಯುವ ತ್ವರಿತ ಮಾರ್ಗ." - }, "done": { "message": "ಮುಗಿದಿದೆ" }, diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index 3cffd545f..3932e1207 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -721,12 +721,6 @@ "details": { "message": "세부 정보" }, - "directDepositEther": { - "message": "Ether 직접 예치" - }, - "directDepositEtherExplainer": { - "message": "Ether가 어느 정도 있다면 Ether를 새 지갑에 넣는 가장 빠른 방법은 직접 예치입니다." - }, "disconnect": { "message": "연결 해제" }, diff --git a/app/_locales/lt/messages.json b/app/_locales/lt/messages.json index 9a6df90fd..3edf3d762 100644 --- a/app/_locales/lt/messages.json +++ b/app/_locales/lt/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Išsami informacija" }, - "directDepositEther": { - "message": "Tiesiogiai įnešti eteriai" - }, - "directDepositEtherExplainer": { - "message": "Jeigu jau turite šiek tiek eterių, sparčiausias būdas gauti eterių į naują piniginę yra tiesioginis įnašas." - }, "done": { "message": "Atlikta" }, diff --git a/app/_locales/lv/messages.json b/app/_locales/lv/messages.json index fea8634a8..6be671cb6 100644 --- a/app/_locales/lv/messages.json +++ b/app/_locales/lv/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Informācija" }, - "directDepositEther": { - "message": "Tiešā Ether iemaksa" - }, - "directDepositEtherExplainer": { - "message": "Ja jums jau ir Ether, tad visātrāk Ether savā makā varat saņemt ar tiešo iemaksu." - }, "done": { "message": "Pabeigts" }, diff --git a/app/_locales/ms/messages.json b/app/_locales/ms/messages.json index af2f7244e..ffdb3b272 100644 --- a/app/_locales/ms/messages.json +++ b/app/_locales/ms/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Butiran" }, - "directDepositEther": { - "message": "Deposit Ether Secara Terus" - }, - "directDepositEtherExplainer": { - "message": "Jika anda sudah mempunyai Ether, cara paling cepat untuk mendapatkan Ether di dompet baru anda ialah dengan deposit langsung." - }, "done": { "message": "Selesai" }, diff --git a/app/_locales/nl/messages.json b/app/_locales/nl/messages.json index af0b7a014..ab7da6dbb 100644 --- a/app/_locales/nl/messages.json +++ b/app/_locales/nl/messages.json @@ -84,12 +84,6 @@ "decimalsMustZerotoTen": { "message": "Decimalen moeten minimaal 0 en niet meer dan 36 zijn." }, - "directDepositEther": { - "message": "Directe Ether storten" - }, - "directDepositEtherExplainer": { - "message": "Als je al wat Ether hebt, de snelste manier om Ether in je nieuwe portemonnee te krijgen door een directe storting." - }, "done": { "message": "Gedaan" }, diff --git a/app/_locales/no/messages.json b/app/_locales/no/messages.json index 4c17be907..59e9e8ee2 100644 --- a/app/_locales/no/messages.json +++ b/app/_locales/no/messages.json @@ -292,12 +292,6 @@ "details": { "message": "Detaljer" }, - "directDepositEther": { - "message": "Sett Ether direkte inn" - }, - "directDepositEtherExplainer": { - "message": "Hvis du allerede har noe Ether, er den raskeste måten å få Ether i den nye lommeboken din på ved hjelp av direkte innskudd." - }, "done": { "message": "Ferdig" }, diff --git a/app/_locales/ph/messages.json b/app/_locales/ph/messages.json index 5aff3d204..fac6a1689 100644 --- a/app/_locales/ph/messages.json +++ b/app/_locales/ph/messages.json @@ -522,12 +522,6 @@ "details": { "message": "Mga Detalye" }, - "directDepositEther": { - "message": "Direktang Mag-deposit ng Ether" - }, - "directDepositEtherExplainer": { - "message": "Kung mayroon ka nang ilang Ether, ang pinakamabilis na paraan para makakuha ng Ether sa bago mong wallet ay sa pamamagitan ng direktang pag-deposit." - }, "disconnect": { "message": "Idiskonekta" }, diff --git a/app/_locales/pl/messages.json b/app/_locales/pl/messages.json index 13a43808b..0f276e0a7 100644 --- a/app/_locales/pl/messages.json +++ b/app/_locales/pl/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Szczegóły" }, - "directDepositEther": { - "message": "Zdeponuj Eter bezpośrednio" - }, - "directDepositEtherExplainer": { - "message": "Jeśli już masz Eter, najszybciej umieścisz go w swoim nowym portfelu przy pomocy bezpośredniego depozytu." - }, "done": { "message": "Gotowe" }, diff --git a/app/_locales/pt/messages.json b/app/_locales/pt/messages.json index 55196d7b5..cb296c9c6 100644 --- a/app/_locales/pt/messages.json +++ b/app/_locales/pt/messages.json @@ -87,12 +87,6 @@ "details": { "message": "Detalhes" }, - "directDepositEther": { - "message": "Depositar Diretamente Ether" - }, - "directDepositEtherExplainer": { - "message": "Se já tem Ether, a forma mais rápida de ficar com Ether na sua carteira é através de depósito direto." - }, "done": { "message": "Finalizado" }, diff --git a/app/_locales/pt_BR/messages.json b/app/_locales/pt_BR/messages.json index d0570be1a..5d06469cd 100644 --- a/app/_locales/pt_BR/messages.json +++ b/app/_locales/pt_BR/messages.json @@ -525,11 +525,9 @@ "details": { "message": "Detalhes" }, - "directDepositEther": { - "message": "Depositar ether diretamente" - }, - "directDepositEtherExplainer": { - "message": "Se você já tiver alguns ethers, a forma mais rápida de colocar ethers na sua nova carteira é por depósito direto." + "disabledGasOptionToolTipMessage": { + "message": "“$1” está desativado porque não satisfaz o aumento mínimo de 10% em relação à taxa de gás original.", + "description": "$1 is gas estimate type which can be market or aggressive" }, "disconnect": { "message": "Desconectar" diff --git a/app/_locales/ro/messages.json b/app/_locales/ro/messages.json index 21fe2cafe..df3c11d38 100644 --- a/app/_locales/ro/messages.json +++ b/app/_locales/ro/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Detalii" }, - "directDepositEther": { - "message": "Depuneți direct Ether" - }, - "directDepositEtherExplainer": { - "message": "Dacă deja aveți Ether, cel mai rapid mod de a avea Ether în portofelul nou prin depunere directă." - }, "done": { "message": "Efectuat" }, diff --git a/app/_locales/ru/messages.json b/app/_locales/ru/messages.json index 94cf6bc5d..e3fc19a53 100644 --- a/app/_locales/ru/messages.json +++ b/app/_locales/ru/messages.json @@ -721,12 +721,6 @@ "details": { "message": "Детали" }, - "directDepositEther": { - "message": "Напрямую внести Ether" - }, - "directDepositEtherExplainer": { - "message": "Если у вас уже есть Ether, то это самый быстрый способ получить Ether в свой новый кошелек путем прямого депозита." - }, "disconnect": { "message": "Отключить" }, diff --git a/app/_locales/sk/messages.json b/app/_locales/sk/messages.json index 1b7217cad..8f0466125 100644 --- a/app/_locales/sk/messages.json +++ b/app/_locales/sk/messages.json @@ -289,12 +289,6 @@ "details": { "message": "Podrobnosti" }, - "directDepositEther": { - "message": "Vložit Ether přímo" - }, - "directDepositEtherExplainer": { - "message": "Pokud už vlastníte nějaký Ether, nejrychleji ho dostanete do peněženky přímým vkladem." - }, "done": { "message": "Hotovo" }, diff --git a/app/_locales/sl/messages.json b/app/_locales/sl/messages.json index 75ce873a5..47deb028a 100644 --- a/app/_locales/sl/messages.json +++ b/app/_locales/sl/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Podrobnosti" }, - "directDepositEther": { - "message": "Neposredno vplačilo ehera" - }, - "directDepositEtherExplainer": { - "message": "Če že imate Ether, ga lahko najhitreje dobite v MetaMask z neposrednim vplačilom." - }, "done": { "message": "Končano" }, diff --git a/app/_locales/sr/messages.json b/app/_locales/sr/messages.json index 7f6354378..27f26d60e 100644 --- a/app/_locales/sr/messages.json +++ b/app/_locales/sr/messages.json @@ -292,12 +292,6 @@ "details": { "message": "Детаљи" }, - "directDepositEther": { - "message": "Direktno deponujte Ether" - }, - "directDepositEtherExplainer": { - "message": "Ako već imate neki Ether, najbrži način da preuzmete Ether u svoj novi novčanik jeste direktnim deponovanjem." - }, "done": { "message": "Gotovo" }, diff --git a/app/_locales/sv/messages.json b/app/_locales/sv/messages.json index 22930ea92..10b4c77f9 100644 --- a/app/_locales/sv/messages.json +++ b/app/_locales/sv/messages.json @@ -289,12 +289,6 @@ "details": { "message": "Info" }, - "directDepositEther": { - "message": "Sätt in Ether direkt" - }, - "directDepositEtherExplainer": { - "message": "Om du redan har Ether är det snabbaste sättet att få Ether i din nya plånbok att göra en direktinsättning." - }, "done": { "message": "Klart" }, diff --git a/app/_locales/sw/messages.json b/app/_locales/sw/messages.json index 01ad96959..3b91187fd 100644 --- a/app/_locales/sw/messages.json +++ b/app/_locales/sw/messages.json @@ -289,12 +289,6 @@ "details": { "message": "Maelezo" }, - "directDepositEther": { - "message": "Weka Ether Moja kwa Moja" - }, - "directDepositEtherExplainer": { - "message": "Ikiwa tayari una sarafu kadhaa za Ether, njia rahisi ya kupata Ether kwenye waleti yako mpya kupitia kuweka moja kwa moja." - }, "done": { "message": "Imekamilika" }, diff --git a/app/_locales/ta/messages.json b/app/_locales/ta/messages.json index 45c32fe84..350df7fbb 100644 --- a/app/_locales/ta/messages.json +++ b/app/_locales/ta/messages.json @@ -132,12 +132,6 @@ "details": { "message": "விவரங்கள்" }, - "directDepositEther": { - "message": "நேரடியாக வைப்புத்தொகை" - }, - "directDepositEtherExplainer": { - "message": "நீங்கள் ஏற்கனவே ஏதெர் இருந்தால், நேரடி வைப்பு மூலம் உங்கள் புதிய பணப்பையில் ஈத்தர் பெற விரைவான வழி." - }, "done": { "message": "முடிந்தது" }, diff --git a/app/_locales/th/messages.json b/app/_locales/th/messages.json index 7cfafedd7..6a420610c 100644 --- a/app/_locales/th/messages.json +++ b/app/_locales/th/messages.json @@ -135,12 +135,6 @@ "details": { "message": "รายละเอียด" }, - "directDepositEther": { - "message": "ฝากอีเธอร์โดยตรง" - }, - "directDepositEtherExplainer": { - "message": "ถ้าคุณมีอีเธอร์อยู่แล้ววิธีการที่เร็วที่สุดในการเอาเงินเข้ากระเป๋าใหม่ก็คือการโอนตรงๆ" - }, "done": { "message": "เสร็จสิ้น" }, diff --git a/app/_locales/tl/messages.json b/app/_locales/tl/messages.json index 91d3afe05..a3ee49191 100644 --- a/app/_locales/tl/messages.json +++ b/app/_locales/tl/messages.json @@ -721,12 +721,6 @@ "details": { "message": "Mga Detalye" }, - "directDepositEther": { - "message": "Direktang Mag-deposit ng Ether" - }, - "directDepositEtherExplainer": { - "message": "Kung mayroon ka nang ilang Ether, ang pinakamabilis na paraan para makakuha ng Ether sa bago mong wallet ay sa pamamagitan ng direktang pag-deposit." - }, "disconnect": { "message": "Idiskonekta" }, diff --git a/app/_locales/tr/messages.json b/app/_locales/tr/messages.json index 664f13ee9..c9fd356b1 100644 --- a/app/_locales/tr/messages.json +++ b/app/_locales/tr/messages.json @@ -721,12 +721,6 @@ "details": { "message": "Ayrıntılar" }, - "directDepositEther": { - "message": "Direk Ether Yatırma" - }, - "directDepositEtherExplainer": { - "message": "Eğer çoktan Etheriniz varsa, yeni hesabınıza Ether aktarmanın en kolay yolu direk yatırmadır." - }, "disconnect": { "message": "Bağlantıyı kes" }, diff --git a/app/_locales/uk/messages.json b/app/_locales/uk/messages.json index 89c53568d..084c7ebdf 100644 --- a/app/_locales/uk/messages.json +++ b/app/_locales/uk/messages.json @@ -295,12 +295,6 @@ "details": { "message": "Деталі" }, - "directDepositEther": { - "message": "Внести безпосередньо Ефір" - }, - "directDepositEtherExplainer": { - "message": "Якщо ви вже маєте ефір, пряме переведення – найшвидший спосіб передати ефір у свій гаманець." - }, "done": { "message": "Готово" }, diff --git a/app/_locales/vi/messages.json b/app/_locales/vi/messages.json index 24d61f173..62404fd53 100644 --- a/app/_locales/vi/messages.json +++ b/app/_locales/vi/messages.json @@ -721,12 +721,6 @@ "details": { "message": "Chi tiết" }, - "directDepositEther": { - "message": "Nộp trực tiếp Ether" - }, - "directDepositEtherExplainer": { - "message": "Nếu bạn đã có một lượng Ether, cách nhanh nhất để chuyển Ether vào ví mới của bạn là nộp trực tiếp." - }, "disconnect": { "message": "Ngắt kết nối" }, diff --git a/app/_locales/zh_CN/messages.json b/app/_locales/zh_CN/messages.json index 42c8f7b6f..d2895c791 100644 --- a/app/_locales/zh_CN/messages.json +++ b/app/_locales/zh_CN/messages.json @@ -721,12 +721,6 @@ "details": { "message": "详情" }, - "directDepositEther": { - "message": "直接存入 Ether" - }, - "directDepositEtherExplainer": { - "message": "如果您已经有了一些 Ether,最快捷的方法就是直接向新钱包存入 Ether。" - }, "disconnect": { "message": "断开" }, diff --git a/app/_locales/zh_TW/messages.json b/app/_locales/zh_TW/messages.json index c662ad2e8..f7b078f75 100644 --- a/app/_locales/zh_TW/messages.json +++ b/app/_locales/zh_TW/messages.json @@ -295,12 +295,6 @@ "details": { "message": "詳情" }, - "directDepositEther": { - "message": "直接存入以太幣" - }, - "directDepositEtherExplainer": { - "message": "如果您已經擁有以太幣,直接存入功能是讓新錢包最快取得以太幣的方式。" - }, "done": { "message": "完成" }, diff --git a/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js index 399c3fb44..518e3b90a 100644 --- a/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js +++ b/ui/components/app/modals/deposit-ether-modal/deposit-ether-modal.component.js @@ -184,8 +184,8 @@ export default class DepositEtherModal extends Component { }} /> ), - title: t('directDepositEther'), - text: t('directDepositEtherExplainer'), + title: t('directDepositCrypto', [symbol]), + text: t('directDepositCryptoExplainer', [symbol]), buttonLabel: t('viewAccount'), onButtonClick: () => this.goToAccountDetailsModal(), })} From 95eefc96300d6ebe3fbf0574e1eb8d6c45ee4297 Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Thu, 10 Feb 2022 22:00:34 +0530 Subject: [PATCH 05/10] Adding check for transaction.id in useTransactionEventFragment hook (#13587) --- ui/hooks/useTransactionEventFragment.js | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/ui/hooks/useTransactionEventFragment.js b/ui/hooks/useTransactionEventFragment.js index 21ea11e6b..992d7625b 100644 --- a/ui/hooks/useTransactionEventFragment.js +++ b/ui/hooks/useTransactionEventFragment.js @@ -1,4 +1,4 @@ -import { useCallback, useEffect } from 'react'; +import { useCallback } from 'react'; import { useSelector } from 'react-redux'; import { useGasFeeContext } from '../contexts/gasFee'; @@ -18,23 +18,20 @@ export const useTransactionEventFragment = () => { }), ); - useEffect(() => { - if (!fragment && transaction) { - createTransactionEventFragment( - transaction.id, - TRANSACTION_EVENTS.APPROVED, - ); - } - }, [fragment, transaction]); - const updateTransactionEventFragment = useCallback( - (params) => { - if (!transaction) { + async (params) => { + if (!transaction || !transaction.id) { return; } + if (!fragment) { + await createTransactionEventFragment( + transaction.id, + TRANSACTION_EVENTS.APPROVED, + ); + } updateEventFragment(`transaction-added-${transaction.id}`, params); }, - [transaction], + [fragment, transaction], ); return { From aaca267a7b698253be4e1d2524b17bb518ff9559 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 10 Feb 2022 20:55:02 -0330 Subject: [PATCH 06/10] Update LavaMoat policy files These changes were generated by running `yarn lavamoat:auto` --- lavamoat/browserify/beta/policy.json | 1 - lavamoat/browserify/flask/policy.json | 1 - lavamoat/browserify/main/policy.json | 1 - lavamoat/build-system/policy.json | 201 -------------------------- 4 files changed, 204 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index 27fbf0195..0b8705b65 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -3649,7 +3649,6 @@ "document": true, "jQuery": true, "localStorage": true, - "location": true, "navigator": true, "postMessage": true, "removeEventListener": true, diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index 27fbf0195..0b8705b65 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -3649,7 +3649,6 @@ "document": true, "jQuery": true, "localStorage": true, - "location": true, "navigator": true, "postMessage": true, "removeEventListener": true, diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index 27fbf0195..0b8705b65 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -3649,7 +3649,6 @@ "document": true, "jQuery": true, "localStorage": true, - "location": true, "navigator": true, "postMessage": true, "removeEventListener": true, diff --git a/lavamoat/build-system/policy.json b/lavamoat/build-system/policy.json index 7d6167325..e95acc4d6 100644 --- a/lavamoat/build-system/policy.json +++ b/lavamoat/build-system/policy.json @@ -1052,16 +1052,6 @@ "buffer-equal": true } }, - "are-we-there-yet": { - "builtin": { - "events.EventEmitter": true, - "util.inherits": true - }, - "packages": { - "delegates": true, - "readable-stream": true - } - }, "arr-diff": { "packages": { "arr-flatten": true, @@ -1470,7 +1460,6 @@ "anymatch": true, "async-each": true, "braces": true, - "fsevents": true, "glob-parent": true, "inherits": true, "is-binary-path": true, @@ -1737,16 +1726,6 @@ "through2": true } }, - "detect-libc": { - "builtin": { - "child_process.spawnSync": true, - "fs.readdirSync": true, - "os.platform": true - }, - "globals": { - "process.env": true - } - }, "detective": { "packages": { "acorn-node": true, @@ -2450,45 +2429,6 @@ "process.version": true } }, - "fsevents": { - "builtin": { - "events.EventEmitter": true, - "fs.stat": true, - "path.join": true, - "util.inherits": true - }, - "globals": { - "__dirname": true, - "process.nextTick": true, - "process.platform": true, - "setImmediate": true - }, - "native": true, - "packages": { - "node-pre-gyp": true - } - }, - "gauge": { - "builtin": { - "util.format": true - }, - "globals": { - "clearInterval": true, - "process": true, - "setImmediate": true, - "setInterval": true - }, - "packages": { - "aproba": true, - "console-control-strings": true, - "has-unicode": true, - "object-assign": true, - "signal-exit": true, - "string-width": true, - "strip-ansi": true, - "wide-align": true - } - }, "get-assigned-identifiers": { "builtin": { "assert.equal": true @@ -2867,16 +2807,6 @@ "process.argv": true } }, - "has-unicode": { - "builtin": { - "os.type": true - }, - "globals": { - "process.env.LANG": true, - "process.env.LC_ALL": true, - "process.env.LC_CTYPE": true - } - }, "has-value": { "packages": { "get-value": true, @@ -3048,11 +2978,6 @@ "is-plain-object": true } }, - "is-fullwidth-code-point": { - "packages": { - "number-is-nan": true - } - }, "is-glob": { "packages": { "is-extglob": true @@ -3583,56 +3508,6 @@ "setTimeout": true } }, - "node-pre-gyp": { - "builtin": { - "events.EventEmitter": true, - "fs.existsSync": true, - "fs.readFileSync": true, - "fs.renameSync": true, - "path.dirname": true, - "path.existsSync": true, - "path.join": true, - "path.resolve": true, - "url.parse": true, - "url.resolve": true, - "util.inherits": true - }, - "globals": { - "__dirname": true, - "console.log": true, - "process.arch": true, - "process.cwd": true, - "process.env": true, - "process.platform": true, - "process.version.substr": true, - "process.versions": true - }, - "packages": { - "detect-libc": true, - "nopt": true, - "npmlog": true, - "rimraf": true, - "semver": true - } - }, - "nopt": { - "builtin": { - "path": true, - "stream.Stream": true, - "url": true - }, - "globals": { - "console": true, - "process.argv": true, - "process.env.DEBUG_NOPT": true, - "process.env.NOPT_DEBUG": true, - "process.platform": true - }, - "packages": { - "abbrev": true, - "osenv": true - } - }, "normalize-package-data": { "builtin": { "url.parse": true, @@ -3660,22 +3535,6 @@ "once": true } }, - "npmlog": { - "builtin": { - "events.EventEmitter": true, - "util": true - }, - "globals": { - "process.nextTick": true, - "process.stderr": true - }, - "packages": { - "are-we-there-yet": true, - "console-control-strings": true, - "gauge": true, - "set-blocking": true - } - }, "object-copy": { "packages": { "copy-descriptor": true, @@ -3757,54 +3616,6 @@ "readable-stream": true } }, - "os-homedir": { - "builtin": { - "os.homedir": true - }, - "globals": { - "process.env": true, - "process.getuid": true, - "process.platform": true - } - }, - "os-tmpdir": { - "globals": { - "process.env.SystemRoot": true, - "process.env.TEMP": true, - "process.env.TMP": true, - "process.env.TMPDIR": true, - "process.env.windir": true, - "process.platform": true - } - }, - "osenv": { - "builtin": { - "child_process.exec": true, - "path": true - }, - "globals": { - "process.env.COMPUTERNAME": true, - "process.env.ComSpec": true, - "process.env.EDITOR": true, - "process.env.HOSTNAME": true, - "process.env.PATH": true, - "process.env.PROMPT": true, - "process.env.PS1": true, - "process.env.Path": true, - "process.env.SHELL": true, - "process.env.USER": true, - "process.env.USERDOMAIN": true, - "process.env.USERNAME": true, - "process.env.VISUAL": true, - "process.env.path": true, - "process.nextTick": true, - "process.platform": true - }, - "packages": { - "os-homedir": true, - "os-tmpdir": true - } - }, "p-limit": { "packages": { "p-try": true @@ -4514,12 +4325,6 @@ "lru-cache": true } }, - "set-blocking": { - "globals": { - "process.stderr": true, - "process.stdout": true - } - }, "set-value": { "packages": { "extend-shallow": true, @@ -4783,7 +4588,6 @@ }, "string-width": { "packages": { - "code-point-at": true, "emoji-regex": true, "is-fullwidth-code-point": true, "strip-ansi": true @@ -5436,11 +5240,6 @@ "isexe": true } }, - "wide-align": { - "packages": { - "string-width": true - } - }, "write": { "builtin": { "fs.createWriteStream": true, From e49430f3d91d2a0759f3ddeffe2dd310d0f285c2 Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Fri, 11 Feb 2022 19:59:17 +0530 Subject: [PATCH 07/10] Fixes in EIP-1559 V2 implementation (#13574) * Fixes in EIP-1559 V2 implementation * Adding check for transaction.id in useTransactionEventFragment hook * Update ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js Co-authored-by: Alex Donesky * fix * fix * fix * fix * fix * fix build Co-authored-by: Dan J Miller Co-authored-by: Alex Donesky --- app/_locales/en/messages.json | 2 +- .../advanced-gas-fee-gas-limit.js | 4 +++- .../advanced-gas-fee-gas-limit.test.js | 9 +++++---- .../advanced-gas-fee-popover.test.js | 19 +++++++++++++++++++ .../context/advancedGasFeePopover.js | 4 +++- 5 files changed, 31 insertions(+), 7 deletions(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 6c970be91..7190f39af 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1659,7 +1659,7 @@ "message": "Low" }, "lowGasSettingToolTipMessage": { - "message": "Use $1 to wait for a cheaper price. Time estimates are much less accurate as prices are somewhat unpredicible.", + "message": "Use $1 to wait for a cheaper price. Time estimates are much less accurate as prices are somewhat unpredictable.", "description": "$1 is key 'low' separated here so that it can be passed in with bold fontweight" }, "lowLowercase": { diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js index c5e42146b..94359ce9a 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.js @@ -23,6 +23,7 @@ const AdvancedGasFeeGasLimit = () => { const t = useI18nContext(); const { setGasLimit: setGasLimitInContext, + setErrorValue, } = useAdvancedGasFeePopoverContext(); const { gasLimit: gasLimitInTransaction, @@ -40,7 +41,8 @@ const AdvancedGasFeeGasLimit = () => { setGasLimitInContext(gasLimit); const error = validateGasLimit(gasLimit, minimumGasLimitDec); setGasLimitError(error); - }, [gasLimit, minimumGasLimitDec, setGasLimitInContext]); + setErrorValue('gasLimit', error === 'editGasLimitOutOfBoundsV2'); + }, [gasLimit, minimumGasLimitDec, setGasLimitInContext, setErrorValue]); if (isEditing) { return ( diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.test.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.test.js index de913b08c..2605154a2 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.test.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-gas-limit/advanced-gas-fee-gas-limit.test.js @@ -5,6 +5,7 @@ import { GAS_ESTIMATE_TYPES } from '../../../../../shared/constants/gas'; import { renderWithProvider } from '../../../../../test/lib/render-helpers'; import mockEstimates from '../../../../../test/data/mock-estimates.json'; import mockState from '../../../../../test/data/mock-state.json'; +import { MAX_GAS_LIMIT_DEC } from '../../../../pages/send/send.constants'; import { GasFeeContextProvider } from '../../../../contexts/gasFee'; import configureStore from '../../../../store/store'; @@ -74,7 +75,7 @@ describe('AdvancedGasFeeGasLimit', () => { }); expect( screen.queryByText( - 'Gas limit must be greater than 20999 and less than 7920027', + `Gas limit must be greater than 20999 and less than ${MAX_GAS_LIMIT_DEC}`, ), ).toBeInTheDocument(); fireEvent.change(document.getElementsByTagName('input')[0], { @@ -82,7 +83,7 @@ describe('AdvancedGasFeeGasLimit', () => { }); expect( screen.queryByText( - 'Gas limit must be greater than 20999 and less than 7920027', + `Gas limit must be greater than 20999 and less than ${MAX_GAS_LIMIT_DEC}`, ), ).toBeInTheDocument(); fireEvent.change(document.getElementsByTagName('input')[0], { @@ -90,7 +91,7 @@ describe('AdvancedGasFeeGasLimit', () => { }); expect( screen.queryByText( - 'Gas limit must be greater than 20999 and less than 7920027', + `Gas limit must be greater than 20999 and less than ${MAX_GAS_LIMIT_DEC}`, ), ).not.toBeInTheDocument(); }); @@ -103,7 +104,7 @@ describe('AdvancedGasFeeGasLimit', () => { }); expect( screen.queryByText( - 'Gas limit must be greater than 29999 and less than 7920027', + `Gas limit must be greater than 29999 and less than ${MAX_GAS_LIMIT_DEC}`, ), ).toBeInTheDocument(); }); diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-popover.test.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-popover.test.js index 2a0f18ba5..493be3dea 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-popover.test.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-popover.test.js @@ -5,6 +5,7 @@ import { GAS_ESTIMATE_TYPES } from '../../../../shared/constants/gas'; import { renderWithProvider } from '../../../../test/lib/render-helpers'; import mockEstimates from '../../../../test/data/mock-estimates.json'; import mockState from '../../../../test/data/mock-state.json'; +import { MAX_GAS_LIMIT_DEC } from '../../../pages/send/send.constants'; import { GasFeeContextProvider } from '../../../contexts/gasFee'; import configureStore from '../../../store/store'; @@ -47,6 +48,7 @@ const render = () => { @@ -76,4 +78,21 @@ describe('AdvancedGasFeePopover', () => { }); expect(screen.queryByRole('button', { name: 'Save' })).toBeDisabled(); }); + + it('should disable save button if gas limit beyond range is entered', () => { + render(); + fireEvent.click(screen.queryByText('Edit')); + fireEvent.change(document.getElementsByTagName('input')[3], { + target: { value: 0 }, + }); + expect(screen.queryByRole('button', { name: 'Save' })).toBeDisabled(); + fireEvent.change(document.getElementsByTagName('input')[3], { + target: { value: 30000 }, + }); + expect(screen.queryByRole('button', { name: 'Save' })).not.toBeDisabled(); + fireEvent.change(document.getElementsByTagName('input')[3], { + target: { value: MAX_GAS_LIMIT_DEC + 1 }, + }); + expect(screen.queryByRole('button', { name: 'Save' })).toBeDisabled(); + }); }); diff --git a/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js b/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js index 55a6b49f1..780d2bcbb 100644 --- a/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js +++ b/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js @@ -10,6 +10,7 @@ export const AdvancedGasFeePopoverContextProvider = ({ children }) => { const [errors, setErrors] = useState({ maxFeePerGas: false, maxPriorityFeePerGas: false, + gasLimit: false, }); const setErrorValue = useCallback( @@ -26,7 +27,8 @@ export const AdvancedGasFeePopoverContextProvider = ({ children }) => { Date: Fri, 11 Feb 2022 13:35:43 -0800 Subject: [PATCH 08/10] Correct connection language (#13605) * Correct connection language Fixes #13604 Does not initiate transactions, but suggests them. * Update app/_locales/en/messages.json --- app/_locales/en/messages.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index 7190f39af..7dfa29c22 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -1086,7 +1086,7 @@ "message": "Backup gas price is provided as the main gas estimation service is unavailable right now." }, "eth_accounts": { - "message": "See address, account balance, activity and initiate transactions", + "message": "See address, account balance, activity and suggest transactions to approve", "description": "The description for the `eth_accounts` permission" }, "ethereumPublicAddress": { From c0d03ea70a2bbbd24331fa45cade95d5ca1c07d7 Mon Sep 17 00:00:00 2001 From: Jyoti Puri Date: Tue, 15 Feb 2022 00:37:46 +0530 Subject: [PATCH 09/10] Fix: advance defaults should never be used for swaps (#13617) --- app/scripts/controllers/transactions/index.js | 27 +++++++++++++++--- .../advanced-gas-fee-defaults.js | 4 +-- .../base-fee-input/base-fee-input.js | 15 ++++++++-- ...e-input.test.js => base-fee-input.test.js} | 28 ++++++++++++++++--- .../priority-fee-input/priority-fee-input.js | 9 ++++-- .../priority-fee-input.test.js | 24 ++++++++++++++-- .../context/advancedGasFeePopover.js | 1 + .../edit-gas-item/useGasItemFeeDetails.js | 2 +- ui/ducks/swaps/swaps.js | 7 ++++- ui/store/actions.js | 21 ++++++++------ 10 files changed, 111 insertions(+), 27 deletions(-) rename ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/{basefee-input.test.js => base-fee-input.test.js} (85%) diff --git a/app/scripts/controllers/transactions/index.js b/app/scripts/controllers/transactions/index.js index cddd0669a..be27febe3 100644 --- a/app/scripts/controllers/transactions/index.js +++ b/app/scripts/controllers/transactions/index.js @@ -55,6 +55,11 @@ const hstInterface = new ethers.utils.Interface(abi); const MAX_MEMSTORE_TX_LIST_SIZE = 100; // Number of transactions (by unique nonces) to keep in memory +const SWAP_TRANSACTION_TYPES = [ + TRANSACTION_TYPES.SWAP, + TRANSACTION_TYPES.SWAP_APPROVAL, +]; + /** * @typedef {import('../../../../shared/constants/transaction').TransactionMeta} TransactionMeta * @typedef {import('../../../../shared/constants/transaction').TransactionMetaMetricsEventString} TransactionMetaMetricsEventString @@ -337,9 +342,19 @@ export default class TransactionController extends EventEmitter { * * @param txParams * @param origin + * @param transactionType * @returns {txMeta} */ - async addUnapprovedTransaction(txParams, origin) { + async addUnapprovedTransaction(txParams, origin, transactionType) { + if ( + transactionType !== undefined && + !SWAP_TRANSACTION_TYPES.includes(transactionType) + ) { + throw new Error( + `TransactionController - invalid transactionType value: ${transactionType}`, + ); + } + // validate const normalizedTxParams = txUtils.normalizeTxParams(txParams); const eip1559Compatibility = await this.getEIP1559Compatibility(); @@ -381,7 +396,7 @@ export default class TransactionController extends EventEmitter { const { type, getCodeResponse } = await this._determineTransactionType( txParams, ); - txMeta.type = type; + txMeta.type = transactionType || type; // ensure value txMeta.txParams.value = txMeta.txParams.value @@ -444,7 +459,11 @@ export default class TransactionController extends EventEmitter { if (eip1559Compatibility) { const { eip1559V2Enabled } = this.preferencesStore.getState(); const advancedGasFeeDefaultValues = this.getAdvancedGasFee(); - if (eip1559V2Enabled && Boolean(advancedGasFeeDefaultValues)) { + if ( + eip1559V2Enabled && + Boolean(advancedGasFeeDefaultValues) && + !SWAP_TRANSACTION_TYPES.includes(txMeta.type) + ) { txMeta.userFeeLevel = CUSTOM_GAS_ESTIMATE; txMeta.txParams.maxFeePerGas = decGWEIToHexWEI( advancedGasFeeDefaultValues.maxBaseFee, @@ -461,7 +480,7 @@ export default class TransactionController extends EventEmitter { // then we set maxFeePerGas and maxPriorityFeePerGas to the suggested gasPrice. txMeta.txParams.maxFeePerGas = txMeta.txParams.gasPrice; txMeta.txParams.maxPriorityFeePerGas = txMeta.txParams.gasPrice; - if (eip1559V2Enabled) { + if (eip1559V2Enabled && txMeta.origin !== 'metamask') { txMeta.userFeeLevel = PRIORITY_LEVELS.DAPP_SUGGESTED; } else { txMeta.userFeeLevel = CUSTOM_GAS_ESTIMATE; diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js index 55a450090..cd21dd340 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-defaults/advanced-gas-fee-defaults.js @@ -23,7 +23,7 @@ const AdvancedGasFeeDefaults = () => { const t = useI18nContext(); const dispatch = useDispatch(); const { - hasErrors, + gasErrors, maxBaseFee, maxPriorityFeePerGas, } = useAdvancedGasFeePopoverContext(); @@ -86,7 +86,7 @@ const AdvancedGasFeeDefaults = () => { checked={isDefaultSettingsSelected} className="advanced-gas-fee-defaults__checkbox" onClick={handleUpdateDefaultSettings} - disabled={hasErrors} + disabled={gasErrors.maxFeePerGas || gasErrors.maxPriorityFeePerGas} /> {isDefaultSettingsSelected diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js index 2354faa84..00b7cc30b 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.js @@ -2,7 +2,10 @@ import React, { useCallback, useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import { HIGH_FEE_WARNING_MULTIPLIER } from '../../../../../pages/send/send.constants'; -import { PRIORITY_LEVELS } from '../../../../../../shared/constants/gas'; +import { + EDIT_GAS_MODES, + PRIORITY_LEVELS, +} from '../../../../../../shared/constants/gas'; import { SECONDARY } from '../../../../../helpers/constants/common'; import { bnGreaterThan, @@ -47,7 +50,12 @@ const validateBaseFee = (value, gasFeeEstimates, maxPriorityFeePerGas) => { const BaseFeeInput = () => { const t = useI18nContext(); - const { gasFeeEstimates, estimateUsed, maxFeePerGas } = useGasFeeContext(); + const { + gasFeeEstimates, + estimateUsed, + maxFeePerGas, + editGasMode, + } = useGasFeeContext(); const { maxPriorityFeePerGas, setErrorValue, @@ -68,7 +76,8 @@ const BaseFeeInput = () => { const [baseFee, setBaseFee] = useState(() => { if ( estimateUsed !== PRIORITY_LEVELS.CUSTOM && - advancedGasFeeValues?.maxBaseFee + advancedGasFeeValues?.maxBaseFee && + editGasMode !== EDIT_GAS_MODES.SWAPS ) { return advancedGasFeeValues.maxBaseFee; } diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/basefee-input.test.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.test.js similarity index 85% rename from ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/basefee-input.test.js rename to ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.test.js index 9663f561e..cf8268354 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/basefee-input.test.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/base-fee-input/base-fee-input.test.js @@ -1,7 +1,10 @@ import React from 'react'; import { fireEvent, screen } from '@testing-library/react'; -import { GAS_ESTIMATE_TYPES } from '../../../../../../shared/constants/gas'; +import { + EDIT_GAS_MODES, + GAS_ESTIMATE_TYPES, +} from '../../../../../../shared/constants/gas'; import { renderWithProvider } from '../../../../../../test/lib/render-helpers'; import mockEstimates from '../../../../../../test/data/mock-estimates.json'; import mockState from '../../../../../../test/data/mock-state.json'; @@ -20,7 +23,7 @@ jest.mock('../../../../../store/actions', () => ({ removePollingTokenFromAppState: jest.fn(), })); -const render = (txProps) => { +const render = (txProps, contextProps) => { const store = configureStore({ metamask: { ...mockState.metamask, @@ -43,6 +46,7 @@ const render = (txProps) => { userFeeLevel: 'custom', ...txProps, }} + {...contextProps} > @@ -56,17 +60,33 @@ describe('BaseFeeInput', () => { it('should renders advancedGasFee.baseFee value if current estimate used is not custom', () => { render({ userFeeLevel: 'high', + txParams: { + maxFeePerGas: '0x2E90EDD000', + }, }); expect(document.getElementsByTagName('input')[0]).toHaveValue(100); }); + it('should not advancedGasFee.baseFee value for swaps', () => { + render( + { + userFeeLevel: 'high', + txParams: { + maxFeePerGas: '0x2E90EDD000', + }, + }, + { editGasMode: EDIT_GAS_MODES.SWAPS }, + ); + expect(document.getElementsByTagName('input')[0]).toHaveValue(200); + }); + it('should renders baseFee values from transaction if current estimate used is custom', () => { render({ txParams: { - maxFeePerGas: '0x174876E800', + maxFeePerGas: '0x2E90EDD000', }, }); - expect(document.getElementsByTagName('input')[0]).toHaveValue(100); + expect(document.getElementsByTagName('input')[0]).toHaveValue(200); }); it('should show current value of estimatedBaseFee in subtext', () => { render({ diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js index b4f277070..de223da10 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.js @@ -2,7 +2,10 @@ import React, { useEffect, useState } from 'react'; import { useSelector } from 'react-redux'; import { HIGH_FEE_WARNING_MULTIPLIER } from '../../../../../pages/send/send.constants'; -import { PRIORITY_LEVELS } from '../../../../../../shared/constants/gas'; +import { + EDIT_GAS_MODES, + PRIORITY_LEVELS, +} from '../../../../../../shared/constants/gas'; import { SECONDARY } from '../../../../../helpers/constants/common'; import { decGWEIToHexWEI } from '../../../../../helpers/utils/conversions.util'; import { getAdvancedGasFeeValues } from '../../../../../selectors'; @@ -49,6 +52,7 @@ const PriorityFeeInput = () => { setMaxPriorityFeePerGas, } = useAdvancedGasFeePopoverContext(); const { + editGasMode, estimateUsed, gasFeeEstimates, maxPriorityFeePerGas, @@ -63,7 +67,8 @@ const PriorityFeeInput = () => { const [priorityFee, setPriorityFee] = useState(() => { if ( estimateUsed !== PRIORITY_LEVELS.CUSTOM && - advancedGasFeeValues?.priorityFee + advancedGasFeeValues?.priorityFee && + editGasMode !== EDIT_GAS_MODES.SWAPS ) { return advancedGasFeeValues.priorityFee; } diff --git a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.test.js b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.test.js index 19413c231..91b875ea8 100644 --- a/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.test.js +++ b/ui/components/app/advanced-gas-fee-popover/advanced-gas-fee-inputs/priority-fee-input/priority-fee-input.test.js @@ -1,7 +1,10 @@ import React from 'react'; import { fireEvent, screen } from '@testing-library/react'; -import { GAS_ESTIMATE_TYPES } from '../../../../../../shared/constants/gas'; +import { + EDIT_GAS_MODES, + GAS_ESTIMATE_TYPES, +} from '../../../../../../shared/constants/gas'; import { renderWithProvider } from '../../../../../../test/lib/render-helpers'; import mockEstimates from '../../../../../../test/data/mock-estimates.json'; import mockState from '../../../../../../test/data/mock-state.json'; @@ -20,7 +23,7 @@ jest.mock('../../../../../store/actions', () => ({ removePollingTokenFromAppState: jest.fn(), })); -const render = (txProps) => { +const render = (txProps, contextProps) => { const store = configureStore({ metamask: { ...mockState.metamask, @@ -43,6 +46,7 @@ const render = (txProps) => { userFeeLevel: 'custom', ...txProps, }} + {...contextProps} > @@ -56,10 +60,26 @@ describe('PriorityfeeInput', () => { it('should renders advancedGasFee.priorityfee value if current estimate used is not custom', () => { render({ userFeeLevel: 'high', + txParams: { + maxFeePerGas: '0x2E90EDD000', + }, }); expect(document.getElementsByTagName('input')[0]).toHaveValue(100); }); + it('should not advancedGasFee.baseFee value for swaps', () => { + render( + { + userFeeLevel: 'high', + txParams: { + maxFeePerGas: '0x2E90EDD000', + }, + }, + { editGasMode: EDIT_GAS_MODES.SWAPS }, + ); + expect(document.getElementsByTagName('input')[0]).toHaveValue(200); + }); + it('should renders priorityfee value from transaction if current estimate used is custom', () => { render({ txParams: { diff --git a/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js b/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js index 780d2bcbb..559b8638f 100644 --- a/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js +++ b/ui/components/app/advanced-gas-fee-popover/context/advancedGasFeePopover.js @@ -29,6 +29,7 @@ export const AdvancedGasFeePopoverContextProvider = ({ children }) => { gasLimit, hasErrors: errors.maxFeePerGas || errors.maxPriorityFeePerGas || errors.gasLimit, + gasErrors: errors, maxFeePerGas, maxPriorityFeePerGas, setErrorValue, diff --git a/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js b/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js index a234e50a2..983b260a2 100644 --- a/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js +++ b/ui/components/app/edit-gas-fee-popover/edit-gas-item/useGasItemFeeDetails.js @@ -58,7 +58,7 @@ export const useGasItemFeeDetails = (priorityLevel) => { if (estimateUsed === PRIORITY_LEVELS.CUSTOM) { maxFeePerGas = maxFeePerGasValue; maxPriorityFeePerGas = maxPriorityFeePerGasValue; - } else if (advancedGasFeeValues) { + } else if (advancedGasFeeValues && editGasMode !== EDIT_GAS_MODES.SWAPS) { maxFeePerGas = advancedGasFeeValues.maxBaseFee; maxPriorityFeePerGas = advancedGasFeeValues.priorityFee; } diff --git a/ui/ducks/swaps/swaps.js b/ui/ducks/swaps/swaps.js index 8923574fb..7ad50192f 100644 --- a/ui/ducks/swaps/swaps.js +++ b/ui/ducks/swaps/swaps.js @@ -857,6 +857,7 @@ export const signAndSendTransactions = (history, metaMetricsEvent) => { addUnapprovedTransaction( { ...approveTxParams, amount: '0x0' }, 'metamask', + TRANSACTION_TYPES.SWAP_APPROVAL, ), ); await dispatch(setApproveTxId(approveTxMeta.id)); @@ -881,7 +882,11 @@ export const signAndSendTransactions = (history, metaMetricsEvent) => { } const tradeTxMeta = await dispatch( - addUnapprovedTransaction(usedTradeTxParams, 'metamask'), + addUnapprovedTransaction( + usedTradeTxParams, + 'metamask', + TRANSACTION_TYPES.SWAP, + ), ); dispatch(setTradeTxId(tradeTxMeta.id)); diff --git a/ui/store/actions.js b/ui/store/actions.js index 5500cfbd1..2b7e7ba46 100644 --- a/ui/store/actions.js +++ b/ui/store/actions.js @@ -698,18 +698,23 @@ export function updateTransaction(txData, dontShowLoadingIndicator) { }; } -export function addUnapprovedTransaction(txParams, origin) { +export function addUnapprovedTransaction(txParams, origin, type) { log.debug('background.addUnapprovedTransaction'); return () => { return new Promise((resolve, reject) => { - background.addUnapprovedTransaction(txParams, origin, (err, txMeta) => { - if (err) { - reject(err); - return; - } - resolve(txMeta); - }); + background.addUnapprovedTransaction( + txParams, + origin, + type, + (err, txMeta) => { + if (err) { + reject(err); + return; + } + resolve(txMeta); + }, + ); }); }; } From e069c5a9606ced0f21b594536d680a4b9d0bd021 Mon Sep 17 00:00:00 2001 From: ryanml Date: Wed, 16 Feb 2022 10:49:52 -0700 Subject: [PATCH 10/10] Fix changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 706f38f8b..31faba3db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ensure settings can be opened if browser zoom level > 100% ([#13460](https://github.com/MetaMask/metamask-extension/pull/13460)) - Ensure displayed balances of tokens are not incorrectly rounded down ([#13337](https://github.com/MetaMask/metamask-extension/pull/13337)) - Improve visual spacing on the wallet selection flow of onboarding ([#12799](https://github.com/MetaMask/metamask-extension/pull/12799)) + ## [10.9.3] ### Fixed - Allow for scrolling when sign type data message is too long ([#13642](https://github.com/MetaMask/metamask-extension/pull/13642)) @@ -2731,8 +2732,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added the ability to restore accounts from seed words. [Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.10.0...HEAD -[10.10.0]: https://github.com/MetaMask/metamask-extension/compare/v10.9.2...v10.10.0 -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.9.3...HEAD +[10.10.0]: https://github.com/MetaMask/metamask-extension/compare/v10.9.3...v10.10.0 [10.9.3]: https://github.com/MetaMask/metamask-extension/compare/v10.9.2...v10.9.3 [10.9.2]: https://github.com/MetaMask/metamask-extension/compare/v10.9.1...v10.9.2 [10.9.1]: https://github.com/MetaMask/metamask-extension/compare/v10.9.0...v10.9.1