@rash2x/bridge-widget 0.6.10 → 0.6.12
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/dist/evaa-bridge.cjs +1 -1
- package/dist/evaa-bridge.mjs +1 -1
- package/dist/{index-Nq5DhIqK.cjs → index-BaoPDmAJ.cjs} +173 -214
- package/dist/index-BaoPDmAJ.cjs.map +1 -0
- package/dist/{index-BXVbiGox.js → index-Cef9fWsE.js} +2 -2
- package/dist/{index-BXVbiGox.js.map → index-Cef9fWsE.js.map} +1 -1
- package/dist/{index-DJC9_woN.cjs → index-OkGSl_M4.cjs} +2 -2
- package/dist/{index-DJC9_woN.cjs.map → index-OkGSl_M4.cjs.map} +1 -1
- package/dist/{index-TVRvbmLN.js → index-Tq5ST0yd.js} +173 -214
- package/dist/index-Tq5ST0yd.js.map +1 -0
- package/dist/index.d.ts +38 -23
- package/package.json +1 -1
- package/dist/index-Nq5DhIqK.cjs.map +0 -1
- package/dist/index-TVRvbmLN.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare interface BridgeExternalData {
|
|
|
46
46
|
srcToken?: Token;
|
|
47
47
|
dstToken?: Token;
|
|
48
48
|
quoteDetails?: ReturnType<typeof getQuoteDetails>;
|
|
49
|
+
quote?: Quote;
|
|
49
50
|
eta?: string;
|
|
50
51
|
totalFeeDisplay?: string;
|
|
51
52
|
currentSlippageText?: string;
|
|
@@ -128,19 +129,7 @@ declare interface chainState {
|
|
|
128
129
|
|
|
129
130
|
declare type ChainStoreType = chainState & ChainActions;
|
|
130
131
|
|
|
131
|
-
export declare function computeFeesUsdFromArray(fees: Array<
|
|
132
|
-
amount?: string;
|
|
133
|
-
token?: string;
|
|
134
|
-
chainKey?: string;
|
|
135
|
-
type?: string;
|
|
136
|
-
usd?: number;
|
|
137
|
-
}> | undefined, tokens: Token[] | undefined, chains: Chain[] | undefined): {
|
|
138
|
-
totalUsd: number;
|
|
139
|
-
protocolFeeUsd?: number;
|
|
140
|
-
messageFeeUsd?: number;
|
|
141
|
-
serviceUsd?: number;
|
|
142
|
-
blockchainUsd?: number;
|
|
143
|
-
};
|
|
132
|
+
export declare function computeFeesUsdFromArray(fees: Array<Fees_2> | undefined, tokens: Token[] | undefined, chains: Chain[] | undefined): FeeBreakdown;
|
|
144
133
|
|
|
145
134
|
declare interface ConnectedWalletActions {
|
|
146
135
|
setTonConnected: (connected: boolean) => void;
|
|
@@ -247,6 +236,16 @@ declare interface EvmMonitorReceipt {
|
|
|
247
236
|
}>;
|
|
248
237
|
}
|
|
249
238
|
|
|
239
|
+
export declare interface FeeBreakdown {
|
|
240
|
+
usd: Map<string, number>;
|
|
241
|
+
human: Map<string, {
|
|
242
|
+
amount: number;
|
|
243
|
+
token?: string;
|
|
244
|
+
chainKey?: string;
|
|
245
|
+
}>;
|
|
246
|
+
original: Array<Fees_2> | undefined;
|
|
247
|
+
}
|
|
248
|
+
|
|
250
249
|
export declare interface Fees {
|
|
251
250
|
token: string;
|
|
252
251
|
chainKey: string;
|
|
@@ -254,6 +253,14 @@ export declare interface Fees {
|
|
|
254
253
|
type: string;
|
|
255
254
|
}
|
|
256
255
|
|
|
256
|
+
declare type Fees_2 = {
|
|
257
|
+
amount?: string;
|
|
258
|
+
token?: string;
|
|
259
|
+
chainKey?: string;
|
|
260
|
+
type?: string;
|
|
261
|
+
usd?: number;
|
|
262
|
+
};
|
|
263
|
+
|
|
257
264
|
export declare function findNativeMeta(tokens: Token[] | undefined, chain: Chain | undefined): {
|
|
258
265
|
decimals: number;
|
|
259
266
|
priceUsd?: number;
|
|
@@ -335,11 +342,15 @@ export declare function getQuoteDetails(quote: Quote | undefined, srcToken: Toke
|
|
|
335
342
|
minimumReceived: number;
|
|
336
343
|
etaSeconds: number | undefined;
|
|
337
344
|
fees: {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
345
|
+
fees: {
|
|
346
|
+
usd: Map<any, any>;
|
|
347
|
+
original: Map<any, any>;
|
|
348
|
+
formatted: Map<any, any>;
|
|
349
|
+
};
|
|
350
|
+
inSrcToken: undefined;
|
|
351
|
+
inDstToken: undefined;
|
|
352
|
+
} | {
|
|
353
|
+
fees: FeeBreakdown;
|
|
343
354
|
inSrcToken: number | undefined;
|
|
344
355
|
inDstToken: number | undefined;
|
|
345
356
|
};
|
|
@@ -349,11 +360,15 @@ export declare function getQuoteDetails(quote: Quote | undefined, srcToken: Toke
|
|
|
349
360
|
* Get aggregated fees from quote
|
|
350
361
|
*/
|
|
351
362
|
export declare function getQuoteFees(quote: Quote | undefined, tokens: Token[] | undefined, chains: Chain[] | undefined, srcToken: Token | undefined, dstToken: Token | undefined): {
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
363
|
+
fees: {
|
|
364
|
+
usd: Map<any, any>;
|
|
365
|
+
original: Map<any, any>;
|
|
366
|
+
formatted: Map<any, any>;
|
|
367
|
+
};
|
|
368
|
+
inSrcToken: undefined;
|
|
369
|
+
inDstToken: undefined;
|
|
370
|
+
} | {
|
|
371
|
+
fees: FeeBreakdown;
|
|
357
372
|
inSrcToken: number | undefined;
|
|
358
373
|
inDstToken: number | undefined;
|
|
359
374
|
};
|
package/package.json
CHANGED