Skip to content

Commit 57cefd3

Browse files
add id field to PositionDetails struct
1 parent 1623f0e commit 57cefd3

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cadence/contracts/FlowALPv0.cdc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1927,6 +1927,7 @@ access(all) contract FlowALPv0 {
19271927
)
19281928

19291929
return PositionDetails(
1930+
id: pid,
19301931
balances: balances,
19311932
poolDefaultToken: self.defaultToken,
19321933
defaultTokenAvailableBalance: defaultTokenAvailable,
@@ -4782,6 +4783,9 @@ access(all) contract FlowALPv0 {
47824783
/// This structure is NOT used internally.
47834784
access(all) struct PositionDetails {
47844785

4786+
/// The unique identifier of the position
4787+
access(all) let id: UInt64
4788+
47854789
/// Balance details about each Vault Type deposited to the related Position
47864790
access(all) let balances: [PositionBalance]
47874791

@@ -4795,11 +4799,13 @@ access(all) contract FlowALPv0 {
47954799
access(all) let health: UFix128
47964800

47974801
init(
4802+
id: UInt64,
47984803
balances: [PositionBalance],
47994804
poolDefaultToken: Type,
48004805
defaultTokenAvailableBalance: UFix64,
48014806
health: UFix128
48024807
) {
4808+
self.id = id
48034809
self.balances = balances
48044810
self.poolDefaultToken = poolDefaultToken
48054811
self.defaultTokenAvailableBalance = defaultTokenAvailableBalance

0 commit comments

Comments
 (0)