@skip-go/widget 1.2.6 → 1.3.0
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { AssetsRequest } from '@skip-go/core';
|
|
2
2
|
export declare function useAssets(options?: AssetsRequest): import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
|
|
3
|
-
[k: string]: import("@skip-go/core/dist/shared-
|
|
3
|
+
[k: string]: import("@skip-go/core/dist/shared-B_IVVagG").a[];
|
|
4
4
|
}, Error>;
|
|
@@ -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/core/dist/shared-
|
|
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/core/dist/shared-B_IVVagG").R | undefined, Error>;
|
|
20
20
|
export {};
|
|
@@ -31,7 +31,7 @@ export declare function useSwapWidget(): {
|
|
|
31
31
|
onSourceAssetChange: (asset: Asset) => void;
|
|
32
32
|
onSourceChainChange: (chain: Chain, injectAsset?: Asset) => Promise<void>;
|
|
33
33
|
priceImpactThresholdReached: boolean;
|
|
34
|
-
route: import("@skip-go/core/dist/shared-
|
|
34
|
+
route: import("@skip-go/core/dist/shared-B_IVVagG").R | undefined;
|
|
35
35
|
routeError: string;
|
|
36
36
|
routeLoading: boolean;
|
|
37
37
|
routeWarningMessage: string | undefined;
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { SwapWidgetProvider } from './provider';
|
|
2
|
-
export { SwapWidget, SwapWidgetProps } from './ui';
|
|
2
|
+
export { SwapWidget, SwapWidgetProps, SwapWidgetWithoutProviders, SwapWidgetWithoutProvidersProps, } from './ui';
|
|
3
3
|
export { initializeSwapWidget } from './ui/WebComponent';
|
|
4
4
|
export { useAssets } from './provider/assets';
|
|
5
5
|
export { useChains, useChainByID } from './hooks/use-chains';
|
package/build/index.es.js
CHANGED
|
@@ -4778,7 +4778,7 @@ const PreviewRoute = ({ route, disclosure, isAmountError, }) => {
|
|
|
4778
4778
|
await skipClient.executeRoute({
|
|
4779
4779
|
route,
|
|
4780
4780
|
userAddresses,
|
|
4781
|
-
validateGasBalance:
|
|
4781
|
+
validateGasBalance: route.sourceAssetChainID !== '984122',
|
|
4782
4782
|
getFallbackGasAmount: async (chainID, chainType) => {
|
|
4783
4783
|
if (chainType === 'cosmos') {
|
|
4784
4784
|
return Number(useSettingsStore.getState().customGasAmount);
|
|
@@ -5147,6 +5147,20 @@ const useInjectFontsToDocumentHead = () => {
|
|
|
5147
5147
|
}, []);
|
|
5148
5148
|
};
|
|
5149
5149
|
|
|
5150
|
+
const SwapWidgetWithoutProviders = ({ colors, settings, onlyTestnet, defaultRoute, routeConfig, className, style, filter, }) => {
|
|
5151
|
+
useInjectFontsToDocumentHead();
|
|
5152
|
+
useEffect(() => {
|
|
5153
|
+
configureSwapWidget({
|
|
5154
|
+
colors,
|
|
5155
|
+
onlyTestnet,
|
|
5156
|
+
settings,
|
|
5157
|
+
defaultRoute,
|
|
5158
|
+
routeConfig,
|
|
5159
|
+
filter,
|
|
5160
|
+
});
|
|
5161
|
+
}, [colors, onlyTestnet, settings, defaultRoute, routeConfig]);
|
|
5162
|
+
return (jsx(Scope, { stylesheets: [css_248z, css_248z$1, css_248z$2], config: { dsd: 'emulated' }, children: jsx(SwapWidgetUI, { className: className, style: style }) }));
|
|
5163
|
+
};
|
|
5150
5164
|
const SwapWidget = ({ colors, settings, onlyTestnet, defaultRoute, routeConfig, className, style, filter, ...swapWidgetProviderProps }) => {
|
|
5151
5165
|
useInjectFontsToDocumentHead();
|
|
5152
5166
|
useEffect(() => {
|
|
@@ -5200,5 +5214,5 @@ const initializeSwapWidget = () => {
|
|
|
5200
5214
|
}
|
|
5201
5215
|
};
|
|
5202
5216
|
|
|
5203
|
-
export { SwapWidget, SwapWidgetProvider, initializeSwapWidget, useAssets, useChainByID, useChains };
|
|
5217
|
+
export { SwapWidget, SwapWidgetProvider, SwapWidgetWithoutProviders, initializeSwapWidget, useAssets, useChainByID, useChains };
|
|
5204
5218
|
//# sourceMappingURL=index.es.js.map
|