mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-24 19:10:22 +01:00
5b8c07817a
* Delete localhost provider type * Use ganache-cli default chain ID for tests * Delete unused test firstTimeState variable * Migrate default ganache-cli network to frequentRpcListDetail * Add default test provider state * Add test functionality to createJsonRpcClient * Lint locales * Update test middleware creation * fixup! Update test middleware creation
30 lines
653 B
Bash
Executable File
30 lines
653 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
set -u
|
|
set -o pipefail
|
|
|
|
ganache_cli="$(yarn bin)/ganache-cli"
|
|
seed_phrase="${GANACHE_SEED_PHRASE:-phrase upgrade clock rough situate wedding elder clever doctor stamp excess tent}"
|
|
|
|
_term () {
|
|
printf '%s\n' "Received SIGTERM, sending SIGKILL to Ganache"
|
|
kill -KILL "$child" 2>/dev/null
|
|
exit 42
|
|
}
|
|
|
|
_int () {
|
|
printf '%s\n' "Received SIGINT, sending SIGKILL to Ganache"
|
|
kill -KILL "$child" 2>/dev/null
|
|
exit 42
|
|
}
|
|
|
|
trap _term SIGTERM
|
|
trap _int SIGINT
|
|
|
|
# shellcheck disable=SC2086
|
|
$ganache_cli --noVMErrorsOnRPCResponse --networkId 1337 --mnemonic "$seed_phrase" ${GANACHE_ARGS:-} &
|
|
|
|
child=$!
|
|
wait "$child"
|