Skip to content

Fix security notice#2

Merged
joshuahannan merged 1 commit intomasterfrom
bastian/fix-security-notice
Apr 21, 2020
Merged

Fix security notice#2
joshuahannan merged 1 commit intomasterfrom
bastian/fix-security-notice

Conversation

@turbolent
Copy link
Member

No description provided.

@joshuahannan joshuahannan merged commit 55d3aa5 into master Apr 21, 2020
@joshuahannan joshuahannan deleted the bastian/fix-security-notice branch April 21, 2020 21:40
joshuahannan added a commit that referenced this pull request Mar 10, 2026
Tests for the two fixes made in contracts/utility/TokenForwarding.cdc:

1. changeRecipient with stale old capability (bug fix #1):
   - testChangeRecipientSucceedsWhenOldCapabilityIsStale: verifies the
     transaction succeeds and the ForwarderRecipientUpdated event emits
     nil for oldRecipient when the old cap is no longer valid
   - testTokensForwardedToNewRecipientAfterChange: end-to-end check that
     tokens sent to the Forwarder after the update arrive at the new
     recipient, not the stale old one

2. getSupportedVaultTypes for chained forwarders (bug fix #2):
   - testGetSupportedVaultTypesForSingleForwarder: baseline check that a
     single Forwarder → Vault returns {ExampleToken.Vault: true}
   - testGetSupportedVaultTypesForChainedForwarders: the key regression
     test — Forwarder B → Forwarder A → Vault must return
     {ExampleToken.Vault: true}, not {TokenForwarding.Forwarder: true}

Also adds tests/transactions/unload_example_token_vault.cdc, a test-only
helper transaction that removes and destroys an account's ExampleToken
vault to simulate a stale receiver capability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
joshuahannan added a commit that referenced this pull request Mar 11, 2026
Tests for the two fixes made in contracts/utility/TokenForwarding.cdc:

1. changeRecipient with stale old capability (bug fix #1):
   - testChangeRecipientSucceedsWhenOldCapabilityIsStale: verifies the
     transaction succeeds and the ForwarderRecipientUpdated event emits
     nil for oldRecipient when the old cap is no longer valid
   - testTokensForwardedToNewRecipientAfterChange: end-to-end check that
     tokens sent to the Forwarder after the update arrive at the new
     recipient, not the stale old one

2. getSupportedVaultTypes for chained forwarders (bug fix #2):
   - testGetSupportedVaultTypesForSingleForwarder: baseline check that a
     single Forwarder → Vault returns {ExampleToken.Vault: true}
   - testGetSupportedVaultTypesForChainedForwarders: the key regression
     test — Forwarder B → Forwarder A → Vault must return
     {ExampleToken.Vault: true}, not {TokenForwarding.Forwarder: true}

Also adds tests/transactions/unload_example_token_vault.cdc, a test-only
helper transaction that removes and destroys an account's ExampleToken
vault to simulate a stale receiver capability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
joshuahannan added a commit that referenced this pull request Mar 11, 2026
Tests for the two fixes made in contracts/utility/TokenForwarding.cdc:

1. changeRecipient with stale old capability (bug fix #1):
   - testChangeRecipientSucceedsWhenOldCapabilityIsStale: verifies the
     transaction succeeds and the ForwarderRecipientUpdated event emits
     nil for oldRecipient when the old cap is no longer valid
   - testTokensForwardedToNewRecipientAfterChange: end-to-end check that
     tokens sent to the Forwarder after the update arrive at the new
     recipient, not the stale old one

2. getSupportedVaultTypes for chained forwarders (bug fix #2):
   - testGetSupportedVaultTypesForSingleForwarder: baseline check that a
     single Forwarder → Vault returns {ExampleToken.Vault: true}
   - testGetSupportedVaultTypesForChainedForwarders: the key regression
     test — Forwarder B → Forwarder A → Vault must return
     {ExampleToken.Vault: true}, not {TokenForwarding.Forwarder: true}

Also adds tests/transactions/unload_example_token_vault.cdc, a test-only
helper transaction that removes and destroys an account's ExampleToken
vault to simulate a stale receiver capability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

2 participants