Skip to content

Commit

Permalink
fix(secret): convert token id before getting nft data
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammadusmanuet committed Dec 16, 2024
1 parent 1f99f4d commit 5cc3e55
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/handler/lock-listener/lock-listener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ import type {
THandler,
TNftTransferDetailsObject,
} from "../types";
import { fetchHttpOrIpfs, retry, useMutexAndRelease } from "../utils";
import {
convertNumbToHexToString,
fetchHttpOrIpfs,
retry,
useMutexAndRelease,
} from "../utils";
import { unreachable } from "../utils/unreachable";
import { processEventsFailSafe } from "./process-fail-safe";

Expand Down Expand Up @@ -65,7 +70,9 @@ export async function listenEvents(
}

const nftDetails = await sourceChain.nftData(
ev.tokenId,
ev.sourceChain === "SECRET" && ev.destinationChain === "SECRET"
? convertNumbToHexToString(ev.tokenId)
: ev.tokenId,
ev.sourceNftContractAddress,
log,
);
Expand Down

0 comments on commit 5cc3e55

Please sign in to comment.