Hello everyone, two things:
-
I’ve just stared playing around and unfortunately I came across this message on the first step of Fungible Token tutorial (deploying FungibleToken.cdc on account 0x01):
Any idea why or how to fix this? -
Also, it looks to me that the withdraw() function from Vault resource has a bug (when triggered with amount higher than the actual balance it will safely set balance to zero but it will also create a new Vault with amount created out of thin air).
I guess to prevent this, Provider or Vault itself should have additional pre-condition like:
pre {
self.balance >= amount:
"Balance must be equal or higher than the withdrawal amount"
}
Or am I missing something? (couldn’t test this myself because of the issue above).