UnlockTokens Bug: New logic around UnlockTokens causes an issue for some UnlockTokens calls
Closed this issue · 0 comments
Jehosephat commented
The else if block here should only throw the error if a name is provided but the hold does not have one. (ln 65 in unlockToken.ts)
if (!isTokenAuthority) {
throw new UnlockForbiddenUserError(ctx.callingUser, tokenInstanceKey.toStringKey());
} else if (name !== undefined) {
throw new UnauthorizedError(
`callingUser ${ctx.callingUser} is not a token authority and passed in a lockedHoldName property for unlocking`
);
}