@skip-go/widget 2.3.4 → 2.3.6

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/build/index.es.js CHANGED
@@ -4654,7 +4654,9 @@ const makeChainIDsWithAction = ({ route, actions, }) => {
4654
4654
  return (action.fromChainID === chainRoute[0] &&
4655
4655
  action.toChainID === chainRoute[1]);
4656
4656
  });
4657
- const swapAction = actions.find((action) => {
4657
+ const reversedActions = actions.slice().reverse();
4658
+ // Find the last swap action that matches conditions
4659
+ const swapAction = reversedActions.find((action) => {
4658
4660
  if (index === 0 &&
4659
4661
  actions.length <= 2 &&
4660
4662
  action.type === 'SWAP' &&
@@ -4947,7 +4949,7 @@ const PreviewRoute = ({ route, disclosure, isAmountError, }) => {
4947
4949
  isPending: submitMutation.isPending,
4948
4950
  }, setShowLedgerWarning: setShowLedgerWarning, setIsAddressDialogOpen: (v) => setIndexIsSetAddressDialogOpen(v), isSetAddressDialogOpen: indexSetAddressDialogOpen === index, isExpanded: isExpanded, setIsExpanded: setIsExpanded, isOpen: isOpen, chainAddresses: chainAddresses, setChainAddresses: setChainAddresses }, `${index}-${chainID}`))) }), jsxs("div", { className: "flex-1 space-y-4", children: [(statusData === null || statusData === void 0 ? void 0 : statusData.isSuccess) && submitMutation.isSuccess ? (jsxs("div", { className: "flex flex-row items-center space-x-2 font-semibold", children: [jsx(CheckCircleIcon, { className: "h-8 w-8 text-green-500" }), jsxs("p", { children: [route.doesSwap &&
4949
4951
  `Successfully swapped ${(_b = (_a = getAsset(route.sourceAssetDenom, route.sourceAssetChainID)) === null || _a === void 0 ? void 0 : _a.recommendedSymbol) !== null && _b !== void 0 ? _b : route.sourceAssetDenom} for ${(_d = (_c = getAsset(route.destAssetDenom, route.destAssetChainID)) === null || _c === void 0 ? void 0 : _c.recommendedSymbol) !== null && _d !== void 0 ? _d : route.destAssetDenom}`, !route.doesSwap &&
4950
- `Successfully transfered ${(_f = (_e = getAsset(route.sourceAssetDenom, route.sourceAssetChainID)) === null || _e === void 0 ? void 0 : _e.recommendedSymbol) !== null && _f !== void 0 ? _f : route.sourceAssetDenom} from ${(_g = chains === null || chains === void 0 ? void 0 : chains.find((c) => c.chainID === route.sourceAssetChainID)) === null || _g === void 0 ? void 0 : _g.prettyName} to ${(_h = chains === null || chains === void 0 ? void 0 : chains.find((c) => c.chainID === route.destAssetChainID)) === null || _h === void 0 ? void 0 : _h.prettyName}`] })] })) : route.txsRequired === broadcastedTxs.length ? (jsxs("div", { className: "flex w-full items-center justify-center space-x-2 text-sm font-medium", children: [jsx(CheckCircleIcon, { className: "h-8 w-8 text-green-500" }), jsx("p", { className: "text-sm font-semibold", children: "You can safely navigate away from this page while your transaction is pending" })] })) : null, estimatedFinalityTime !== '' && (jsxs(Root, { type: "info", children: [jsxs(Trigger, { children: ["EVM bridging finality time is ", estimatedFinalityTime] }), jsx(Content, { children: jsxs("p", { children: ["This swap contains at least one EVM chain, so it might take longer. Read more about", ' ', jsx("a", { href: HREF_COMMON_FINALITY_TIMES, className: "underline", target: "_blank", rel: "noopener noreferrer", children: "common finality times" }), "."] }) })] })), _showLedgerWarning.cctp && (jsx(Root, { type: "warning", initialOpen: true, children: jsx(Content, { children: jsxs("p", { children: [jsx("b", { children: "WARNING: " }), "go.skip.build does not support signing with Ledger when transferring over CCTP to the Ethereum/Solana ecosystems. We're actively working on fixing this with the Noble/Circle teams. We apologize for the inconvenience"] }) }) })), _showLedgerWarning.ethermint && (jsx(Root, { type: "warning", initialOpen: true, children: jsx(Content, { children: jsxs("p", { children: [jsx("b", { children: "WARNING: " }), "go.skip.build does not support signing with Ledger on Ethermint-like chains (e.g. Injective, Dymension, EVMOS, etc...). We're actively working on fixing this with the Ledger team. We apologize for the inconvenience."] }) }) })), isAmountError &&
4952
+ `Successfully transfered ${(_f = (_e = getAsset(route.sourceAssetDenom, route.sourceAssetChainID)) === null || _e === void 0 ? void 0 : _e.recommendedSymbol) !== null && _f !== void 0 ? _f : route.sourceAssetDenom} from ${(_g = chains === null || chains === void 0 ? void 0 : chains.find((c) => c.chainID === route.sourceAssetChainID)) === null || _g === void 0 ? void 0 : _g.prettyName} to ${(_h = chains === null || chains === void 0 ? void 0 : chains.find((c) => c.chainID === route.destAssetChainID)) === null || _h === void 0 ? void 0 : _h.prettyName}`] })] })) : route.txsRequired === broadcastedTxs.length ? (jsxs("div", { className: "flex w-full items-center justify-center space-x-2 text-sm font-medium", children: [jsx(CheckCircleIcon, { className: "h-8 w-8 text-green-500" }), jsx("p", { className: "text-sm font-semibold", children: "You can safely navigate away from this page while your transaction is pending" })] })) : null, estimatedFinalityTime !== '' && (jsxs(Root, { type: "info", children: [jsxs(Trigger, { children: ["EVM bridging finality time is ", estimatedFinalityTime] }), jsx(Content, { children: jsxs("p", { children: ["This swap contains at least one EVM chain, so it might take longer. Read more about", ' ', jsx("a", { href: HREF_COMMON_FINALITY_TIMES, className: "underline", target: "_blank", rel: "noopener noreferrer", children: "common finality times" }), "."] }) })] })), _showLedgerWarning.cctp && (jsx(Root, { type: "warning", initialOpen: true, children: jsx(Content, { children: jsxs("p", { children: [jsx("b", { children: "WARNING: " }), "Due to a limitation of the Noble chain, signing with Ledger when transferring over CCTP to the Ethereum/Solana ecosystems is not supported. We're actively working on fixing this issue with the Noble team. We apologize for the inconvenience."] }) }) })), _showLedgerWarning.ethermint && (jsx(Root, { type: "warning", initialOpen: true, children: jsx(Content, { children: jsxs("p", { children: [jsx("b", { children: "WARNING: " }), "go.skip.build does not support signing with Ledger on Ethermint-like chains (e.g. Injective, Dymension, EVMOS, etc...). We're actively working on fixing this with the Ledger team. We apologize for the inconvenience."] }) }) })), isAmountError &&
4951
4953
  !submitMutation.isPending &&
4952
4954
  !submitMutation.isSuccess && (jsx("p", { className: "text-balance text-center text-sm font-medium text-red-500", children: typeof isAmountError === 'string'
4953
4955
  ? isAmountError