Skip to content

Commit

Permalink
fix(secret): revert token id change
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadusmanuet committed Dec 16, 2024
1 parent 3fd528f commit 8477179
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/handler/lock-listener/lock-listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import type {
} from "../types";
import {
convertNumbToHexToString,
convertStringToHexToNumb,
fetchHttpOrIpfs,
retry,
useMutexAndRelease,
Expand Down Expand Up @@ -70,18 +69,9 @@ export async function listenEvents(
return;
}

let convertedTokenId = ev.tokenId;
if (ev.sourceChain === "SECRET") {
if (chain.chainIdent === "SECRET") {
convertedTokenId = convertStringToHexToNumb(ev.tokenId);
} else if (ev.destinationChain === "SECRET") {
convertedTokenId = convertNumbToHexToString(ev.tokenId);
}
}

const nftDetails = await sourceChain.nftData(
ev.sourceChain === "SECRET" && ev.destinationChain === "SECRET"
? convertedTokenId
? convertNumbToHexToString(ev.tokenId)
: ev.tokenId,
ev.sourceNftContractAddress,
log,
Expand Down Expand Up @@ -148,7 +138,7 @@ export async function listenEvents(
sourceNftContractAddress: ev.sourceNftContractAddress,
symbol: nftDetails.symbol,
tokenAmount: ev.tokenAmount,
tokenId: convertedTokenId,
tokenId: ev.tokenId,
transactionHash: ev.transactionHash,
lockTxChain: chain.chainIdent,
imgUri: imgUri?.substring(imgUri?.indexOf("https://")) || "",
Expand Down

0 comments on commit 8477179

Please sign in to comment.