Skip to content

Commit 5e01de8

Browse files
authored
Merge pull request #256 from onflow/nialexsan/prepay-debt
prepay debt
2 parents d346a22 + 77c9a7f commit 5e01de8

2 files changed

Lines changed: 148 additions & 101 deletions

File tree

cadence/contracts/FlowYieldVaults.cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ access(all) contract FlowYieldVaults {
404404
/// Withdraws the requested amount from the Strategy
405405
access(FungibleToken.Withdraw) fun withdraw(amount: UFix64): @{FungibleToken.Vault} {
406406
post {
407-
result.balance == amount:
407+
result.balance >= amount && result.balance - amount <= (0.00000001 as UFix64):
408408
"Invalid Vault balance returned - requested \(amount) but returned \(result.balance)"
409409

410410
self.vaultType == result.getType():

0 commit comments

Comments
 (0)