@skip-go/widget 3.14.2 → 3.14.4

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.
@@ -45679,7 +45679,7 @@ function walletConnect(parameters) {
45679
45679
  const optionalChains = config2.chains.map((x2) => x2.id);
45680
45680
  if (!optionalChains.length)
45681
45681
  return;
45682
- const { EthereumProvider } = await import("./index.es-CNXyATqX.js");
45682
+ const { EthereumProvider } = await import("./index.es-D8nY1geH.js");
45683
45683
  return await EthereumProvider.init({
45684
45684
  ...parameters,
45685
45685
  disableProviderPing: true,
@@ -46096,9 +46096,9 @@ const gasOnReceiveRouteRequestAtom = atom$1((get) => {
46096
46096
  if (!(sourceAsset == null ? void 0 : sourceAsset.chainId) || !sourceAsset.denom || !destinationFeeAssets) return;
46097
46097
  const sourceAssetUsdPrice = (_f = (_e2 = (_d = (_c = (_b = balances2 == null ? void 0 : balances2.data) == null ? void 0 : _b.chains) == null ? void 0 : _c[sourceAsset == null ? void 0 : sourceAsset.chainId]) == null ? void 0 : _d.denoms) == null ? void 0 : _e2[sourceAsset == null ? void 0 : sourceAsset.denom]) == null ? void 0 : _f.price;
46098
46098
  if (!sourceAssetUsdPrice) return;
46099
- const amount = BigNumber(sourceAssetUsdPrice).multipliedBy(amountUsd).toString();
46099
+ const amount = BigNumber(amountUsd).dividedBy(sourceAssetUsdPrice).toString();
46100
46100
  return {
46101
- amountIn: convertHumanReadableAmountToCryptoAmount(amount, destinationAsset == null ? void 0 : destinationAsset.decimals),
46101
+ amountIn: convertHumanReadableAmountToCryptoAmount(amount, sourceAsset == null ? void 0 : sourceAsset.decimals),
46102
46102
  sourceAssetChainId: sourceAsset.chainId,
46103
46103
  sourceAssetDenom: sourceAsset.denom,
46104
46104
  destAssetChainId: destinationAsset == null ? void 0 : destinationAsset.chainId,
@@ -47607,7 +47607,13 @@ const GroupedAssetImage = ({
47607
47607
  return (_a2 = asset.logoUri) == null ? void 0 : _a2.includes("chain-registry");
47608
47608
  })) == null ? void 0 : _a.logoUri,
47609
47609
  ...(groupedAsset == null ? void 0 : groupedAsset.assets.map((asset) => asset.logoUri)) ?? []
47610
- ].filter((uri) => !!uri);
47610
+ ].filter((uri) => !!uri).sort((a, b) => {
47611
+ const aHasWormhole = a.toLowerCase().includes("wormhole");
47612
+ const bHasWormhole = b.toLowerCase().includes("wormhole");
47613
+ if (aHasWormhole && !bHasWormhole) return 1;
47614
+ if (!aHasWormhole && bHasWormhole) return -1;
47615
+ return 0;
47616
+ });
47611
47617
  const dedupedLogoUris = Array.from(new Set(allLogoUris));
47612
47618
  const croppedImage = useCroppedImage(dedupedLogoUris[currentImageIndex]);
47613
47619
  if (!(groupedAsset == null ? void 0 : groupedAsset.assets) || groupedAsset.assets.length === 0) {
@@ -50777,13 +50783,14 @@ const SwapPageFooterItems = ({
50777
50783
  highlightSettings = false
50778
50784
  }) => {
50779
50785
  const { data: route2, isLoading } = useAtomValue(skipRouteAtom);
50786
+ const currentPage = useAtomValue(currentPageAtom);
50780
50787
  const routePreference = useAtomValue(routePreferenceAtom);
50781
50788
  const settingsChanged = useSettingsChanged();
50782
50789
  const isMobile2 = useIsMobileScreenSize();
50783
50790
  const isGoFast = useIsGoFast(route2);
50784
50791
  const currentTransaction = useAtomValue(currentTransactionAtom);
50785
50792
  const estimatedSeconds = route2 == null ? void 0 : route2.estimatedRouteDurationSeconds;
50786
- const signaturesRequired = route2 ? (route2 == null ? void 0 : route2.txsRequired) - ((currentTransaction == null ? void 0 : currentTransaction.txsSigned) ?? 0) : 0;
50793
+ const signaturesRequired = route2 ? currentPage === Routes.SwapPage ? route2.txsRequired : route2.txsRequired - ((currentTransaction == null ? void 0 : currentTransaction.txsSigned) ?? 0) : 0;
50787
50794
  const leftContent = () => {
50788
50795
  if (content) return content;
50789
50796
  if (isLoading) return null;
@@ -53657,7 +53664,7 @@ const useConnectToMissingCosmosChain = () => {
53657
53664
  };
53658
53665
  const name = "@skip-go/widget";
53659
53666
  const description = "Swap widget";
53660
- const version = "3.14.2";
53667
+ const version = "3.14.4";
53661
53668
  const repository = {
53662
53669
  url: "https://github.com/skip-mev/skip-go",
53663
53670
  directory: "packages/widget"
@@ -53817,17 +53824,21 @@ const packageJson = {
53817
53824
  publishConfig
53818
53825
  };
53819
53826
  let isAmplitudeInitialized = false;
53827
+ const serverUrl = "https://go.skip.build/api/amplitude";
53820
53828
  const initAmplitude = () => {
53821
53829
  if (isAmplitudeInitialized) return;
53822
53830
  init("14616a575f32087cf0403ab8f3ea3ce0", {
53823
- appVersion: version
53831
+ appVersion: version,
53832
+ serverUrl: `${serverUrl}/httpapi`
53824
53833
  });
53825
53834
  isAmplitudeInitialized = true;
53826
53835
  };
53827
53836
  const startAmplitudeSessionReplay = () => {
53828
53837
  if (isAmplitudeInitialized) {
53829
53838
  const plugin = sessionReplayPlugin({
53830
- sampleRate: 1
53839
+ sampleRate: 1,
53840
+ trackServerUrl: `${serverUrl}/upload`,
53841
+ configServerUrl: `${serverUrl}/config`
53831
53842
  });
53832
53843
  add(plugin);
53833
53844
  }
@@ -1,4 +1,4 @@
1
- import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-C_crDt8u.js";
1
+ import { g as getAugmentedNamespace, c as commonjsGlobal, a as getDefaultExportFromCjs, p as process$1 } from "./index-Be7LbriZ.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-C_crDt8u.js";
1
+ import { W, d, l, o, r, s } from "./index-Be7LbriZ.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.2",
4
+ "version": "3.14.4",
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.1",
44
+ "@skip-go/client": "1.5.2",
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",