@ref-finance/ref-sdk 1.3.8 → 1.3.10

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.
@@ -39,12 +39,16 @@ export declare const useSwap: (params: {
39
39
  } & {
40
40
  slippageTolerance: number;
41
41
  refreshTrigger: boolean;
42
- onSwap: (transactionsRef: Transaction[]) => void;
42
+ onSwap: (transactionsRef: Transaction[]) => Promise<void>;
43
43
  AccountId?: string | undefined;
44
44
  poolFetchingState?: "loading" | "end" | undefined;
45
45
  referralId?: string | undefined;
46
+ tokens: TokenMetadata[];
46
47
  }) => SwapOutParams;
47
48
  export declare const TokenPriceContext: React.Context<Record<string, any> | null>;
48
49
  export declare const useTokenPriceList: () => Record<string, any>;
49
50
  export declare const TokenPriceContextProvider: React.FC;
50
- export declare const useTokenBalnces: (tokens: TokenMetadata[], AccountId: string) => Record<string, string>;
51
+ export declare const useTokenBalances: (tokens: TokenMetadata[], AccountId?: string | undefined) => {
52
+ balances: Record<string, string>;
53
+ updateTokenBalance: (tokenIds: string[], AccountId: string) => Promise<void>;
54
+ };
@@ -5,7 +5,7 @@ import { Theme } from './constant';
5
5
  export interface SwapWidgetProps {
6
6
  theme?: Theme;
7
7
  defaultTokenList?: TokenMetadata[];
8
- onSwap: (transactionsRef: Transaction[]) => void;
8
+ onSwap: (transactionsRef: Transaction[]) => Promise<void>;
9
9
  onDisConnect: () => void;
10
10
  width: string;
11
11
  height?: string;
@@ -30,6 +30,9 @@ export interface SwapWidgetProps {
30
30
  export interface SwapOutParams {
31
31
  amountOut: string;
32
32
  minAmountOut: string;
33
+ tokenInBalance: string;
34
+ tokenOutBalance: string;
35
+ balances: Record<string, string>;
33
36
  rate: string;
34
37
  fee: number;
35
38
  estimates: EstimateSwapView[];
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.8",
2
+ "version": "1.3.10",
3
3
  "license": "MIT",
4
4
  "main": "dist/index.js",
5
5
  "typings": "dist/index.d.ts",