@aurigami/sdk 1.11.0-beta3 → 1.11.0-beta5
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.cjs.development.js +7 -4
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +7 -4
- package/dist/sdk.esm.js.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
- package/src/interactors/PlyGame.ts +9 -4
- package/src/types/index.ts +2 -2
|
@@ -4663,11 +4663,14 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4663
4663
|
|
|
4664
4664
|
_proto.parseBetMakeEvent = function parseBetMakeEvent(event) {
|
|
4665
4665
|
var outcome = ['bigWin', 'win', 'lose', 'noImpact'][event.args.outcome];
|
|
4666
|
-
var
|
|
4667
|
-
|
|
4666
|
+
var betAmount = event.args.amount; // 0%, 0%, 100%, 2%
|
|
4667
|
+
// big win, win, lose, no impact
|
|
4668
|
+
|
|
4669
|
+
var lostAmount = betAmount.mul([0, 0, 100, 2][event.args.outcome]).div(100);
|
|
4670
|
+
var unlock = betAmount.mul([10, 1, 0, 0][event.args.outcome]);
|
|
4668
4671
|
return {
|
|
4669
4672
|
player: event.args.player,
|
|
4670
|
-
|
|
4673
|
+
lostAmount: new TokenAmount(this.plyToken, lostAmount.toString()),
|
|
4671
4674
|
unlockedPulpAmount: new TokenAmount(this.pulpToken, unlock.toString()),
|
|
4672
4675
|
outcome: outcome,
|
|
4673
4676
|
transactionHash: event.transactionHash,
|
|
@@ -4865,7 +4868,7 @@ var PlyGameRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
4865
4868
|
switch (_context6.prev = _context6.next) {
|
|
4866
4869
|
case 0:
|
|
4867
4870
|
_context6.next = 2;
|
|
4868
|
-
return this._networkConnection.provider.
|
|
4871
|
+
return this._networkConnection.provider.waitForTransaction(txHash, 1);
|
|
4869
4872
|
|
|
4870
4873
|
case 2:
|
|
4871
4874
|
tx = _context6.sent;
|