1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Merge pull request #10574 from MetaMask/Version-v9.1.1

Version v9.1.1 RC
This commit is contained in:
Mark Stacey 2021-03-03 22:20:52 -03:30 committed by GitHub
commit 0523e9fe19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 58 additions and 6 deletions

View File

@ -2,6 +2,10 @@
## Current Develop Branch
## 9.1.1 Wed Mar 03 2021
- [#10560](https://github.com/MetaMask/metamask-extension/pull/10560): Fix ENS resolution related crashes when switching networks on send screen
- [#10561](https://github.com/MetaMask/metamask-extension/pull/10561): Fix crash when speeding up an attempt to cancel a transaction on custom networks
## 9.1.0 Mon Mar 01 2021
- [#10265](https://github.com/MetaMask/metamask-extension/pull/10265): Update Japanese translations.
- [#9388](https://github.com/MetaMask/metamask-extension/pull/9388): Update Chinese(Simplified) translations.

View File

@ -78,6 +78,6 @@
"notifications"
],
"short_name": "__MSG_appName__",
"version": "9.1.0",
"version": "9.1.1",
"web_accessible_resources": ["inpage.js", "phishing.html"]
}

View File

@ -72,10 +72,19 @@ export default class EnsInput extends Component {
}
if (prevProps.network !== network) {
const provider = global.ethereumProvider;
this.ens = new ENS({ provider, network });
if (!newProvidedValue) {
newValue = input;
if (getNetworkEnsSupport(network)) {
const provider = global.ethereumProvider;
this.ens = new ENS({ provider, network });
this.checkName = debounce(this.lookupEnsName, 200);
if (!newProvidedValue) {
newValue = input;
}
} else {
// ens is null on mount on a network that does not have ens support
// this is intended to prevent accidental lookup of domains across
// networks
this.ens = null;
this.checkName = null;
}
}

View File

@ -64,7 +64,7 @@ export function isCustomPriceSafe(state) {
return true;
}
if (safeLow === null) {
if (!safeLow) {
return false;
}

View File

@ -6,6 +6,7 @@ const {
getCustomGasPrice,
getRenderableBasicEstimateData,
getRenderableEstimateDataForSmallButtonsFromGWEI,
isCustomPriceSafe,
} = proxyquire('../custom-gas', {});
describe('custom-gas selectors', function () {
@ -15,6 +16,44 @@ describe('custom-gas selectors', function () {
assert.strictEqual(getCustomGasPrice(mockState), 'mockPrice');
});
});
describe('isCustomGasPriceSafe()', function () {
it('should return true for gas.customData.price 0x77359400', function () {
const mockState = {
gas: {
customData: { price: '0x77359400' },
basicEstimates: { safeLow: 1 },
},
};
assert.strictEqual(isCustomPriceSafe(mockState), true);
});
it('should return true for gas.customData.price null', function () {
const mockState = {
gas: {
customData: { price: null },
basicEstimates: { safeLow: 1 },
},
};
assert.strictEqual(isCustomPriceSafe(mockState), true);
});
it('should return true gas.customData.price undefined', function () {
const mockState = {
gas: {
customData: { price: undefined },
basicEstimates: { safeLow: 1 },
},
};
assert.strictEqual(isCustomPriceSafe(mockState), true);
});
it('should return false gas.basicEstimates.safeLow undefined', function () {
const mockState = {
gas: {
customData: { price: '0x77359400' },
basicEstimates: { safeLow: undefined },
},
};
assert.strictEqual(isCustomPriceSafe(mockState), false);
});
});
describe('getCustomGasLimit()', function () {
it('should return gas.customData.limit', function () {