1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Upgrade ganache - continued (#13354)

* remove ganache-core

* use ganache v7

* convert to hex

* lint
This commit is contained in:
PeterYinusa 2022-01-20 16:56:52 +00:00 committed by GitHub
parent c58cc631c7
commit e2a8886a05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 184 additions and 1723 deletions

View File

@ -46,8 +46,11 @@ describe('Transaction Controller', function () {
// by default, all accounts are external accounts (not contracts)
eth_getCode: '0x',
};
provider = createTestProviderTools({ scaffold: providerResultStub })
.provider;
provider = createTestProviderTools({
scaffold: providerResultStub,
networkId: currentNetworkId,
chainId: currentNetworkId,
}).provider;
fromAccount = getTestAccounts()[0];
const blockTrackerStub = new EventEmitter();

View File

@ -291,7 +291,6 @@
"fast-glob": "^3.2.2",
"fs-extra": "^8.1.0",
"ganache": "^v7.0.0-rc.0",
"ganache-core": "^2.13.1",
"geckodriver": "^1.21.0",
"globby": "^11.0.4",
"gulp": "^4.0.2",

View File

@ -8,7 +8,7 @@ describe('Incremental Security', function () {
{
secretKey:
'0x250F458997A364988956409A164BA4E16F0F99F916ACDD73ADCD3A1DE30CF8D1',
balance: '0x0',
balance: convertToHexValue(0),
},
{
secretKey:

View File

@ -1,6 +1,6 @@
import { JsonRpcEngine, createScaffoldMiddleware } from 'json-rpc-engine';
import { providerAsMiddleware } from 'eth-json-rpc-middleware';
import GanacheCore from 'ganache-core';
import Ganache from 'ganache';
export function getTestSeed() {
return 'people carpet cluster attract ankle motor ozone mass dove original primary mask';
@ -48,11 +48,11 @@ export function createTestProviderTools(opts = {}) {
// handle block tracker methods
engine.push(
providerAsMiddleware(
GanacheCore.provider({
Ganache.provider({
mnemonic: getTestSeed(),
network_id: opts.networkId,
_chainId: opts.chainId,
_chainIdRpc: opts.chainId,
chain: { chainId: opts.chainId },
hardfork: 'muirGlacier',
}),
),
);

1889
yarn.lock

File diff suppressed because it is too large Load Diff