Skip to content

Commit cf3486c

Browse files
committed
bring back pool cap
1 parent f15b604 commit cf3486c

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cadence/contracts/FlowALPv0.cdc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,11 @@ access(all) contract FlowALPv0 {
984984
self._rebalancePositionNoLock(pid: id, force: true)
985985
}
986986

987+
// Create a capability to the Pool for the Position resource
988+
// The Pool is stored in the FlowALPv0 contract account
989+
let poolCap = FlowALPv0.account.capabilities.storage
990+
.issue<auth(FlowALPModels.EPosition) &{FlowALPModels.PositionPool}>(FlowALPv0.PoolStoragePath)
991+
987992
// Create and return the Position resource
988993
let position <- FlowALPPositionResources.createPosition(id: id, pool: poolCap)
989994

0 commit comments

Comments
 (0)