Skip to content

Commit

Permalink
fix: tx providers
Browse files Browse the repository at this point in the history
  • Loading branch information
Argeare5 committed Oct 6, 2022
1 parent 6e5b4a5 commit d7105e8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/web3/store/transactionsSlice.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// TODO: need set desiredChainID optional, for now required for Tenderly forks

import { ethers, providers } from 'ethers';
import { Draft, produce } from 'immer';

Expand Down Expand Up @@ -43,7 +45,7 @@ interface ITransactionsActions<T extends BaseTx> {
params: {
type: T['type'];
payload: T['payload'];
desiredChainID?: number
desiredChainID: number;
};
}) => Promise<
T & {
Expand Down Expand Up @@ -75,7 +77,8 @@ export function createTransactionsSlice<T extends BaseTx>({
executeTx: async ({ body, params }) => {
await get().checkAndSwitchNetwork(params.desiredChainID);
const tx = await body();
const chainId = Number(tx.chainId);
// const chainId = Number(tx.chainId);
const chainId = Number(params.desiredChainID); // TODO: temporary for Tenderly forks
const transaction = {
chainId,
hash: tx.hash,
Expand Down

0 comments on commit d7105e8

Please sign in to comment.