WA-234 change to https testUrl JEST param for avoid CORS problems

This commit is contained in:
apanizo 2018-06-20 12:57:58 +02:00
parent 6bab62a0a9
commit 7d595b4be2
2 changed files with 1 additions and 7 deletions

View File

@ -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",

View File

@ -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) {