Skip to content

Commit

Permalink
fix: revert fix for claiming on fuse, and apply fix to also handle et…
Browse files Browse the repository at this point in the history
…h properly
  • Loading branch information
L03TJ3 committed Dec 11, 2023
1 parent fe5f07a commit 29604cf
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/hooks/useWeb3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ExternalProvider } from '@ethersproject/providers'
import { Goerli, Mainnet } from '@usedapp/core'
import { ChainId } from '@sushiswap/sdk'
import { DAO_NETWORK, GdSdkContext, useEnvWeb3 } from '@gooddollar/web3sdk'
import { AsyncStorage, Celo, Fuse, SupportedV2Networks, Web3Provider } from '@gooddollar/web3sdk-v2'
import { AsyncStorage, Celo, Fuse, Web3Provider } from '@gooddollar/web3sdk-v2'

import useActiveWeb3React from './useActiveWeb3React'
import { getEnv } from 'utils/env'
Expand Down Expand Up @@ -57,11 +57,10 @@ export function Web3ContextProvider({ children }: { children: ReactNode | ReactN
[eipProvider]
)

if (webprovider && SupportedV2Networks[chainId]) {
if (webprovider) {
webprovider.send = async (method: string, params: any) => {
if (method === 'eth_sendTransaction') {
const gasPrice = chainId === (42220 as ChainId) ? 5e9 : 10e9
params[0].gasPrice = BigNumber.from(gasPrice).toHexString()
if (chainId === (42220 as ChainId) && method === 'eth_sendTransaction') {
params[0].gasPrice = BigNumber.from(5e9).toHexString()
}
return webprovider.jsonRpcFetchFunc(method, params)
}
Expand Down

0 comments on commit 29604cf

Please sign in to comment.