File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
lib/go/contracts/internal/assets Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,13 @@ access(all) contract interface FungibleToken: ViewResolver {
7777 ///
7878 access (all) resource interface Balance {
7979 access (all) var balance : UFix64
80+
81+ // This default implementation needs to be in a separate interface
82+ // from the one in `Vault` so that the conditions get enforced
83+ // in the correct one
84+ access (contract) fun burnCallback () {
85+ self .balance = 0 .0
86+ }
8087 }
8188
8289 /// Provider
@@ -185,7 +192,6 @@ access(all) contract interface FungibleToken: ViewResolver {
185192 " FungibleToken.Vault.burnCallback: Cannot burn this Vault with Burner.burn(). "
186193 .concat (" The balance must be set to zero during the burnCallback method so that it cannot be spammed." )
187194 }
188- self .balance = 0 .0
189195 }
190196
191197 /// getSupportedVaultTypes
You can’t perform that action at this time.
0 commit comments