mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-17 12:07:09 +00:00
WA-234 change to https testUrl JEST param for avoid CORS problems
This commit is contained in:
parent
6bab62a0a9
commit
7d595b4be2
@ -127,7 +127,7 @@
|
||||
"<rootDir>/src/**/?(*.)(spec|test).js?(x)"
|
||||
],
|
||||
"testEnvironment": "node",
|
||||
"testURL": "http://localhost",
|
||||
"testURL": "https://safe-react",
|
||||
"transform": {
|
||||
"^.+\\.(js|jsx)$": "<rootDir>/node_modules/babel-jest",
|
||||
"^.+\\.(css|scss)$": "<rootDir>/config/jest/cssTransform.js",
|
||||
|
@ -24,8 +24,6 @@ export const checkReceiptStatus = async (hash: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
// export const calculateGasPrice = async () => '1000000000'
|
||||
|
||||
export const calculateGasPrice = async () => {
|
||||
/*
|
||||
const web3 = getWeb3()
|
||||
@ -36,10 +34,6 @@ export const calculateGasPrice = async () => {
|
||||
? 'https://safe-relay.staging.gnosisdev.com/api/v1/gas-station/'
|
||||
: 'https://safe-relay.dev.gnosisdev.com/'
|
||||
*/
|
||||
const corsProblem = process.env.NODE_ENV === 'test'
|
||||
if (corsProblem) {
|
||||
return '4000000'
|
||||
}
|
||||
|
||||
const response = await fetch('https://ethgasstation.info/json/ethgasAPI.json')
|
||||
if (!response.ok) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user