@skip-go/widget 2.4.2 → 2.4.3
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 +5 -8
- package/build/index.es.js.map +1 -1
- package/package.json +1 -1
package/build/index.es.js
CHANGED
|
@@ -4866,7 +4866,7 @@ const PreviewRoute = ({ route, disclosure, isAmountError, }) => {
|
|
|
4866
4866
|
const { data: chains } = useChains();
|
|
4867
4867
|
const getChain = (chainID) => chains === null || chains === void 0 ? void 0 : chains.find((chain) => chain.chainID === chainID);
|
|
4868
4868
|
const { makeWallets } = useMakeWallets();
|
|
4869
|
-
const { onTransactionBroadcasted, onTransactionComplete, onTransactionFailed } = useCallbackStore.getState();
|
|
4869
|
+
const { onTransactionBroadcasted, onTransactionComplete, onTransactionFailed, } = useCallbackStore.getState();
|
|
4870
4870
|
const [isExpanded, setIsExpanded] = useState(() => route.chainIDs.length === 2 ? true : false);
|
|
4871
4871
|
const [isOpen, control] = disclosure;
|
|
4872
4872
|
const [indexSetAddressDialogOpen, setIndexIsSetAddressDialogOpen] = useState();
|
|
@@ -5020,9 +5020,7 @@ const PreviewRoute = ({ route, disclosure, isAmountError, }) => {
|
|
|
5020
5020
|
throw new Error('User rejected request');
|
|
5021
5021
|
}
|
|
5022
5022
|
onTransactionFailed === null || onTransactionFailed === void 0 ? void 0 : onTransactionFailed({
|
|
5023
|
-
error: err instanceof Error
|
|
5024
|
-
? `${err.name}: ${err.message}`
|
|
5025
|
-
: String(err)
|
|
5023
|
+
error: err instanceof Error ? `${err.name}: ${err.message}` : String(err),
|
|
5026
5024
|
});
|
|
5027
5025
|
throw err;
|
|
5028
5026
|
}
|
|
@@ -5036,9 +5034,7 @@ const PreviewRoute = ({ route, disclosure, isAmountError, }) => {
|
|
|
5036
5034
|
onError: (err) => {
|
|
5037
5035
|
console.error(err);
|
|
5038
5036
|
onTransactionFailed === null || onTransactionFailed === void 0 ? void 0 : onTransactionFailed({
|
|
5039
|
-
error: err instanceof Error
|
|
5040
|
-
? `${err.name}: ${err.message}`
|
|
5041
|
-
: String(err)
|
|
5037
|
+
error: err instanceof Error ? `${err.name}: ${err.message}` : String(err),
|
|
5042
5038
|
});
|
|
5043
5039
|
toast(({ createdAt, id }) => (jsxs("div", { className: "flex flex-col", children: [jsx("h4", { className: "mb-2 font-bold", children: "Transaction Failed!" }), jsxs(StyledBorderDiv, { as: "pre", className: "mb-4 overflow-auto whitespace-pre-wrap break-all rounded border p-2 font-diatypeMono text-xs", children: [err instanceof Error
|
|
5044
5040
|
? `${err.name}: ${err.message}`
|
|
@@ -5137,7 +5133,8 @@ const PreviewRoute = ({ route, disclosure, isAmountError, }) => {
|
|
|
5137
5133
|
!submitMutation.isPending &&
|
|
5138
5134
|
!submitMutation.isSuccess && (jsx("p", { className: "text-balance text-center text-sm font-medium text-red-500", children: typeof isAmountError === 'string'
|
|
5139
5135
|
? isAmountError
|
|
5140
|
-
: '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
|
|
5136
|
+
: '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 &&
|
|
5137
|
+
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 &&
|
|
5141
5138
|
!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, {})] })] }) }));
|
|
5142
5139
|
};
|
|
5143
5140
|
const HREF_COMMON_FINALITY_TIMES = `https://docs.axelar.dev/learn/txduration#common-finality-time-for-interchain-transactions`;
|