Bump gas-price-oracle lib to resolve oracle CORS issues
This commit is contained in:
parent
c3bef6af31
commit
b5afb8d558
1
.npmrc
Normal file
1
.npmrc
Normal file
@ -0,0 +1 @@
|
|||||||
|
@tornado:registry=https://git.tornado.ws/api/packages/tornado-packages/npm/
|
@ -35,7 +35,7 @@
|
|||||||
"file-saver": "^2.0.5",
|
"file-saver": "^2.0.5",
|
||||||
"find-replacement-tx": "^1.2.1",
|
"find-replacement-tx": "^1.2.1",
|
||||||
"fixed-merkle-tree": "0.5.1",
|
"fixed-merkle-tree": "0.5.1",
|
||||||
"gas-price-oracle": "0.4.4",
|
"@tornado/gas-price-oracle": "^0.5.3",
|
||||||
"graphql": "^15.6.1",
|
"graphql": "^15.6.1",
|
||||||
"idb": "6.0.0",
|
"idb": "6.0.0",
|
||||||
"jszip": "^3.7.1",
|
"jszip": "^3.7.1",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { GasPriceOracle } from 'gas-price-oracle'
|
import { GasPriceOracle } from '@tornado/gas-price-oracle'
|
||||||
import { GasPrice } from 'gas-price-oracle/lib/types'
|
import { GasPrice } from '@/types'
|
||||||
|
|
||||||
import { ChainId } from '@/types'
|
import { ChainId } from '@/types'
|
||||||
import { numbers, RPC_LIST } from '@/constants'
|
import { numbers, RPC_LIST } from '@/constants'
|
||||||
@ -26,7 +26,7 @@ const getGasPrice = async (chainId: ChainId): Promise<GasPrice> => {
|
|||||||
timeout: TEN_SECOND,
|
timeout: TEN_SECOND,
|
||||||
defaultRpc: RPC_LIST[chainId],
|
defaultRpc: RPC_LIST[chainId],
|
||||||
})
|
})
|
||||||
const result = await instance.gasPrices()
|
const result = (await instance.gasPrices({ isLegacy: true })) as GasPrice
|
||||||
|
|
||||||
if (chainId === ChainId.XDAI || chainId === ChainId.MAINNET) {
|
if (chainId === ChainId.XDAI || chainId === ChainId.MAINNET) {
|
||||||
return {
|
return {
|
||||||
|
Loading…
Reference in New Issue
Block a user