mirror of
https://github.com/status-im/safe-react.git
synced 2025-02-17 12:07:09 +00:00
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/'
|
: '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')
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user