@sundaeswap/wallet-lite 0.0.56 → 0.0.57

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.
@@ -4,4 +4,9 @@ export declare const getCardanoCore: () => Promise<{
4
4
  }>;
5
5
  export declare const getCardanoUtil: () => Promise<(<T>(value: string, length?: number | undefined) => T)>;
6
6
  export declare const getPeerConnect: () => Promise<typeof import("@fabianbormann/cardano-peer-connect").DAppPeerConnect>;
7
+ export declare const getHandleLib: () => Promise<{
8
+ HandleClient: typeof import("@koralabs/adahandle-sdk").default;
9
+ HandleClientContext: typeof import("@koralabs/adahandle-sdk").HandleClientContext;
10
+ KoraLabsProvider: typeof import("@koralabs/adahandle-sdk").KoraLabsProvider;
11
+ }>;
7
12
  //# sourceMappingURL=getLibs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getLibs.d.ts","sourceRoot":"","sources":["../../../src/utils/getLibs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;EAO1B,CAAC;AAEF,eAAO,MAAM,cAAc,uEAI1B,CAAC;AAEF,eAAO,MAAM,cAAc,qFAI1B,CAAC"}
1
+ {"version":3,"file":"getLibs.d.ts","sourceRoot":"","sources":["../../../src/utils/getLibs.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;EAO1B,CAAC;AAEF,eAAO,MAAM,cAAc,uEAI1B,CAAC;AAEF,eAAO,MAAM,cAAc,qFAI1B,CAAC;AAEF,eAAO,MAAM,YAAY;;;;EASxB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sundaeswap/wallet-lite",
3
- "version": "0.0.56",
3
+ "version": "0.0.57",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "./dist/cjs/index.js",
@@ -1,4 +1,4 @@
1
- import { IHandle } from "@koralabs/adahandle-sdk";
1
+ import type { IHandle } from "@koralabs/adahandle-sdk";
2
2
  import { IAssetAmountMetadata } from "@sundaeswap/asset";
3
3
  import { useQuery, useQueryClient } from "@tanstack/react-query";
4
4
  import { useMemo } from "react";
@@ -6,6 +6,7 @@ import { useMemo } from "react";
6
6
  import { TAssetAmountMap } from "../../@types/observer.js";
7
7
  import { WalletAssetMap } from "../../classes/WalletAssetMap.class.js";
8
8
  import { normalizeAssetIdWithDot } from "../../utils/assets.js";
9
+ import { getHandleLib } from "../../utils/getLibs.js";
9
10
  import { THandleMetadata } from "../contexts/observer/types.js";
10
11
  import { useWalletObserver } from "./useWalletObserver.js";
11
12
 
@@ -49,11 +50,8 @@ export const useWalletHandles = <
49
50
  }
50
51
 
51
52
  try {
52
- const {
53
- default: HandleClient,
54
- HandleClientContext,
55
- KoraLabsProvider,
56
- } = await import("@koralabs/adahandle-sdk");
53
+ const { HandleClient, HandleClientContext, KoraLabsProvider } =
54
+ await getHandleLib();
57
55
 
58
56
  const context =
59
57
  state.network === 1
@@ -18,3 +18,14 @@ export const getPeerConnect = async () => {
18
18
  return module?.DAppPeerConnect || module.default.DAppPeerConnect;
19
19
  });
20
20
  };
21
+
22
+ export const getHandleLib = async () => {
23
+ return import("@koralabs/adahandle-sdk").then((module) => {
24
+ const HandleClient = module?.default || module;
25
+ return {
26
+ HandleClient,
27
+ HandleClientContext: module.HandleClientContext,
28
+ KoraLabsProvider: module.KoraLabsProvider,
29
+ };
30
+ });
31
+ };