WA-234 includes headers when fetching gas price

This commit is contained in:
apanizo 2018-06-20 13:31:23 +02:00
parent 60c90b8f3e
commit 991445fef8

View File

@ -35,7 +35,16 @@ export const calculateGasPrice = async () => {
: 'https://safe-relay.dev.gnosisdev.com/' : 'https://safe-relay.dev.gnosisdev.com/'
*/ */
const response = await fetch('https://ethgasstation.info/json/ethgasAPI.json') const header = new Headers({
'Access-Control-Allow-Origin': '*',
})
const sentData = {
mode: 'cors',
header,
}
const response = await fetch('https://ethgasstation.info/json/ethgasAPI.json', sentData)
if (!response.ok) { if (!response.ok) {
throw new Error('Error querying gast station') throw new Error('Error querying gast station')
} }