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
1 changed files with 10 additions and 1 deletions

View File

@ -35,7 +35,16 @@ export const calculateGasPrice = async () => {
: '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) {
throw new Error('Error querying gast station')
}