@skip-go/widget 2.3.6 → 2.3.8
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/hooks/use-assets.d.ts +2 -2
- package/build/hooks/use-auto-set-address.d.ts +1 -1
- package/build/hooks/use-balances-by-chain.d.ts +1 -1
- package/build/hooks/use-bridges.d.ts +1 -1
- package/build/hooks/use-broadcasted-txs.d.ts +1 -1
- package/build/hooks/use-chains.d.ts +1 -1
- package/build/hooks/use-finality-time-estimate.d.ts +1 -1
- package/build/hooks/use-route.d.ts +2 -2
- package/build/hooks/use-skip-client.d.ts +2 -2
- package/build/hooks/use-swap-widget.d.ts +2 -2
- package/build/index.es.js +6 -2
- package/build/index.es.js.map +1 -1
- package/build/provider/assets.d.ts +1 -1
- package/build/provider/index.d.ts +1 -1
- package/build/provider/skip-provider.d.ts +1 -1
- package/build/store/tx-history.d.ts +1 -1
- package/build/ui/AssetInput.d.ts +1 -1
- package/build/ui/AssetSelect/AssetSelectContent.d.ts +1 -1
- package/build/ui/AssetSelect/index.d.ts +1 -1
- package/build/ui/ConversionRate.d.ts +1 -1
- package/build/ui/PreviewRoute/ChainStep.d.ts +1 -1
- package/build/ui/PreviewRoute/SetAddressDialog.d.ts +1 -1
- package/build/ui/PreviewRoute/index.d.ts +1 -1
- package/build/ui/PreviewRoute/make-actions.d.ts +1 -1
- package/build/ui/PreviewRoute/make-chain-ids-with-actions.d.ts +1 -1
- package/build/ui/PreviewRoute/make-step-state.d.ts +1 -1
- package/build/ui/SwapDetails.d.ts +1 -1
- package/build/ui/TransactionDialog.d.ts +1 -1
- package/build/utils/ledger-warning.d.ts +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssetsRequest } from '@skip-go/
|
|
1
|
+
import { AssetsRequest } from '@skip-go/client';
|
|
2
2
|
export declare function useAssets(options?: AssetsRequest): import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
|
|
3
|
-
[k: string]: import("@skip-go/
|
|
3
|
+
[k: string]: import("@skip-go/client/dist/shared-CvoSvr3u").a[];
|
|
4
4
|
}, Error>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chain } from '@skip-go/
|
|
1
|
+
import { Chain } from '@skip-go/client';
|
|
2
2
|
import { ChainAddresses, SetChainAddressesParam } from '../ui/PreviewRoute/types';
|
|
3
3
|
export declare const useAutoSetAddress: ({ chain, chainID, index, enabled, signRequired, chainAddresses, setChainAddresses, }: {
|
|
4
4
|
chain?: Chain | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RouteResponse } from '@skip-go/
|
|
1
|
+
import { RouteResponse } from '@skip-go/client';
|
|
2
2
|
export declare function useFinalityTimeEstimate(route: RouteResponse): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BridgeType, ExperimentalFeature, SmartSwapOptions, SwapVenueRequest } from '@skip-go/
|
|
1
|
+
import { BridgeType, ExperimentalFeature, SmartSwapOptions, SwapVenueRequest } from '@skip-go/client';
|
|
2
2
|
export interface RouteConfig {
|
|
3
3
|
experimentalFeatures?: ExperimentalFeature[];
|
|
4
4
|
allowMultiTx?: boolean;
|
|
@@ -16,5 +16,5 @@ interface UseRouteArgs extends RouteConfig {
|
|
|
16
16
|
destinationAssetChainID?: string;
|
|
17
17
|
enabled?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare function useRoute({ direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, enabled, swapVenues, bridges, experimentalFeatures, allowMultiTx, allowUnsafe, smartSwapOptions, }: UseRouteArgs): import("@tanstack/react-query/build/legacy/types").UseQueryResult<import("@skip-go/
|
|
19
|
+
export declare function useRoute({ direction, amount, sourceAsset, sourceAssetChainID, destinationAsset, destinationAssetChainID, enabled, swapVenues, bridges, experimentalFeatures, allowMultiTx, allowUnsafe, smartSwapOptions, }: UseRouteArgs): import("@tanstack/react-query/build/legacy/types").UseQueryResult<import("@skip-go/client/dist/shared-CvoSvr3u").R | undefined, Error>;
|
|
20
20
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare function useSkipClient(): import("@skip-go/
|
|
1
|
+
export declare function useSkipClient(): import("@skip-go/client").SkipRouter;
|
|
2
2
|
export declare function useSkipConfig(): {
|
|
3
3
|
apiURL: string | undefined;
|
|
4
4
|
endpointOptions: {
|
|
5
|
-
endpoints?: Record<string, import("@skip-go/
|
|
5
|
+
endpoints?: Record<string, import("@skip-go/client").EndpointOptions> | undefined;
|
|
6
6
|
getRpcEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
|
|
7
7
|
getRestEndpointForChain?: ((chainID: string) => Promise<string>) | undefined;
|
|
8
8
|
} | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GasPrice } from '@cosmjs/stargate';
|
|
2
|
-
import { Asset, BridgeType } from '@skip-go/
|
|
2
|
+
import { Asset, BridgeType } from '@skip-go/client';
|
|
3
3
|
import { MouseEvent } from 'react';
|
|
4
4
|
import { Chain } from './use-chains';
|
|
5
5
|
export interface DefaultRouteConfig {
|
|
@@ -31,7 +31,7 @@ export declare function useSwapWidget(persistSwapWidgetState?: boolean): {
|
|
|
31
31
|
onSourceAssetChange: (asset: Asset) => void;
|
|
32
32
|
onSourceChainChange: (chain: Chain, injectAsset?: Asset) => Promise<void>;
|
|
33
33
|
priceImpactThresholdReached: boolean;
|
|
34
|
-
route: import("@skip-go/
|
|
34
|
+
route: import("@skip-go/client/dist/shared-CvoSvr3u").R | undefined;
|
|
35
35
|
routeError: string;
|
|
36
36
|
routeLoading: boolean;
|
|
37
37
|
routeWarningMessage: string | undefined;
|
package/build/index.es.js
CHANGED
|
@@ -14,7 +14,7 @@ import { arbitrum, avalanche, base, bsc, celo, fantom, filecoin, kava, linea, ma
|
|
|
14
14
|
import { QueryClient, QueryClientProvider, useQuery, useMutation } from '@tanstack/react-query';
|
|
15
15
|
import { WalletProvider as WalletProvider$1, useWallet } from '@solana/wallet-adapter-react';
|
|
16
16
|
import { PhantomWalletAdapter, SolflareWalletAdapter, CoinbaseWalletAdapter, TrustWalletAdapter, LedgerWalletAdapter } from '@solana/wallet-adapter-wallets';
|
|
17
|
-
import { SkipRouter } from '@skip-go/
|
|
17
|
+
import { SkipRouter } from '@skip-go/client';
|
|
18
18
|
import { getWalletClient } from '@wagmi/core';
|
|
19
19
|
import { createContext, useContext, useMemo, useCallback, useRef, useState, useEffect, forwardRef, Fragment as Fragment$1 } from 'react';
|
|
20
20
|
import { create } from 'zustand';
|
|
@@ -4070,8 +4070,12 @@ const SetAddressDialog = ({ open, onOpen, chain, index, signRequired, isDestinat
|
|
|
4070
4070
|
: wallet.walletInfo.logo.major, "aria-hidden": "true" })), jsx("p", { className: "flex-1 text-left font-semibold", children: wallet.walletPrettyName === 'Leap Cosmos MetaMask'
|
|
4071
4071
|
? 'Metamask (Leap Snap)'
|
|
4072
4072
|
: wallet.walletPrettyName }), wallet.walletName === 'prax' && (jsx(PraxWalletIndex, { praxWalletIndex: praxWalletIndex, setPraxWalletIndex: setPraxWalletIndex }))] }), chainType === 'svm' && wallet.isAvailable !== true && (jsx("div", { className: "absolute right-4 top-1/2 flex -translate-y-1/2 items-center gap-1 rounded-lg bg-[#c2c2c2]/20 px-2.5 py-1 text-xs font-semibold text-[#909090] transition-colors focus:outline-none group-hover:bg-[#c2c2c2]/30", children: "Not Installed" }))] }, wallet.walletName));
|
|
4073
|
-
}), !chain.chainID.includes('penumbra') && !signRequired && (jsx("div", { className: "group relative mb-2 data-[unsupported=true]:opacity-30", children: isEditing ? (jsxs("div", { className: "flex items-center space-x-2 py-2 px-1", children: [jsx(
|
|
4073
|
+
}), !chain.chainID.includes('penumbra') && !signRequired && (jsx("div", { className: "group relative mb-2 data-[unsupported=true]:opacity-30", children: isEditing ? (jsxs("div", { className: "flex items-center space-x-2 py-2 px-1", children: [jsx(StyledAddressInput, { as: "input", type: "text", className: cn(`w-full rounded-md border px-2 py-1`, !isValid && 'border-red-500'), placeholder: placeholder, value: address, onChange: (e) => setAddress(e.target.value) }), jsx(StyledApproveButton, { as: "button", className: cn('flex w-12 items-center justify-center rounded-md border-2 text-sm text-white', 'disabled:cursor-not-allowed'), onClick: () => save(), disabled: !isValid, children: jsx(MdCheck, { className: "size-6" }) }), jsx(StyledCancelButton, { className: cn('flex w-12 items-center justify-center rounded-md border-2'), onClick: () => cancel(), children: jsx(MdClose, { className: "size-6" }) })] })) : (jsxs(StyledThemedButton, { onClick: () => setIsEditing(true), className: cn('flex w-full items-center gap-2 rounded-lg p-2 py-3 transition-colors focus:-outline-offset-2'), children: [jsx(FaKeyboard, { className: "mx-[6px] h-[24px] w-[24px] text-neutral-400" }), jsx("p", { className: "flex-1 text-left font-semibold", children: "Set Manually" })] })) }))] }), jsx(ScrollArea.Scrollbar, { className: "z-20 flex touch-none select-none py-4 transition-colors ease-out data-[orientation=horizontal]:h-2 data-[orientation=vertical]:w-2 data-[orientation=horizontal]:flex-col", orientation: "vertical", children: jsx(ScrollArea.Thumb, { className: "relative flex-1 rounded-[10px] bg-neutral-500/50 transition-colors before:absolute before:left-1/2 before:top-1/2 before:h-2 before:w-2 before:-translate-x-1/2 before:-translate-y-1/2 before:content-[''] hover:bg-neutral-500" }) }), jsx(ScrollArea.Corner, {})] })] }) }) }, chainID));
|
|
4074
4074
|
};
|
|
4075
|
+
const StyledAddressInput = styled(StyledBorderDiv) `
|
|
4076
|
+
font-family: 'ABCDiatypeMono';
|
|
4077
|
+
font-variant-numeric: slashed-zero;
|
|
4078
|
+
`;
|
|
4075
4079
|
|
|
4076
4080
|
function useBridges(args = {}) {
|
|
4077
4081
|
const { select = (t) => t } = args;
|