We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4c40797 commit 4702df8Copy full SHA for 4702df8
1 file changed
cadence/scripts/tidal-yield/get_beta_cap.cdc
@@ -3,6 +3,8 @@ import "TidalYieldClosedBeta"
3
access(all) fun main(addr: Address): Bool {
4
let acct = getAuthAccount<auth(Storage) &Account>(addr)
5
let betaCapID = TidalYieldClosedBeta.getBetaCapID(addr)
6
- let existingCap = acct.storage.borrow<&Capability<auth(TidalYieldClosedBeta.Beta) &TidalYieldClosedBeta.BetaBadge>>(from: TidalYieldClosedBeta.UserBetaCapStoragePath)
7
- return betaCapID != nil && existingCap?.id == betaCapID
+ let existingCap = acct.storage.borrow<Capability<auth(TidalYieldClosedBeta.Beta) &TidalYieldClosedBeta.BetaBadge>>(
+ from: TidalYieldClosedBeta.UserBetaCapStoragePath
8
+ ) ?? panic("Missing beta capability")
9
+ return betaCapID != nil && existingCap.id == betaCapID
10
}
0 commit comments