diff --git a/src/handlers/chain.ts b/src/handlers/chain.ts index 5dada5fb..8d0745ae 100644 --- a/src/handlers/chain.ts +++ b/src/handlers/chain.ts @@ -24,7 +24,7 @@ export type TLockNFT = { to: string, tokenId: bigint, extraArgs: ExtraArgs, - ) => Promise; + ) => Promise string }>; }; /** @@ -191,7 +191,7 @@ export type TLockSFT = { tokenId: bigint, amt: bigint, extraArgs: ExtraArgs, - ) => Promise; + ) => Promise string }>; }; /** diff --git a/src/handlers/evm.ts b/src/handlers/evm.ts index 477c2c14..76ee55dc 100644 --- a/src/handlers/evm.ts +++ b/src/handlers/evm.ts @@ -138,7 +138,7 @@ export function evmHandler({ extraArgs, ); }, - lockNft( + async lockNft( signer, sourceNftAddress, destinationChain, @@ -147,13 +147,19 @@ export function evmHandler({ extraArgs, ) { const contract = Bridge__factory.connect(bridge, signer); - return contract.lock721( + const result = await contract.lock721( tokenId.toString(), destinationChain, to, sourceNftAddress, extraArgs, ); + return { + ...result, + hash() { + return result.hash; + }, + }; }, }; } diff --git a/src/handlers/multiversx.ts b/src/handlers/multiversx.ts index 85f8f8f2..3bff65a8 100644 --- a/src/handlers/multiversx.ts +++ b/src/handlers/multiversx.ts @@ -214,7 +214,12 @@ export function multiversxHandler({ tx3.applySignature(transactionSignature); const txHash = await provider.sendTransaction(tx3); - return txHash; + return { + txHash, + hash() { + return txHash; + }, + }; }, async claimNft(signer, claimData, _, sig) { const userAddress = new Address(signer.getAddress().bech32()); diff --git a/src/handlers/secret.ts b/src/handlers/secret.ts index d9928cac..f942b57f 100644 --- a/src/handlers/secret.ts +++ b/src/handlers/secret.ts @@ -283,7 +283,12 @@ export function secretHandler({ ...extraArgs, }, ); - return tx; + return { + ...tx, + hash() { + return tx.transactionHash; + }, + }; }, }; } diff --git a/src/handlers/tezos.ts b/src/handlers/tezos.ts index 5d2f440c..1f3e7f96 100644 --- a/src/handlers/tezos.ts +++ b/src/handlers/tezos.ts @@ -194,7 +194,12 @@ export function tezosHandler({ }) .send({ ...extraArgs }); - return tx; + return { + ...tx, + hash() { + return tx.hash; + }, + }; }, async nftData(tokenId, contract) { const tokenMd = await getNftTokenMetaData(contract, BigInt(tokenId)); diff --git a/src/handlers/ton.ts b/src/handlers/ton.ts index 837f57c3..31bc92c0 100644 --- a/src/handlers/ton.ts +++ b/src/handlers/ton.ts @@ -142,6 +142,11 @@ export function tonHandler({ tokenId: BigInt(tokenId), }, ); + return { + hash() { + return ""; + }, + }; }, async approveNft(_signer, _tokenId, _contract) {}, async nftData(_tokenId, contract, _overrides) {