Delete an allowance
Methods
//Create the transaction
AccountAllowanceDeleteTransaction transaction = new AccountAllowanceDeleteTransaction()
.deleteAllTokenNftAllowances(nftId , ownerAccountId);
//Sign the transaction with the owner account key
TransactionResponse txResponse = transaction.freezeWith(client).sign(ownerAccountKey).execute(client);
//Request the receipt of the transaction
TransactionReceipt receipt = txResponse.getReceipt(client);
//Get the transaction consensus status
Status transactionStatus = receipt.status;
System.out.println("The transaction consensus status is " +transactionStatus);
//v2.12.0+//Create the transaction
const transaction = new AccountAllowanceDeleteTransaction()
.deleteAllTokenNftAllowances(nftId , ownerAccountId);
//Sign the transaction with the owner account key
const signTx = await transaction.sign(ownerAccountKey);
//Sign the transaction with the client operator private key and submit to a Hedera network
const txResponse = await signTx.execute(client);
//Request the receipt of the transaction
const receipt = await txResponse.getReceipt(client);
//Get the transaction consensus status
const transactionStatus = receipt.status;
console.log("The transaction consensus status is " +transactionStatus.toString());
//v2.13.0+Last updated