You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Limited use in permissioning consumes two usage
Error Code
NA
To Reproduce
Steps to reproduce the behavior:
Set limited use to 1 for mint in cw721
Try to mint (It will error)
Set limited use to 2 for any mint
Try to mint (Success)
Checking remaining usage returns 0 indicated 2 uses were consumed in 1 action
Expected behavior
Only 1 usage should be used
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Chain
Additional context Here Limited use permission is consumed for one action. But later its also consumed in execute_mint. This is causing consumption of 2 uses and error if there is only 1 usage allowed
The text was updated successfully, but these errors were encountered:
let minter = ANDR_MINTER
.load($ctx.deps.storage)?
.get_raw_address(&$ctx.deps.as_ref())?;
let is_minter = $ctx.info.sender == minter.as_str();
// We check if the sender is the minter before checking if they have the mint permission
// to prevent consuming unnecessary limited permission usage.
let has_mint_permission = is_minter
|| is_context_permissioned(
&mut $ctx.deps,
&$ctx.info,
&$ctx.env,
&$ctx.amp_ctx,
MINT_ACTION,
)?;
Describe the bug
Limited use in permissioning consumes two usage
Error Code
NA
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only 1 usage should be used
Screenshots
If applicable, add screenshots to help explain your problem.
Environment (please complete the following information):
Additional context
Here Limited use permission is consumed for one action. But later its also consumed in execute_mint. This is causing consumption of 2 uses and error if there is only 1 usage allowed
The text was updated successfully, but these errors were encountered: