@msafe/sui-app-store 0.0.22 → 0.0.24

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/index.mjs CHANGED
@@ -5,7 +5,9 @@ var __export = (target, all) => {
5
5
  };
6
6
 
7
7
  // src/apps/mpay/helper.ts
8
- import { TransactionType } from "@msafe/sui3-utils";
8
+ import {
9
+ TransactionType
10
+ } from "@msafe/sui3-utils";
9
11
 
10
12
  // src/apps/msafe-core/intention.ts
11
13
  import sortKeys from "sort-keys-recursive";
@@ -503,8 +505,14 @@ function isSameTarget(target1, target2) {
503
505
  var GAS_OBJECT_SPEC = "txn.gas";
504
506
 
505
507
  // src/apps/mpay/utils/random.ts
508
+ import { Buffer as Buffer3 } from "buffer";
509
+ import { nanoid } from "nanoid";
510
+ if (typeof window !== "undefined") {
511
+ window.global = window.global ?? window;
512
+ window.Buffer = window.Buffer ?? Buffer3;
513
+ }
506
514
  function generateGroupId() {
507
- return crypto.randomUUID();
515
+ return nanoid();
508
516
  }
509
517
 
510
518
  // src/apps/mpay/builder/CreateStreamHelper.ts
@@ -2653,14 +2661,14 @@ var MPayAppHelper = class {
2653
2661
  const result = decoder.decode();
2654
2662
  if (result.type === "CreateStream" /* CREATE_STREAM */) {
2655
2663
  return {
2656
- txType: TransactionType.Other,
2664
+ txType: TransactionType.Stream,
2657
2665
  txSubType: result.type,
2658
2666
  intentionData: result.info
2659
2667
  };
2660
2668
  }
2661
2669
  if (result.type === "Claim" /* CLAIM */) {
2662
2670
  return {
2663
- txType: TransactionType.Other,
2671
+ txType: TransactionType.Stream,
2664
2672
  txSubType: result.type,
2665
2673
  intentionData: {
2666
2674
  streamId: result.streamId
@@ -2669,7 +2677,7 @@ var MPayAppHelper = class {
2669
2677
  }
2670
2678
  if (result.type === "ClaimByProxy" /* CLAIM_BY_PROXY */) {
2671
2679
  return {
2672
- txType: TransactionType.Other,
2680
+ txType: TransactionType.Stream,
2673
2681
  txSubType: result.type,
2674
2682
  intentionData: {
2675
2683
  streamId: result.streamId
@@ -2678,7 +2686,7 @@ var MPayAppHelper = class {
2678
2686
  }
2679
2687
  if (result.type === "SetAutoClaim" /* SET_AUTO_CLAIM */) {
2680
2688
  return {
2681
- txType: TransactionType.Other,
2689
+ txType: TransactionType.Stream,
2682
2690
  txSubType: result.type,
2683
2691
  intentionData: {
2684
2692
  streamId: result.streamId,
@@ -2688,7 +2696,7 @@ var MPayAppHelper = class {
2688
2696
  }
2689
2697
  if (result.type === "Cancel" /* CANCEL */) {
2690
2698
  return {
2691
- txType: TransactionType.Other,
2699
+ txType: TransactionType.Stream,
2692
2700
  txSubType: result.type,
2693
2701
  intentionData: {
2694
2702
  streamId: result.streamId