diff --git a/src/modules/mana/sagas.spec.ts b/src/modules/mana/sagas.spec.ts index 4c2d89e..0b36727 100644 --- a/src/modules/mana/sagas.spec.ts +++ b/src/modules/mana/sagas.spec.ts @@ -1,6 +1,6 @@ import { ChainId, Network } from '@dcl/schemas' import { call, select } from '@redux-saga/core/effects' -import { getChainIdByNetwork, getNetworkProvider } from 'decentraland-dapps/dist/lib/eth' +import { getChainIdByNetwork, getNetworkProvider, getNetworkWeb3Provider } from 'decentraland-dapps/dist/lib/eth' import { fetchTransactionRequest } from 'decentraland-dapps/dist/modules/transaction/actions' import { getAddress } from 'decentraland-dapps/dist/modules/wallet/selectors' import { expectSaga } from 'redux-saga-test-plan' @@ -100,7 +100,8 @@ describe('handleImportWithdrawalRequest', () => { [select(getAddress), address], [call(getChainIdByNetwork, network), chainId], [call(getMaticPOSClient), maticPOSClient], - [call(getNetworkProvider, chainId), networkProvider] + [call(getNetworkProvider, chainId), networkProvider], + [call(getNetworkWeb3Provider, chainId), networkProvider] ]) expectedActions.forEach(ea => (test = test.put(ea))) diff --git a/src/modules/mana/sagas.ts b/src/modules/mana/sagas.ts index dc519d2..362d8df 100644 --- a/src/modules/mana/sagas.ts +++ b/src/modules/mana/sagas.ts @@ -1,7 +1,13 @@ import { ChainId, Network } from '@dcl/schemas' import { ITransactionWriteResult, POSClient, setProofApi, use } from '@maticnetwork/maticjs' import { Web3ClientPlugin } from '@maticnetwork/maticjs-ethers' -import { getChainIdByNetwork, getConnectedProvider, getNetworkProvider, getSigner } from 'decentraland-dapps/dist/lib/eth' +import { + getChainIdByNetwork, + getConnectedProvider, + getNetworkProvider, + getNetworkWeb3Provider, + getSigner +} from 'decentraland-dapps/dist/lib/eth' import { closeModal, openModal } from 'decentraland-dapps/dist/modules/modal/actions' import { FETCH_TRANSACTION_SUCCESS, @@ -410,7 +416,7 @@ export function* handleImportWithdrawalRequest(action: ImportWithdrawalRequestAc } const chainId: ChainId = yield call(getChainIdByNetwork, Network.MATIC) - const provider: Provider = yield call(getNetworkProvider, chainId) + const provider: Provider = yield call(getNetworkWeb3Provider, chainId) const transaction: { input: string; from: string } | undefined = yield call([provider, 'send'], 'eth_getTransactionByHash', [txHash])