mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Merge pull request #11073 from MetaMask/Version-v9.5.2
Version v9.5.2 RC
This commit is contained in:
commit
55e400df51
@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [9.5.2]
|
||||||
|
### Fixed
|
||||||
|
- [#11071](https://github.com/MetaMask/metamask-extension/pull/11071): Fixing address entry error when sending a transaction on a custom network
|
||||||
|
|
||||||
## [9.5.1]
|
## [9.5.1]
|
||||||
### Fixed
|
### Fixed
|
||||||
- [#11048](https://github.com/MetaMask/metamask-extension/pull/11048): Fixed icon on approval screen
|
- [#11048](https://github.com/MetaMask/metamask-extension/pull/11048): Fixed icon on approval screen
|
||||||
@ -2226,7 +2230,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Uncategorized
|
### Uncategorized
|
||||||
- Added the ability to restore accounts from seed words.
|
- Added the ability to restore accounts from seed words.
|
||||||
|
|
||||||
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v9.5.1...HEAD
|
[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v9.5.2...HEAD
|
||||||
|
[9.5.2]: https://github.com/MetaMask/metamask-extension/compare/v9.5.1...v9.5.2
|
||||||
[9.5.1]: https://github.com/MetaMask/metamask-extension/compare/v9.5.0...v9.5.1
|
[9.5.1]: https://github.com/MetaMask/metamask-extension/compare/v9.5.0...v9.5.1
|
||||||
[9.5.0]: https://github.com/MetaMask/metamask-extension/compare/v9.4.0...v9.5.0
|
[9.5.0]: https://github.com/MetaMask/metamask-extension/compare/v9.4.0...v9.5.0
|
||||||
[9.4.0]: https://github.com/MetaMask/metamask-extension/compare/v9.3.0...v9.4.0
|
[9.4.0]: https://github.com/MetaMask/metamask-extension/compare/v9.3.0...v9.4.0
|
||||||
|
@ -71,6 +71,6 @@
|
|||||||
"notifications"
|
"notifications"
|
||||||
],
|
],
|
||||||
"short_name": "__MSG_appName__",
|
"short_name": "__MSG_appName__",
|
||||||
"version": "9.5.1",
|
"version": "9.5.2",
|
||||||
"web_accessible_resources": ["inpage.js", "phishing.html"]
|
"web_accessible_resources": ["inpage.js", "phishing.html"]
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@ import { ethErrors, serializeError } from 'eth-rpc-errors';
|
|||||||
|
|
||||||
const createMetaRPCHandler = (api, outStream) => {
|
const createMetaRPCHandler = (api, outStream) => {
|
||||||
return (data) => {
|
return (data) => {
|
||||||
|
if (outStream._writableState.ended) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!api[data.method]) {
|
if (!api[data.method]) {
|
||||||
outStream.write({
|
outStream.write({
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
@ -13,6 +16,9 @@ const createMetaRPCHandler = (api, outStream) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
api[data.method](...data.params, (err, result) => {
|
api[data.method](...data.params, (err, result) => {
|
||||||
|
if (outStream._writableState.ended) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (err) {
|
if (err) {
|
||||||
outStream.write({
|
outStream.write({
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
|
@ -58,4 +58,40 @@ describe('createMetaRPCHandler', function () {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
it('can not throw an error for writing an error after end', function (done) {
|
||||||
|
const api = {
|
||||||
|
foo: (param1, cb) => {
|
||||||
|
assert.strictEqual(param1, 'bar');
|
||||||
|
cb(new Error('foo-error'));
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const streamTest = createThoughStream();
|
||||||
|
const handler = createMetaRPCHandler(api, streamTest);
|
||||||
|
streamTest.end();
|
||||||
|
handler({
|
||||||
|
id: 1,
|
||||||
|
method: 'foo',
|
||||||
|
params: ['bar'],
|
||||||
|
});
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
it('can not throw an error for write after end', function (done) {
|
||||||
|
const api = {
|
||||||
|
foo: (param1, cb) => {
|
||||||
|
assert.strictEqual(param1, 'bar');
|
||||||
|
cb(undefined, {
|
||||||
|
foo: 'bar',
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const streamTest = createThoughStream();
|
||||||
|
const handler = createMetaRPCHandler(api, streamTest);
|
||||||
|
streamTest.end();
|
||||||
|
handler({
|
||||||
|
id: 1,
|
||||||
|
method: 'foo',
|
||||||
|
params: ['bar'],
|
||||||
|
});
|
||||||
|
done();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -2024,6 +2024,9 @@ export default class MetamaskController extends EventEmitter {
|
|||||||
// set up postStream transport
|
// set up postStream transport
|
||||||
outStream.on('data', createMetaRPCHandler(api, outStream));
|
outStream.on('data', createMetaRPCHandler(api, outStream));
|
||||||
const handleUpdate = (update) => {
|
const handleUpdate = (update) => {
|
||||||
|
if (outStream._writableState.ended) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
// send notification to client-side
|
// send notification to client-side
|
||||||
outStream.write({
|
outStream.write({
|
||||||
jsonrpc: '2.0',
|
jsonrpc: '2.0',
|
||||||
|
@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
|
|||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
import contractMap from '@metamask/contract-metadata';
|
import contractMap from '@metamask/contract-metadata';
|
||||||
|
|
||||||
import { checksumAddress } from '../../../helpers/utils/util';
|
import { checksumAddress, isHex } from '../../../helpers/utils/util';
|
||||||
import Jazzicon from '../jazzicon';
|
import Jazzicon from '../jazzicon';
|
||||||
import BlockieIdenticon from './blockieIdenticon';
|
import BlockieIdenticon from './blockieIdenticon';
|
||||||
|
|
||||||
@ -85,11 +85,13 @@ export default class Identicon extends PureComponent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (address) {
|
if (address) {
|
||||||
|
if (isHex(address)) {
|
||||||
const checksummedAddress = checksumAddress(address);
|
const checksummedAddress = checksumAddress(address);
|
||||||
|
|
||||||
if (contractMap[checksummedAddress]?.logo) {
|
if (contractMap[checksummedAddress]?.logo) {
|
||||||
return this.renderJazzicon();
|
return this.renderJazzicon();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
import contractMap from '@metamask/contract-metadata';
|
import contractMap from '@metamask/contract-metadata';
|
||||||
import { isValidAddress, checksumAddress } from '../app/helpers/utils/util';
|
import {
|
||||||
|
isValidAddress,
|
||||||
|
checksumAddress,
|
||||||
|
isHex,
|
||||||
|
} from '../app/helpers/utils/util';
|
||||||
|
|
||||||
let iconFactory;
|
let iconFactory;
|
||||||
|
|
||||||
@ -16,7 +20,12 @@ function IconFactory(jazzicon) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
IconFactory.prototype.iconForAddress = function (address, diameter) {
|
IconFactory.prototype.iconForAddress = function (address, diameter) {
|
||||||
const addr = checksumAddress(address);
|
let addr = address;
|
||||||
|
|
||||||
|
if (isHex(address)) {
|
||||||
|
addr = checksumAddress(address);
|
||||||
|
}
|
||||||
|
|
||||||
if (iconExistsFor(addr)) {
|
if (iconExistsFor(addr)) {
|
||||||
return imageElFor(addr);
|
return imageElFor(addr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user