Skip to content

Commit

Permalink
Merge branch 'develop' into MMASSETS-42
Browse files Browse the repository at this point in the history
  • Loading branch information
salimtb authored Oct 5, 2023
2 parents 3bb9360 + 945dc7f commit 85bb3da
Show file tree
Hide file tree
Showing 81 changed files with 3,191 additions and 591 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# The `removeAccount` method of some keyrings is async (e.g. `SnapKeyring`), so
# this patch makes the `KeyringController` await the account removal.
#
# In the future, we must make sure that all keyrings implement the same
# interface.
#
# See: https://github.com/MetaMask/KeyringController/pull/280
diff --git a/dist/KeyringController.js b/dist/KeyringController.js
index 3644209391f2cdf7ff5e2bd8f94517bff13b0f47..ed63d0ba4cb56df9fe3eb6b0a274f696375dd9dc 100644
--- a/dist/KeyringController.js
+++ b/dist/KeyringController.js
@@ -259,7 +259,7 @@ class KeyringController extends events_1.EventEmitter {
if (!keyring.removeAccount) {
throw new Error(constants_1.KeyringControllerError.UnsupportedRemoveAccount);
}
- keyring.removeAccount(address);
+ await keyring.removeAccount(address);
this.emit('removedAccount', address);
const accounts = await keyring.getAccounts();
// Check if this was the last/only account
4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ npmAuditIgnoreAdvisories:
# @types/webextension-polyfill
- 'webextension-polyfill-ts (deprecation)'

# Imported in @trezor/blockchain-link@npm:2.1.8, but not actually depended on
# by MetaMask
- 'ripple-lib (deprecation)'

npmRegistries:
'https://npm.pkg.github.com':
npmAlwaysAuth: true
Expand Down
34 changes: 34 additions & 0 deletions app/_locales/en/messages.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

112 changes: 112 additions & 0 deletions app/images/onboarding-mmi-pin-browser.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions app/scripts/controllers/detect-tokens.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ describe('DetectTokensController', function () {

const tokenListMessenger = new ControllerMessenger().getRestricted({
name: 'TokenListController',
allowedEvents: ['TokenListController:stateChange'],
});
tokenListController = new TokenListController({
chainId: toHex(1),
Expand Down Expand Up @@ -249,6 +250,11 @@ describe('DetectTokensController', function () {
networkControllerMessenger,
'NetworkController:stateChange',
),
onTokenListStateChange: (listener) =>
tokenListMessenger.subscribe(
`${tokenListController.name}:stateChange`,
listener,
),
});

assetsContractController = new AssetsContractController({
Expand Down Expand Up @@ -363,6 +369,7 @@ describe('DetectTokensController', function () {
aggregators: undefined,
image: undefined,
isERC721: undefined,
name: undefined,
},
]);

Expand All @@ -384,6 +391,7 @@ describe('DetectTokensController', function () {
aggregators: undefined,
image: undefined,
isERC721: undefined,
name: undefined,
},
]);
});
Expand Down Expand Up @@ -417,6 +425,7 @@ describe('DetectTokensController', function () {
aggregators: undefined,
image: undefined,
isERC721: undefined,
name: undefined,
},
]);
const tokenAddressToAdd = erc20ContractAddresses[1];
Expand All @@ -435,6 +444,7 @@ describe('DetectTokensController', function () {
aggregators: undefined,
image: undefined,
isERC721: undefined,
name: undefined,
},
{
address: toChecksumHexAddress(tokenAddressToAdd),
Expand All @@ -443,6 +453,7 @@ describe('DetectTokensController', function () {
aggregators: undefined,
image: undefined,
isERC721: undefined,
name: undefined,
},
]);
});
Expand Down
Loading

0 comments on commit 85bb3da

Please sign in to comment.