diff --git a/src/nodeFunctions.ts b/src/nodeFunctions.ts index d160dac..29bd5d5 100644 --- a/src/nodeFunctions.ts +++ b/src/nodeFunctions.ts @@ -1,12 +1,12 @@ import { ethers } from "ethers"; -import { TransactionData, InternalOperation } from "./types"; +import { InternalOperation } from "./types"; export const getInternalOperations = async ( provider: ethers.providers.JsonRpcProvider, - txData: TransactionData + txHash: string ) => { const rawTransfers = await provider.send("ots_getInternalOperations", [ - txData.transactionHash, + txHash, ]); const _transfers: InternalOperation[] = []; diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts index 588940e..4982f90 100644 --- a/src/useErigonHooks.ts +++ b/src/useErigonHooks.ts @@ -190,7 +190,10 @@ export const useInternalOperations = ( return; } - const _transfers = await getInternalOperations(provider, txData); + const _transfers = await getInternalOperations( + provider, + txData.transactionHash + ); for (const t of _transfers) { t.from = provider.formatter.address(t.from); t.to = provider.formatter.address(t.to);