WA-234 includes headers when fetching gas price
This commit is contained in:
parent
60c90b8f3e
commit
991445fef8
|
@ -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')
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue