@aurigami/sdk 1.11.0-beta3 → 1.11.0-beta4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk.esm.js CHANGED
@@ -4662,11 +4662,14 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
4662
4662
 
4663
4663
  _proto.parseBetMakeEvent = function parseBetMakeEvent(event) {
4664
4664
  var outcome = ['bigWin', 'win', 'lose', 'noImpact'][event.args.outcome];
4665
- var amount = event.args.amount;
4666
- var unlock = amount.mul([10, 1, 0, 0][event.args.outcome]);
4665
+ var betAmount = event.args.amount; // 0%, 0%, 100%, 2%
4666
+ // big win, win, lose, no impact
4667
+
4668
+ var lostAmount = betAmount.mul([0, 0, 100, 2][event.args.outcome]).div(100);
4669
+ var unlock = betAmount.mul([10, 1, 0, 0][event.args.outcome]);
4667
4670
  return {
4668
4671
  player: event.args.player,
4669
- amount: new TokenAmount(this.plyToken, amount.toString()),
4672
+ lostAmount: new TokenAmount(this.plyToken, lostAmount.toString()),
4670
4673
  unlockedPulpAmount: new TokenAmount(this.pulpToken, unlock.toString()),
4671
4674
  outcome: outcome,
4672
4675
  transactionHash: event.transactionHash,