Cancel or end an auction
Prerequisites
Cancel an auction on a marketplace using Ternoa-JS
import {
cancelAuction,
initializeApi,
getKeyringFromSeed,
WaitUntil,
} from "ternoa-js";
const cancelAuctionNFT = async () => {
try {
await initializeApi();
const keyring = await getKeyringFromSeed("//TernoaTestAccount");
const NFT_ID = // update with the auctioned nft id you want to cancel.
const res = await cancelAuction(
NFT_ID,
keyring,
WaitUntil.BlockInclusion
);
console.log(`Auction cancelled for NFT id: ${res.nftId}`);
} catch (e) {
console.error(e);
}
};The expected params
Response
End an auction on a marketplace using Ternoa-JS
The expected params
Response
Support
Last updated