Skip to content

Commit

Permalink
Merge branch 'ppom_updates' of github.com:MetaMask/metamask-extension…
Browse files Browse the repository at this point in the history
… into ppom_updates
  • Loading branch information
jpuri committed Jul 24, 2023
2 parents 725a385 + 0449ff1 commit f331039
Show file tree
Hide file tree
Showing 376 changed files with 4,259 additions and 6,306 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,8 @@ module.exports = {
// upgrading eslint and dependencies. This rule should be evaluated and
// if agreeable turned on upstream in @metamask/eslint-config
'import/no-named-as-default-member': 'off',

// This is necessary to run eslint on Windows and not get a thousand CRLF errors
'prettier/prettier': ['error', { endOfLine: 'auto' }],
},
};
8 changes: 0 additions & 8 deletions .iyarc
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# improved-yarn-audit advisory exclusions
GHSA-257v-vj4p-3w2h

# request library is subject to SSRF.
# addressed by temporary patch in .yarn/patches/request-npm-2.88.2-f4a57c72c4.patch
GHSA-p8p7-x288-28g6

# Prototype pollution
# Not easily patched
# Minimal risk to us because we're using lockdown which also prevents this case of prototype pollution
GHSA-h755-8qp9-cq85

# tough-cookie
# this will go away soon when we get rid of web3-provider-engine
GHSA-72xf-g2v4-qvf3
3 changes: 3 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# All of these are defaults except singleQuote and endOfLine, but we specify them
# for explicitness
endOfLine: auto
singleQuote: true
trailingComma: all

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/dist/SignatureController.js b/dist/SignatureController.js
index a2f064efa2a2700db00767daa4ce6bd22b1932c4..17edb51b6c526f27fb4c19f2d2fda3d7140c66b4 100644
--- a/dist/SignatureController.js
+++ b/dist/SignatureController.js
@@ -283,8 +283,11 @@ _SignatureController_keyringController = new WeakMap(), _SignatureController_isE
resultCallbacks = acceptResult.resultCallbacks;
}
catch (_a) {
+ signaturePromise.catch(() => {
+ // Expecting reject error but throwing manually rather than waiting
+ });
__classPrivateFieldGet(this, _SignatureController_instances, "m", _SignatureController_cancelAbstractMessage).call(this, messageManager, messageId);
- throw eth_rpc_errors_1.ethErrors.provider.userRejectedRequest('User rejected the request.');
+ throw eth_rpc_errors_1.ethErrors.provider.userRejectedRequest(`MetaMask ${messageName} Signature: User denied message signature.`);
}
yield signMessage(messageParamsWithId, signingOpts);
const signatureResult = yield signaturePromise;
@@ -305,7 +308,7 @@ _SignatureController_keyringController = new WeakMap(), _SignatureController_isE
return __awaiter(this, void 0, void 0, function* () {
return yield __classPrivateFieldGet(this, _SignatureController_instances, "m", _SignatureController_signAbstractMessage).call(this, __classPrivateFieldGet(this, _SignatureController_personalMessageManager, "f"), controller_utils_1.ApprovalType.PersonalSign, msgParams, (cleanMsgParams) => __awaiter(this, void 0, void 0, function* () { return yield __classPrivateFieldGet(this, _SignatureController_keyringController, "f").signPersonalMessage(cleanMsgParams); }));
});
-}, _SignatureController_signTypedMessage = function _SignatureController_signTypedMessage(msgParams,
+}, _SignatureController_signTypedMessage = function _SignatureController_signTypedMessage(msgParams,
/* istanbul ignore next */
opts = { parseJsonData: true }) {
return __awaiter(this, void 0, void 0, function* () {
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [10.34.0]
### Added
- Add a security quiz to the SRP reveal ([#19283](https://github.com/MetaMask/metamask-extension/pull/19283))
- [FLASK] Add Snaps keyring and new snap accounts related pages ([#19710](https://github.com/MetaMask/metamask-extension/pull/19710))


### Changed
- Decrease boldness of text in some labels ([#19731](https://github.com/MetaMask/metamask-extension/pull/19731))

### Fixed
- Fix design inconsistencies in the connect flow ([#19800](https://github.com/MetaMask/metamask-extension/pull/19800))
- Fix connection issues on some dapps, and ensure that `eth_requestAccount` returns accounts when opening multiple tabs for the same dapp ([#19727](https://github.com/MetaMask/metamask-extension/pull/19727))
- Fix UI bugs in contacts page ([#19646](https://github.com/MetaMask/metamask-extension/pull/19646))
- Ensure correct logo shown on Linea ([#19717](https://github.com/MetaMask/metamask-extension/pull/19717))
- Fix the autolock field in settings on firefox ([#19653](https://github.com/MetaMask/metamask-extension/pull/19653))
- Prevent duplicate account names that only differ by letter casing ([#19616](https://github.com/MetaMask/metamask-extension/pull/19616))
- Ensure token details stay within asset dropdown border ([#19626](https://github.com/MetaMask/metamask-extension/pull/19626))
- Prevent rounded corners in account menu ([#19615](https://github.com/MetaMask/metamask-extension/pull/19615))
- Ensure network changes before the user accepts a wallet_watchAsset request add the NFT to pre-change chain ID and address ([#19629](https://github.com/MetaMask/metamask-extension/pull/19629))
- Fix performance degradations noticable on Firefox builds ([#19993](https://github.com/MetaMask/metamask-extension/pull/19993))
- Fix copy to clipboard of public address, so that it is only cleared from the clipboard after 60 seconds ([#19948](https://github.com/MetaMask/metamask-extension/pull/19948))
- Fix overlapping text, in some language, in home screen buttons ([#19920](https://github.com/MetaMask/metamask-extension/pull/19920))


## [10.33.1]
### Fixed
- Fix to bug causing users to see an infinite spinner when signing typed messages. ([#19894](https://github.com/MetaMask/metamask-extension/pull/19894))
Expand Down Expand Up @@ -3829,7 +3853,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.33.1...HEAD
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v10.34.0...HEAD
[10.34.0]: https://github.com/MetaMask/metamask-extension/compare/v10.33.1...v10.34.0
[10.33.1]: https://github.com/MetaMask/metamask-extension/compare/v10.33.0...v10.33.1
[10.33.0]: https://github.com/MetaMask/metamask-extension/compare/v10.32.0...v10.33.0
[10.32.0]: https://github.com/MetaMask/metamask-extension/compare/v10.31.1...v10.32.0
Expand Down
112 changes: 31 additions & 81 deletions app/_locales/en/messages.json

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

41 changes: 28 additions & 13 deletions app/scripts/controllers/incoming-transactions.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,15 +135,12 @@ export default class IncomingTransactionsController {
}

start() {
const { featureFlags = {} } = this.preferencesController.store.getState();
const { showIncomingTransactions } = featureFlags;
const chainId = this.getCurrentChainId();

if (!showIncomingTransactions) {
return;
if (this._allowedToMakeFetchIncomingTx(chainId)) {
this.blockTracker.removeListener('latest', this._onLatestBlock);
this.blockTracker.addListener('latest', this._onLatestBlock);
}

this.blockTracker.removeListener('latest', this._onLatestBlock);
this.blockTracker.addListener('latest', this._onLatestBlock);
}

stop() {
Expand All @@ -161,13 +158,9 @@ export default class IncomingTransactionsController {
* @param {number} [newBlockNumberDec] - block number to begin fetching from
*/
async _update(address, newBlockNumberDec) {
const { completedOnboarding } = this.onboardingController.store.getState();
const chainId = this.getCurrentChainId();
if (
!Object.hasOwnProperty.call(ETHERSCAN_SUPPORTED_NETWORKS, chainId) ||
!address ||
!completedOnboarding
) {

if (!address || !this._allowedToMakeFetchIncomingTx(chainId)) {
return;
}
try {
Expand Down Expand Up @@ -302,4 +295,26 @@ export default class IncomingTransactionsController {
type: TransactionType.incoming,
};
}

/**
* @param chainId - {string} The chainId of the current network
* @returns {boolean} Whether or not the user has consented to show incoming transactions
*/
_allowedToMakeFetchIncomingTx(chainId) {
const { featureFlags = {} } = this.preferencesController.store.getState();
const { completedOnboarding } = this.onboardingController.store.getState();

const hasIncomingTransactionsFeatureEnabled = Boolean(
featureFlags.showIncomingTransactions,
);

const isEtherscanSupportedNetwork = Boolean(
ETHERSCAN_SUPPORTED_NETWORKS[chainId],
);
return (
completedOnboarding &&
isEtherscanSupportedNetwork &&
hasIncomingTransactionsFeatureEnabled
);
}
}
Loading

0 comments on commit f331039

Please sign in to comment.