@skip-go/widget 3.14.0 → 3.14.2

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.
@@ -10299,6 +10299,11 @@ const _mainnetChains = [
10299
10299
  coinDenom: "wbtc",
10300
10300
  coinMinimalDenom: "ibc/0E293A7622DC9A6439DB60E6D234B5AF446962E27CA3AB44D0590603DFF6968E",
10301
10301
  coinDecimals: 8
10302
+ },
10303
+ {
10304
+ coinDenom: "AUSD",
10305
+ coinMinimalDenom: "factory/inj1n636d9gzrqggdk66n2f97th0x8yuhfrtx520e7/ausd",
10306
+ coinDecimals: 6
10302
10307
  }
10303
10308
  ],
10304
10309
  rest: "https://6d0ff611-9009-4bd1-a7a7-acec7c70d454.injective-1.mesa-rest.newmetric.xyz",
@@ -10375,6 +10380,16 @@ const _mainnetChains = [
10375
10380
  coinDenom: "xrp",
10376
10381
  coinMinimalDenom: "factory/int31zlefkpe3g0vvm9a4h0jf9000lmqutlh99h7fsd/xrpl-xrp",
10377
10382
  coinDecimals: 6
10383
+ },
10384
+ {
10385
+ coinDenom: "trump",
10386
+ coinMinimalDenom: "factory/int31zlefkpe3g0vvm9a4h0jf9000lmqutlh99h7fsd/solana-trump",
10387
+ coinDecimals: 6
10388
+ },
10389
+ {
10390
+ coinDenom: "pengu",
10391
+ coinMinimalDenom: "factory/int31zlefkpe3g0vvm9a4h0jf9000lmqutlh99h7fsd/solana-pengu",
10392
+ coinDecimals: 6
10378
10393
  }
10379
10394
  ],
10380
10395
  rest: "https://api.mainnet.int3face.zone",
@@ -17186,6 +17201,26 @@ const _mainnetChains = [
17186
17201
  coinDenom: "FOST",
17187
17202
  coinMinimalDenom: "factory/osmo1q77cw0mmlluxu0wr29fcdd0tdnh78gzhkvhe4n6ulal9qvrtu43qtd0nh8/fost",
17188
17203
  coinDecimals: 6
17204
+ },
17205
+ {
17206
+ coinDenom: "trump",
17207
+ coinMinimalDenom: "ibc/51BFF64A432CBBA08A1ED95609BF0255EC4BBF699BFCDFF267F66CCD664CA350",
17208
+ coinDecimals: 6
17209
+ },
17210
+ {
17211
+ coinDenom: "pengu",
17212
+ coinMinimalDenom: "ibc/2C5CB5DB3D86F64FDE6155A3A94D7543A126DA55490309EEDF59A0765873DA1C",
17213
+ coinDecimals: 6
17214
+ },
17215
+ {
17216
+ coinDenom: "qfs",
17217
+ coinMinimalDenom: "ibc/83A99F99AF326090B74CD5D17EE61776C7791B537EE6808F4951A184EDCCA0D9",
17218
+ coinDecimals: 6
17219
+ },
17220
+ {
17221
+ coinDenom: "mtgbp",
17222
+ coinMinimalDenom: "ibc/698687E700D8B255FAB6B8145CE25B12591C99296965DB5C2C5DD5FE0AB685BF",
17223
+ coinDecimals: 6
17189
17224
  }
17190
17225
  ],
17191
17226
  rest: "https://lcd.osmosis.zone/",
@@ -21651,6 +21686,57 @@ const _mainnetChains = [
21651
21686
  coinType: 118
21652
21687
  }
21653
21688
  },
21689
+ {
21690
+ chainId: "sunrise-1",
21691
+ currencies: [
21692
+ {
21693
+ coinDenom: "vrise",
21694
+ coinMinimalDenom: "uvrise",
21695
+ coinDecimals: 6
21696
+ },
21697
+ {
21698
+ coinDenom: "rise",
21699
+ coinMinimalDenom: "urise",
21700
+ coinDecimals: 6
21701
+ },
21702
+ {
21703
+ coinDenom: "usdrise",
21704
+ coinMinimalDenom: "uusdrise",
21705
+ coinDecimals: 6
21706
+ }
21707
+ ],
21708
+ rest: "https://a.consensus.sunrise-1.sunriselayer.io:1318",
21709
+ rpc: "https://a.consensus.sunrise-1.sunriselayer.io",
21710
+ bech32Config: {
21711
+ bech32PrefixAccAddr: "sunrise",
21712
+ bech32PrefixAccPub: "sunrisepub",
21713
+ bech32PrefixValAddr: "sunrisevaloper",
21714
+ bech32PrefixValPub: "sunrisevaloperpub",
21715
+ bech32PrefixConsAddr: "sunrisevalcons",
21716
+ bech32PrefixConsPub: "sunrisevalconspub"
21717
+ },
21718
+ chainName: "sunrise",
21719
+ feeCurrencies: [
21720
+ {
21721
+ coinDenom: "usdrise",
21722
+ coinMinimalDenom: "uusdrise",
21723
+ coinDecimals: 6,
21724
+ gasPriceStep: {
21725
+ low: 0.01,
21726
+ average: 0.02,
21727
+ high: 0.1
21728
+ }
21729
+ }
21730
+ ],
21731
+ stakeCurrency: {
21732
+ coinDenom: "vrise",
21733
+ coinMinimalDenom: "uvrise",
21734
+ coinDecimals: 6
21735
+ },
21736
+ bip44: {
21737
+ coinType: 118
21738
+ }
21739
+ },
21654
21740
  {
21655
21741
  chainId: "symphony-1",
21656
21742
  currencies: [
@@ -23540,6 +23626,11 @@ const _mainnetChains = [
23540
23626
  coinDenom: "solid",
23541
23627
  coinMinimalDenom: "cw20:terra10aa3zdkrc7jwuf8ekl3zq7e7m42vmzqehcmu74e4egc7xkm5kr2s0muyst",
23542
23628
  coinDecimals: 6
23629
+ },
23630
+ {
23631
+ coinDenom: "capa",
23632
+ coinMinimalDenom: "cw20:terra1t4p3u8khpd7f8qzurwyafxt648dya6mp6vur3vaapswt6m24gkuqrfdhar",
23633
+ coinDecimals: 6
23543
23634
  }
23544
23635
  ],
23545
23636
  rest: "https://lcd-terra.wildsage.io",
@@ -29934,7 +30025,7 @@ const _testnetChains = [
29934
30025
  }
29935
30026
  },
29936
30027
  {
29937
- chainId: "sunrise-test-da-5",
30028
+ chainId: "dawn-1",
29938
30029
  currencies: [
29939
30030
  {
29940
30031
  coinDenom: "vrise",
@@ -29952,8 +30043,8 @@ const _testnetChains = [
29952
30043
  coinDecimals: 6
29953
30044
  }
29954
30045
  ],
29955
- rest: "https://sunrise-test-da-5.cauchye.net:1318",
29956
- rpc: "https://sunrise-test-da-5.cauchye.net",
30046
+ rest: "https://sunrise-dawn-1.cauchye.com:1318",
30047
+ rpc: "https://sunrise-dawn-1.cauchye.com",
29957
30048
  bech32Config: {
29958
30049
  bech32PrefixAccAddr: "sunrise",
29959
30050
  bech32PrefixAccPub: "sunrisepub",
@@ -37880,7 +37971,14 @@ const _explorers = [
37880
37971
  },
37881
37972
  {
37882
37973
  chainId: "sunrise-1",
37883
- explorers: []
37974
+ explorers: [
37975
+ {
37976
+ kind: "Risescan",
37977
+ url: "https://risescan.sunriselayer.io",
37978
+ txPage: "https://risescan.sunriselayer.io/txs/${txHash}",
37979
+ accountPage: "https://risescan.sunriselayer.io/accounts/${accountAddress}"
37980
+ }
37981
+ ]
37884
37982
  },
37885
37983
  {
37886
37984
  chainId: "symphony-1",
@@ -40084,8 +40182,15 @@ const _explorers = [
40084
40182
  ]
40085
40183
  },
40086
40184
  {
40087
- chainId: "sunrise-test-da-5",
40088
- explorers: []
40185
+ chainId: "dawn-1",
40186
+ explorers: [
40187
+ {
40188
+ kind: "Risescan",
40189
+ url: "https://dawn-1.risescan.sunriselayer.io",
40190
+ txPage: "https://dawn-1.risescan.sunriselayer.io/txs/${txHash}",
40191
+ accountPage: "https://dawn-1.risescan.sunriselayer.io/accounts/${accountAddress}"
40192
+ }
40193
+ ]
40089
40194
  },
40090
40195
  {
40091
40196
  chainId: "swisstronik_1291-1",
@@ -45574,7 +45679,7 @@ function walletConnect(parameters) {
45574
45679
  const optionalChains = config2.chains.map((x2) => x2.id);
45575
45680
  if (!optionalChains.length)
45576
45681
  return;
45577
- const { EthereumProvider } = await import("./index.es-DlJZjBcA.js");
45682
+ const { EthereumProvider } = await import("./index.es-CNXyATqX.js");
45578
45683
  return await EthereumProvider.init({
45579
45684
  ...parameters,
45580
45685
  disableProviderPing: true,
@@ -46429,6 +46534,7 @@ const batchSignTxsAtom = atom$1(true);
46429
46534
  const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46430
46535
  var _a;
46431
46536
  const { userAddresses, route: route2, mainRoute, feeRoute, isFeeRouteEnabled, feeRouteUserAddresses } = get(swapExecutionStateAtom);
46537
+ const gorRoute = get(gasOnReceiveRouteAtom);
46432
46538
  const submitSwapExecutionCallbacks = get(submitSwapExecutionCallbacksAtom);
46433
46539
  const simulateTx = get(simulateTxAtom);
46434
46540
  const batchSignTxs = get(batchSignTxsAtom);
@@ -46454,7 +46560,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46454
46560
  return {
46455
46561
  gcTime: Infinity,
46456
46562
  mutationFn: async ({ getSvmSigner }) => {
46457
- var _a2;
46563
+ var _a2, _b;
46458
46564
  const createParams = (sourceChainId) => {
46459
46565
  return {
46460
46566
  timeoutSeconds,
@@ -46504,6 +46610,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46504
46610
  if (!(feeRouteUserAddresses == null ? void 0 : feeRouteUserAddresses.length)) return;
46505
46611
  track("execute route", {
46506
46612
  gasOnReceive: true,
46613
+ isFeeRouteAvailable: true,
46507
46614
  isDestinationFeeBalanceAvailable: isDestinationFeeBalanceAvailable.data,
46508
46615
  mainRoute,
46509
46616
  feeRoute
@@ -46528,6 +46635,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46528
46635
  if (!userAddresses.length) return;
46529
46636
  track("execute route", {
46530
46637
  gasOnReceive: false,
46638
+ isFeeRouteAvailable: !!((_a2 = gorRoute.data) == null ? void 0 : _a2.gasOnReceiveAsset),
46531
46639
  isDestinationFeeBalanceAvailable: isDestinationFeeBalanceAvailable.data,
46532
46640
  mainRoute: route2
46533
46641
  });
@@ -46541,7 +46649,7 @@ const skipSubmitSwapExecutionAtom = atomWithMutation((get) => {
46541
46649
  } catch (error) {
46542
46650
  console.error(error);
46543
46651
  const currentTransaction = get(currentTransactionAtom);
46544
- (_a2 = submitSwapExecutionCallbacks == null ? void 0 : submitSwapExecutionCallbacks.onError) == null ? void 0 : _a2.call(submitSwapExecutionCallbacks, error, currentTransaction == null ? void 0 : currentTransaction.transactionDetails);
46652
+ (_b = submitSwapExecutionCallbacks == null ? void 0 : submitSwapExecutionCallbacks.onError) == null ? void 0 : _b.call(submitSwapExecutionCallbacks, error, currentTransaction == null ? void 0 : currentTransaction.transactionDetails);
46545
46653
  }
46546
46654
  return null;
46547
46655
  },
@@ -46742,20 +46850,38 @@ const UnexpectedErrorPageTransactionReverted = ({
46742
46850
  {
46743
46851
  title: "Action Required",
46744
46852
  description: /* @__PURE__ */ jsxs(Fragment, { children: [
46745
- /* @__PURE__ */ jsxs(SmallText, { lineHeight: "1.5", color: theme.warning.text, textAlign: "center", textWrap: "balance", children: [
46746
- "This transaction reverted while trying to execute.",
46747
- /* @__PURE__ */ jsx("br", {}),
46748
- "You can continue executing this transaction now."
46749
- ] }),
46750
- /* @__PURE__ */ jsxs(SmallText, { lineHeight: "1.5", color: theme.primary.text.lowContrast, textAlign: "center", textWrap: "balance", children: [
46751
- "Current asset location: ",
46752
- assetDetails == null ? void 0 : assetDetails.amount,
46753
- " ",
46754
- assetDetails == null ? void 0 : assetDetails.symbol,
46755
- " on",
46756
- " ",
46757
- assetDetails == null ? void 0 : assetDetails.chainName
46758
- ] }),
46853
+ /* @__PURE__ */ jsxs(
46854
+ SmallText,
46855
+ {
46856
+ lineHeight: "1.5",
46857
+ color: theme.warning.text,
46858
+ textAlign: "center",
46859
+ textWrap: "balance",
46860
+ children: [
46861
+ "This transaction reverted while trying to execute.",
46862
+ /* @__PURE__ */ jsx("br", {}),
46863
+ "You can continue executing this transaction now."
46864
+ ]
46865
+ }
46866
+ ),
46867
+ /* @__PURE__ */ jsxs(
46868
+ SmallText,
46869
+ {
46870
+ lineHeight: "1.5",
46871
+ color: theme.primary.text.lowContrast,
46872
+ textAlign: "center",
46873
+ textWrap: "balance",
46874
+ children: [
46875
+ "Current asset location: ",
46876
+ assetDetails == null ? void 0 : assetDetails.amount,
46877
+ " ",
46878
+ assetDetails == null ? void 0 : assetDetails.symbol,
46879
+ " on",
46880
+ " ",
46881
+ assetDetails == null ? void 0 : assetDetails.chainName
46882
+ ]
46883
+ }
46884
+ ),
46759
46885
  /* @__PURE__ */ jsx(Row, { gap: 25, justify: "center", children: /* @__PURE__ */ jsxs(
46760
46886
  Row,
46761
46887
  {
@@ -48931,7 +49057,7 @@ const RouteArrow = ({ color = "currentColor" }) => /* @__PURE__ */ jsx("svg", {
48931
49057
  function formatUSD(amount) {
48932
49058
  const amountNumber = typeof amount === "string" ? parseFloat(amount) : amount;
48933
49059
  const minDisplayable = 1 / Math.pow(10, 2);
48934
- if (amountNumber > 0 && amountNumber < minDisplayable) {
49060
+ if (amountNumber >= 0 && amountNumber < minDisplayable) {
48935
49061
  return `< ${usdFormatter.format(minDisplayable)}`;
48936
49062
  }
48937
49063
  return usdFormatter.format(amountNumber);
@@ -52197,7 +52323,6 @@ const useHandleTransactionFailed = (error, statusData) => {
52197
52323
  const setCurrentPage = useSetAtom(currentPageAtom);
52198
52324
  const setSourceAsset = useSetAtom(sourceAssetAtom);
52199
52325
  const setCurrentTransactionId = useSetAtom(setCurrentTransactionIdAtom);
52200
- const setDebouncedSourceAssetAmount = useSetAtom(debouncedSourceAssetAmountAtom);
52201
52326
  const currentTransaction = useAtomValue(currentTransactionAtom);
52202
52327
  const [{ data: assets2 }] = useAtom(skipAssetsAtom);
52203
52328
  const { route: route2 } = useAtomValue(swapExecutionStateAtom);
@@ -52232,9 +52357,12 @@ const useHandleTransactionFailed = (error, statusData) => {
52232
52357
  onClickContinueTransaction: () => {
52233
52358
  var _a2;
52234
52359
  setSourceAsset({
52235
- ...sourceClientAsset
52360
+ ...sourceClientAsset,
52361
+ amount: convertTokenAmountToHumanReadableAmount(
52362
+ ((_a2 = statusData == null ? void 0 : statusData.transferAssetRelease) == null ? void 0 : _a2.amount) ?? "",
52363
+ sourceClientAsset.decimals
52364
+ )
52236
52365
  });
52237
- setDebouncedSourceAssetAmount((_a2 = statusData == null ? void 0 : statusData.transferAssetRelease) == null ? void 0 : _a2.amount, void 0, true);
52238
52366
  setCurrentPage(Routes.SwapPage);
52239
52367
  setErrorWarning(void 0);
52240
52368
  },
@@ -52268,7 +52396,6 @@ const useHandleTransactionFailed = (error, statusData) => {
52268
52396
  route2,
52269
52397
  setCurrentPage,
52270
52398
  setCurrentTransactionId,
52271
- setDebouncedSourceAssetAmount,
52272
52399
  setErrorWarning,
52273
52400
  setSourceAsset,
52274
52401
  statusData == null ? void 0 : statusData.transferAssetRelease
@@ -52334,13 +52461,10 @@ const SwitchThumb = dt.div`
52334
52461
  transform: translateX(${({ checked }) => checked ? "16px" : "0"});
52335
52462
  `;
52336
52463
  const Switch = ({ checked = false, onChange }) => {
52337
- const [isChecked, setIsChecked] = useState(checked);
52338
52464
  const toggle = () => {
52339
- const newVal = !isChecked;
52340
- setIsChecked(newVal);
52341
- onChange == null ? void 0 : onChange(newVal);
52465
+ onChange == null ? void 0 : onChange(!checked);
52342
52466
  };
52343
- return /* @__PURE__ */ jsx(SwitchWrapper, { checked: isChecked, onClick: toggle, children: /* @__PURE__ */ jsx(SwitchThumb, { checked: isChecked }) });
52467
+ return /* @__PURE__ */ jsx(SwitchWrapper, { checked, onClick: toggle, children: /* @__PURE__ */ jsx(SwitchThumb, { checked }) });
52344
52468
  };
52345
52469
  const SpinnerIcon = (props) => {
52346
52470
  return /* @__PURE__ */ jsxs("svg", { fill: "none", viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg", ...props, children: [
@@ -53533,7 +53657,7 @@ const useConnectToMissingCosmosChain = () => {
53533
53657
  };
53534
53658
  const name = "@skip-go/widget";
53535
53659
  const description = "Swap widget";
53536
- const version = "3.14.0";
53660
+ const version = "3.14.2";
53537
53661
  const repository = {
53538
53662
  url: "https://github.com/skip-mev/skip-go",
53539
53663
  directory: "packages/widget"
@@ -53595,7 +53719,7 @@ const devDependencies = {
53595
53719
  "@typescript-eslint/parser": "^7.15.0",
53596
53720
  "@vitejs/plugin-react": "^4.3.1",
53597
53721
  buffer: "^6.0.3",
53598
- "chain-registry": "^2.0.34",
53722
+ "chain-registry": "^2.0.37",
53599
53723
  download: "^8.0.0",
53600
53724
  eslint: "^9.9.0",
53601
53725
  "eslint-config-prettier": "^9.1.0",
@@ -1,4 +1,4 @@
1
- import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-D_ZwdovB.js";
1
+ import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-C_crDt8u.js";
2
2
  import qg, { PROPOSAL_EXPIRY_MESSAGE } from "@walletconnect/sign-client";
3
3
  const global = globalThis || void 0 || self;
4
4
  var buffer$1 = {};
package/build/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { W, d, l, o, r, s } from "./index-D_ZwdovB.js";
1
+ import { W, d, l, o, r, s } from "./index-C_crDt8u.js";
2
2
  export {
3
3
  W as Widget,
4
4
  d as defaultTheme,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skip-go/widget",
3
3
  "description": "Swap widget",
4
- "version": "3.14.0",
4
+ "version": "3.14.2",
5
5
  "repository": {
6
6
  "url": "https://github.com/skip-mev/skip-go",
7
7
  "directory": "packages/widget"
@@ -41,7 +41,7 @@
41
41
  "@penumbra-zone/protobuf": "^7.2.0",
42
42
  "@penumbra-zone/transport-dom": "^7.5.0",
43
43
  "@r2wc/react-to-web-component": "^2.0.3",
44
- "@skip-go/client": "1.5.0",
44
+ "@skip-go/client": "1.5.1",
45
45
  "@solana/spl-token": "^0.4.8",
46
46
  "@solana/wallet-adapter-ledger": "^0.9.25",
47
47
  "@solana/wallet-adapter-react": "^0.15.39",