Skip to content

Commit 6b78d3e

Browse files
committed
make balance check enforce that it is a FlowToken Vault
1 parent 028f5a6 commit 6b78d3e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

contracts/FlowServiceAccount.cdc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ access(all) contract FlowServiceAccount {
4545
/// Returns 0 if the account has no default balance
4646
access(all) view fun defaultTokenBalance(_ acct: &Account): UFix64 {
4747
var balance = 0.0
48-
if let balanceRef = acct.capabilities.borrow<&{FungibleToken.Balance}>(/public/flowTokenBalance) {
48+
if let balanceRef = acct.capabilities.borrow<&FlowToken.Vault>(/public/flowTokenBalance) {
4949
balance = balanceRef.balance
5050
}
5151

lib/go/contracts/internal/assets/assets.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)