@provable-games/budokan-sdk 0.1.15 → 0.1.17

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/react.cjs CHANGED
@@ -588,15 +588,15 @@ var CHAINS = {
588
588
  rpcUrl: "https://api.cartridge.gg/x/starknet/mainnet/rpc/v0_10",
589
589
  apiBaseUrl: "https://budokan-api-production.up.railway.app",
590
590
  wsUrl: "wss://budokan-api-production.up.railway.app/ws",
591
- budokanAddress: "0x0765e6f07c1a5cebe08aba7f840741242dffb1ed77ac619120501f540ec9a52a",
592
- viewerAddress: "0x0232fb32bd06e38f3555000f255c01812198418d5fced3b6246900725bf2f4d1"
591
+ budokanAddress: "0x00f4941e73cc38f67f79ae1f7cdae48f28ca5a6c0e013f6136818e777f61c6ee",
592
+ viewerAddress: "0x027c264f4417dfd25d0626bce7304e9b3140ab06afeaf639b2678d2a05f1beb3"
593
593
  },
594
594
  sepolia: {
595
595
  rpcUrl: "https://starknet-sepolia.public.blastapi.io",
596
596
  apiBaseUrl: "https://budokan-api-sepolia.up.railway.app",
597
597
  wsUrl: "wss://budokan-api-sepolia.up.railway.app/ws",
598
- budokanAddress: "0x0105573bf9184f0a3da78dda70a87055e6aafc7b3fb6e331732a0d25675b7be5",
599
- viewerAddress: "0x0414fe2f48db1e3598a83f017d17b4d06cec180b160141fea9244054267c1ff1"
598
+ budokanAddress: "0x0169083e63f3caff2c15f83eb238b1f4ab8f74903c0e6b5d433b448972c578d4",
599
+ viewerAddress: "0x02cc4473948170cf42c2f3abc6391fd4401650375ee8e4661b7b6966cda4f15e"
600
600
  }
601
601
  };
602
602
  function getChainConfig(chain) {
@@ -1002,6 +1002,7 @@ function parsePrize(raw) {
1002
1002
  let tokenId = null;
1003
1003
  let distributionType = null;
1004
1004
  let distributionWeight = null;
1005
+ let distributionShares = null;
1005
1006
  let distributionCount = null;
1006
1007
  let payoutPosition = 0;
1007
1008
  if (tokenTypeData) {
@@ -1020,7 +1021,11 @@ function parsePrize(raw) {
1020
1021
  if (distType) {
1021
1022
  distributionType = distType.toLowerCase();
1022
1023
  const distValue = distVariant[distType];
1023
- distributionWeight = distValue != null ? Number(distValue) : null;
1024
+ if (distributionType === "custom") {
1025
+ distributionShares = Array.isArray(distValue) ? distValue.map((v) => Number(v)) : null;
1026
+ } else {
1027
+ distributionWeight = distValue != null ? Number(distValue) : null;
1028
+ }
1024
1029
  }
1025
1030
  }
1026
1031
  const countOption = erc20?.distribution_count;
@@ -1041,6 +1046,7 @@ function parsePrize(raw) {
1041
1046
  tokenId,
1042
1047
  distributionType,
1043
1048
  distributionWeight,
1049
+ distributionShares,
1044
1050
  distributionCount,
1045
1051
  sponsorAddress: starknet.num.toHex(obj.sponsor_address)
1046
1052
  };