@skip-go/widget 2.4.10 → 2.4.11

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
@@ -3547,7 +3547,7 @@ const Item = forwardRef(function Item(props, ref) {
3547
3547
  const offset = rect.height / 2;
3548
3548
  const y = top - offset;
3549
3549
  window.scrollTo({ top: y, behavior: 'smooth' });
3550
- }, children: [jsx("span", { className: "HistoryListTriggerText" }), jsx(ChevronDownIcon, { className: cn('h-4 w-4', 'transition-transform group-data-[state=open]:rotate-180'), "aria-hidden": true })] })] }), jsxs(Accordion.Content, { className: cn('space-y-2 overflow-hidden', 'data-[state=open]:animate-accordion-open', 'data-[state=closed]:animate-accordion-closed'), children: [jsxs(Root$2, { className: "pt-2", children: [jsxs(Row, { children: [jsx(Dt, { children: "Chain Route" }), jsx(Dd, { className: "flex flex-wrap items-center", children: data.route.chainIDs.map((chainId, i) => (jsxs(Fragment$1, { children: [i > 0 && jsx(ArrowRightIcon, { className: "mx-1 h-4 w-4" }), jsx(ChainSymbol, { chainId: chainId })] }, i))) })] }), data.txStatus.map((stat, i) => (jsxs(Row, { children: [jsxs(Dt, { className: "tabular-nums", children: ["Transaction ", i + 1] }), jsxs(Dd, { className: "space-y-1", children: [jsxs("a", { href: stat.explorerLink, target: "_blank", className: "flex items-center space-x-px hover:underline", children: [jsx("span", { className: "max-w-[24ch] truncate tabular-nums", children: stat.txHash }), jsx(ArrowTopRightOnSquareIcon$1, { className: "h-3 w-3" })] }), stat.axelarscanLink ? (jsxs("a", { href: stat.axelarscanLink, target: "_blank", className: "flex items-center space-x-px hover:underline", children: [jsx("span", { className: "max-w-[24ch] truncate tabular-nums", children: "Axelarscan" }), jsx(ArrowTopRightOnSquareIcon$1, { className: "h-3 w-3" })] })) : null] })] }, i))), jsxs(Row, { children: [jsx(Dt, { children: "Estimation Completion Time" }), jsxs(Dd, { children: ["~", convertSecondsToMinutesOrHours(data.route.estimatedRouteDurationSeconds)] })] })] }), jsx("div", { className: "flex space-x-1", children: jsxs(StyledHighlightButton, { className: cn('rounded-md border px-2 py-1 text-xs transition-colors', 'flex flex-grow items-center justify-center space-x-1'), onClick: () => {
3550
+ }, children: [jsx("span", { className: "HistoryListTriggerText" }), jsx(ChevronDownIcon, { className: cn('h-4 w-4', 'transition-transform group-data-[state=open]:rotate-180'), "aria-hidden": true })] })] }), jsxs(Accordion.Content, { className: cn('space-y-2 overflow-hidden', 'data-[state=open]:animate-accordion-open', 'data-[state=closed]:animate-accordion-closed'), children: [jsxs(Root$2, { className: "pt-2", children: [jsxs(Row, { children: [jsx(Dt, { children: "Chain Route" }), jsx(Dd, { className: "flex flex-wrap items-center", children: data.route.chainIDs.map((chainId, i) => (jsxs(Fragment$1, { children: [i > 0 && jsx(ArrowRightIcon, { className: "mx-1 h-4 w-4" }), jsx(ChainSymbol, { chainId: chainId })] }, i))) })] }), data.txStatus.map((stat, i) => (jsxs(Row, { children: [jsxs(Dt, { className: "tabular-nums", children: ["Transaction ", i + 1] }), jsxs(Dd, { className: "space-y-1", children: [jsxs("a", { href: stat.explorerLink, target: "_blank", className: "flex items-center space-x-px hover:underline", children: [jsx("span", { className: "max-w-[24ch] truncate tabular-nums", children: stat.txHash }), jsx(ArrowTopRightOnSquareIcon$1, { className: "h-3 w-3" })] }), stat.axelarscanLink ? (jsxs("a", { href: stat.axelarscanLink, target: "_blank", className: "flex items-center space-x-px hover:underline", children: [jsx("span", { className: "max-w-[24ch] truncate tabular-nums", children: "Axelarscan" }), jsx(ArrowTopRightOnSquareIcon$1, { className: "h-3 w-3" })] })) : null] })] }, i))), jsxs(Row, { children: [jsx(Dt, { children: "Estimated Completion Time" }), jsxs(Dd, { children: ["~", convertSecondsToMinutesOrHours(data.route.estimatedRouteDurationSeconds)] })] })] }), jsx("div", { className: "flex space-x-1", children: jsxs(StyledHighlightButton, { className: cn('rounded-md border px-2 py-1 text-xs transition-colors', 'flex flex-grow items-center justify-center space-x-1'), onClick: () => {
3551
3551
  disclosure.openJson({ title: 'Tx History JSON', data });
3552
3552
  }, children: [jsx(TrashIcon, { className: "h-3 w-3" }), jsx("span", { children: "Delete" })] }) })] })] }));
3553
3553
  });
@@ -5208,14 +5208,14 @@ const PreviewRoute = ({ route, disclosure, isAmountError, }) => {
5208
5208
  isError: submitMutation.isError,
5209
5209
  isSuccess: submitMutation.isSuccess,
5210
5210
  isPending: submitMutation.isPending,
5211
- }, 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 &&
5211
+ }, setShowLedgerWarning: setShowLedgerWarning, setIsAddressDialogOpen: (v) => setIndexIsSetAddressDialogOpen(v), isSetAddressDialogOpen: indexSetAddressDialogOpen === index, isExpanded: isExpanded, setIsExpanded: setIsExpanded, isOpen: isOpen, chainAddresses: chainAddresses, setChainAddresses: setChainAddresses }, `${index}-${chainID}`))) }), route.estimatedRouteDurationSeconds && (jsxs("div", { className: 'flex flex-row items-center justify-end space-x-2', children: [jsx("span", { className: 'font-semibold text-gray-400', children: "Estimated Time" }), jsxs("div", { className: 'flex flex-row space-x-1 items-center', children: [jsx(FaStopwatch, { className: "h-4 w-4 text-gray-400" }), jsxs("span", { className: 'font-semibold text-gray-400', children: [" ~", convertSecondsToMinutesOrHours(route.estimatedRouteDurationSeconds), ' '] })] })] })), 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 &&
5212
5212
  `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 &&
5213
5213
  `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, _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 &&
5214
5214
  !submitMutation.isPending &&
5215
5215
  !submitMutation.isSuccess && (jsx("p", { className: "text-balance text-center text-sm font-medium text-red-500", children: typeof isAmountError === 'string'
5216
5216
  ? isAmountError
5217
5217
  : 'Insufficient balance.' }))] }), jsxs("div", { className: "space-y-4", children: [!submitMutation.isError && !submitMutation.isSuccess && (jsx("div", { className: "flex w-full items-center justify-center space-x-2 text-sm font-medium", children: route.txsRequired > 1 &&
5218
- route.txsRequired - broadcastedTxs.length !== 0 ? (jsxs(Fragment, { children: [jsxs("div", { className: "relative rounded-full bg-[#FF486E] p-[4px]", children: [jsx("div", { className: "absolute h-6 w-6 animate-ping rounded-full bg-[#FF486E]" }), jsx(FingerPrintIcon, { className: "relative h-6 w-6 text-white" })] }), jsxs("p", { children: [route.txsRequired - broadcastedTxs.length, " SIGNATURES", ' ', submitMutation.isPending ? 'REMAINING' : 'REQUIRED'] })] })) : null })), route.estimatedRouteDurationSeconds && (jsxs("div", { className: 'flex flex-row items-center justify-end space-x-2', children: [jsx("span", { className: 'font-semibold', children: "Estimated Time" }), jsxs("div", { className: 'flex flex-row space-x-1 items-center', children: [jsx(FaStopwatch, { className: "h-4 w-4" }), jsxs("span", { className: 'font-semibold', children: [" ~", convertSecondsToMinutesOrHours(route.estimatedRouteDurationSeconds), ' '] })] })] })), submitMutation.isPending || submitMutation.isSuccess ? (jsx(StyledBrandDiv, { as: "button", className: cn('w-full rounded-md py-4 font-semibold text-white', 'outline-none transition-transform', 'enabled:hover:rotate-1 enabled:hover:scale-105', 'disabled:cursor-not-allowed disabled:opacity-75'), onClick: control.close, disabled: route.txsRequired !== broadcastedTxs.length, children: route.txsRequired !== broadcastedTxs.length &&
5218
+ route.txsRequired - broadcastedTxs.length !== 0 ? (jsxs(Fragment, { children: [jsxs("div", { className: "relative rounded-full bg-[#FF486E] p-[4px]", children: [jsx("div", { className: "absolute h-6 w-6 animate-ping rounded-full bg-[#FF486E]" }), jsx(FingerPrintIcon, { className: "relative h-6 w-6 text-white" })] }), jsxs("p", { children: [route.txsRequired - broadcastedTxs.length, " SIGNATURES", ' ', submitMutation.isPending ? 'REMAINING' : 'REQUIRED'] })] })) : null })), submitMutation.isPending || submitMutation.isSuccess ? (jsx(StyledBrandDiv, { as: "button", className: cn('w-full rounded-md py-4 font-semibold text-white', 'outline-none transition-transform', 'enabled:hover:rotate-1 enabled:hover:scale-105', 'disabled:cursor-not-allowed disabled:opacity-75'), onClick: control.close, disabled: route.txsRequired !== broadcastedTxs.length, children: route.txsRequired !== broadcastedTxs.length &&
5219
5219
  !submitMutation.isSuccess ? (jsxs("svg", { className: "inline-block h-4 w-4 animate-spin text-white", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [jsx("circle", { className: "opacity-25", cx: 12, cy: 12, r: 10, stroke: "currentColor", strokeWidth: 4 }), jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] })) : (jsxs("span", { className: "text-white", children: ["Create New ", route.doesSwap ? 'Swap' : 'Transfer'] })) })) : (jsx(SubmitButton, {})), jsx(CraftedBySkip, {})] })] }) }));
5220
5220
  };
5221
5221
  const StyledBrandTextButton = styled.button `
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@skip-go/widget",
3
3
  "description": "Swap widget",
4
- "version": "2.4.10",
4
+ "version": "2.4.11",
5
5
  "repository": "https://github.com/skip-mev/widget",
6
6
  "type": "module",
7
7
  "exports": {
@@ -62,7 +62,7 @@
62
62
  "@radix-ui/react-scroll-area": "^1.0.5",
63
63
  "@radix-ui/react-switch": "^1.0.3",
64
64
  "@radix-ui/react-tooltip": "^1.0.7",
65
- "@skip-go/client": "0.8.1",
65
+ "@skip-go/client": "0.8.2",
66
66
  "@solana/spl-token": "^0.4.6",
67
67
  "@solana/wallet-adapter-react": "^0.15.35",
68
68
  "@solana/wallet-adapter-wallets": "^0.19.32",