Skip to content

test(contracts): add regression test for burn_internal TransferCooldown cleanup (#296)#689

Open
DSOTec wants to merge 1 commit intoLabsCrypt:mainfrom
DSOTec:fix/burn-internal-remove-transfer-cooldown
Open

test(contracts): add regression test for burn_internal TransferCooldown cleanup (#296)#689
DSOTec wants to merge 1 commit intoLabsCrypt:mainfrom
DSOTec:fix/burn-internal-remove-transfer-cooldown

Conversation

@DSOTec
Copy link
Copy Markdown

@DSOTec DSOTec commented Apr 22, 2026

Linked Issue

Closes #296

Description

The fix for issue #296 (adding TransferCooldown removal to burn_internal()) was
already applied in commit afd66b0. This PR adds a regression test
test_burn_clears_transfer_cooldown — to ensure the behavior is permanently
covered and cannot silently regress.

The test verifies:

  1. A transfer sets a cooldown on the destination address
  2. Burning that NFT clears the cooldown (returns 0)
  3. After admin remint, the cooldown does not resurface

Testing

  • cargo fmt --check — ✅ passes
  • cargo clippy -- -D warnings — ✅ passes
  • cargo test -p remittance_nft — ✅ 58/58 tests pass (including the new test)

Checklist

  • Code follows project style guides
  • Tests have been added/updated and pass
  • Commit messages follow Conventional Commits standards

…wn cleanup

Adds test_burn_clears_transfer_cooldown to verify that burn_internal()
removes the TransferCooldown storage key. This ensures a reminted user
does not inherit a stale cooldown from a previous identity lifecycle.

Closes LabsCrypt#296
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Contract] RemittanceNFT — burn_internal() Doesn't Remove TransferCooldown

1 participant