From ad105568aa934e6ae56bde791a236f3c4ca3fb80 Mon Sep 17 00:00:00 2001 From: Harpal Jadeja Date: Thu, 29 Sep 2022 15:49:04 +0530 Subject: [PATCH] fix(nft): panic message A better panic message for `internalRemoveFromTokenFromOwner` --- src/nft-contract/internal.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nft-contract/internal.ts b/src/nft-contract/internal.ts index 5c590d2..edad7b6 100644 --- a/src/nft-contract/internal.ts +++ b/src/nft-contract/internal.ts @@ -63,7 +63,7 @@ export function internalRemoveTokenFromOwner(contract: Contract, accountId: stri let tokenSet = restoreOwners(contract.tokensPerOwner.get(accountId)); //if there is no set of tokens for the owner, we panic with the following message: if (tokenSet == null) { - near.panic("Token should be owned by the sender"); + near.panic("Account holds no tokens"); } //we remove the the token_id from the set of tokens @@ -111,4 +111,4 @@ export function internalTransfer(contract: Contract, senderId: string, receiverI //return the previous token object that was transferred. return token -} \ No newline at end of file +}