Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #344 from elucidsoft/fix-liquidity-pool-revoked-ef…
Browse files Browse the repository at this point in the history
…fect

Now ReservesRevoked is an array in LiquidityPoolRevokedEffectResponse
  • Loading branch information
elucidsoft authored Oct 30, 2021
2 parents 83d0623 + 429dbd4 commit 3525e0d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@
}
]
},
"reserves_revoked": {
"asset": "TEST:GC2262FQJAHVJSYWI6XEVQEH5CLPYCVSOLQHCDHNSKVWHTKYEZNAQS25",
"amount": "1500.0000000",
"claimable_balance_id": "00000000836f572dd43b76853df6c88ca1b89394b547d74de0c87334ce7f9270cb342203"
},
"reserves_revoked": [
{
"asset": "TEST:GC2262FQJAHVJSYWI6XEVQEH5CLPYCVSOLQHCDHNSKVWHTKYEZNAQS25",
"amount": "1500.0000000",
"claimable_balance_id": "00000000836f572dd43b76853df6c88ca1b89394b547d74de0c87334ce7f9270cb342203"
}
],
"shares_revoked": "100.0000000"
}
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public static void AssertData(EffectResponse instance)
Assert.AreEqual(effect.LiquidityPool.Reserves[1].Asset.CanonicalName(), "TEST:GC2262FQJAHVJSYWI6XEVQEH5CLPYCVSOLQHCDHNSKVWHTKYEZNAQS25");
Assert.AreEqual(effect.LiquidityPool.Reserves[1].Amount, "0.0000000");

Assert.AreEqual(effect.ReservesRevoked.Asset.CanonicalName(), "TEST:GC2262FQJAHVJSYWI6XEVQEH5CLPYCVSOLQHCDHNSKVWHTKYEZNAQS25");
Assert.AreEqual(effect.ReservesRevoked.Amount, "1500.0000000");
Assert.AreEqual(effect.ReservesRevoked.ClaimableBalanceID, "00000000836f572dd43b76853df6c88ca1b89394b547d74de0c87334ce7f9270cb342203");
Assert.AreEqual(effect.ReservesRevoked[0].Asset.CanonicalName(), "TEST:GC2262FQJAHVJSYWI6XEVQEH5CLPYCVSOLQHCDHNSKVWHTKYEZNAQS25");
Assert.AreEqual(effect.ReservesRevoked[0].Amount, "1500.0000000");
Assert.AreEqual(effect.ReservesRevoked[0].ClaimableBalanceID, "00000000836f572dd43b76853df6c88ca1b89394b547d74de0c87334ce7f9270cb342203");

Assert.AreEqual(effect.SharesRevoked, "100.0000000");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ public class LiquidityPoolRevokedEffectResponse : EffectResponse
public LiquidityPool LiquidityPool { get; private set; }

[JsonProperty(PropertyName = "reserves_revoked")]
public LiquidityPoolClaimableAssetAmount ReservesRevoked { get; private set; }
public LiquidityPoolClaimableAssetAmount[] ReservesRevoked { get; private set; }

[JsonProperty(PropertyName = "shares_revoked")]
public string SharesRevoked { get; private set; }

public LiquidityPoolRevokedEffectResponse() { }

public LiquidityPoolRevokedEffectResponse(LiquidityPool liquidityPool, LiquidityPoolClaimableAssetAmount reservesRevoked, string sharesRevoked)
public LiquidityPoolRevokedEffectResponse(LiquidityPool liquidityPool, LiquidityPoolClaimableAssetAmount[] reservesRevoked, string sharesRevoked)
{
LiquidityPool = liquidityPool;
ReservesRevoked = reservesRevoked;
Expand Down

0 comments on commit 3525e0d

Please sign in to comment.