@rango-dev/widget-embedded 0.17.1-next.15 → 0.17.1-next.17
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/QueueManager.d.ts.map +1 -1
- package/dist/constants/index.d.ts +1 -0
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/containers/App/App.d.ts.map +1 -1
- package/dist/containers/WidgetProvider/WidgetProvider.d.ts.map +1 -1
- package/dist/hooks/useConfirmSwap/useConfirmSwap.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.d.ts +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts +2 -2
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts +3 -5
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts +1 -0
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.d.ts.map +1 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts +5 -1
- package/dist/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.d.ts.map +1 -1
- package/dist/hooks/useSwapInput.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/types/config.d.ts +14 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/utils/configs.d.ts +1 -0
- package/dist/utils/configs.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/QueueManager.tsx +1 -0
- package/src/constants/index.ts +1 -0
- package/src/containers/App/App.tsx +1 -9
- package/src/containers/WidgetProvider/WidgetProvider.tsx +10 -1
- package/src/hooks/useConfirmSwap/useConfirmSwap.ts +4 -2
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.constants.ts +1 -1
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts +37 -7
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts +60 -0
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.test.ts +78 -3
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts +13 -4
- package/src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts +6 -1
- package/src/hooks/useSwapInput.ts +5 -1
- package/src/services/httpService.ts +1 -1
- package/src/types/config.ts +15 -0
- package/src/utils/configs.ts +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueueManager.d.ts","sourceRoot":"","sources":["../src/QueueManager.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"QueueManager.d.ts","sourceRoot":"","sources":["../src/QueueManager.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAU/C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAOvC,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,qBAqFlE;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,yCAAyC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,yCAAyC,CAAC;AAC3E,eAAO,MAAM,gBAAgB,+BAA+B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../src/containers/App/App.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../../src/containers/App/App.tsx"],"names":[],"mappings":"AAGA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAe/D,wBAAgB,IAAI,sBAoCnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WidgetProvider.d.ts","sourceRoot":"","sources":["../../../src/containers/WidgetProvider/WidgetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,
|
|
1
|
+
{"version":3,"file":"WidgetProvider.d.ts","sourceRoot":"","sources":["../../../src/containers/WidgetProvider/WidgetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAkB,MAAM,OAAO,CAAC;AAQvC,wBAAgB,cAAc,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,qBAgBjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useConfirmSwap.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConfirmSwap/useConfirmSwap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAU,MAAM,wBAAwB,CAAC;AAqBlE,wBAAgB,cAAc,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"useConfirmSwap.d.ts","sourceRoot":"","sources":["../../../src/hooks/useConfirmSwap/useConfirmSwap.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAU,MAAM,wBAAwB,CAAC;AAqBlE,wBAAgB,cAAc,IAAI,WAAW,CAoH5C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const MOST_USED_BLOCKCHAINS: string[];
|
|
2
2
|
//# sourceMappingURL=usePrepareBlockchainList.constants.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PrepareListOptions,
|
|
1
|
+
import type { PrepareListOptions, UsePrepareList } from './usePrepareBlockchainList.types';
|
|
2
2
|
import type { BlockchainMeta } from 'rango-sdk';
|
|
3
3
|
/**
|
|
4
4
|
*
|
|
@@ -6,5 +6,5 @@ import type { BlockchainMeta } from 'rango-sdk';
|
|
|
6
6
|
* this function is getting the raw blockchains list and return a list for showing in UI.
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
|
-
export declare function usePrepareBlockchainList(blockchains: BlockchainMeta[], options?: PrepareListOptions):
|
|
9
|
+
export declare function usePrepareBlockchainList(blockchains: BlockchainMeta[], options?: PrepareListOptions): UsePrepareList;
|
|
10
10
|
//# sourceMappingURL=usePrepareBlockchainList.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrepareBlockchainList.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,
|
|
1
|
+
{"version":3,"file":"usePrepareBlockchainList.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAQhD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,WAAW,EAAE,cAAc,EAAE,EAC7B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,cAAc,CAyBhB"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import type { PrepareListOptions } from './usePrepareBlockchainList.types';
|
|
1
|
+
import type { PrepareListOptions, PrepareOutput } from './usePrepareBlockchainList.types';
|
|
2
2
|
import type { BlockchainMeta } from 'rango-sdk';
|
|
3
|
-
export declare function prepare(blockchains: BlockchainMeta[], preferredBlockchains: string[], options?: PrepareListOptions):
|
|
4
|
-
list: BlockchainMeta[];
|
|
5
|
-
more: BlockchainMeta[];
|
|
6
|
-
};
|
|
3
|
+
export declare function prepare(blockchains: BlockchainMeta[], preferredBlockchains: string[], options?: PrepareListOptions): PrepareOutput;
|
|
7
4
|
/** There is a hardcoded list of blockchains that we want to show them first in the list. */
|
|
8
5
|
export declare function sortByMostUsedBlockchains(a: BlockchainMeta, b: BlockchainMeta): 1 | -1 | 0;
|
|
9
6
|
export declare function generateSortByPreferredBlockchainsFor(preferredBlockchains: string[]): (a: BlockchainMeta, b: BlockchainMeta) => 1 | -1 | 0;
|
|
7
|
+
export declare function isInVisibleList(blockchain: string, prepareOutput: PrepareOutput): boolean;
|
|
10
8
|
//# sourceMappingURL=usePrepareBlockchainList.helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrepareBlockchainList.helpers.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"usePrepareBlockchainList.helpers.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,kBAAkB,EAClB,aAAa,EACd,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,wBAAgB,OAAO,CACrB,WAAW,EAAE,cAAc,EAAE,EAC7B,oBAAoB,EAAE,MAAM,EAAE,EAC9B,OAAO,CAAC,EAAE,kBAAkB,GAC3B,aAAa,CA+Df;AAED,4FAA4F;AAC5F,wBAAgB,yBAAyB,CACvC,CAAC,EAAE,cAAc,EACjB,CAAC,EAAE,cAAc,cAqBlB;AAED,wBAAgB,qCAAqC,CACnD,oBAAoB,EAAE,MAAM,EAAE,OAEK,cAAc,KAAK,cAAc,gBAwBrE;AAED,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,aAAa,GAC3B,OAAO,CAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrepareBlockchainList.mock.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAwhG7C,CAAC"}
|
|
1
|
+
{"version":3,"file":"usePrepareBlockchainList.mock.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.mock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,4BAA4B,UA0DxC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,cAAc,EAwhG7C,CAAC"}
|
|
@@ -3,9 +3,13 @@ export interface PrepareListOptions {
|
|
|
3
3
|
limit?: number;
|
|
4
4
|
selected?: string;
|
|
5
5
|
}
|
|
6
|
-
export interface
|
|
6
|
+
export interface PrepareOutput {
|
|
7
7
|
list: BlockchainMeta[];
|
|
8
8
|
more: BlockchainMeta[];
|
|
9
|
+
}
|
|
10
|
+
export interface UsePrepareList {
|
|
11
|
+
list: PrepareOutput['list'];
|
|
12
|
+
more: PrepareOutput['more'];
|
|
9
13
|
history: string[];
|
|
10
14
|
}
|
|
11
15
|
//# sourceMappingURL=usePrepareBlockchainList.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePrepareBlockchainList.types.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"usePrepareBlockchainList.types.d.ts","sourceRoot":"","sources":["../../../src/hooks/usePrepareBlockchainList/usePrepareBlockchainList.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEhD,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,cAAc,EAAE,CAAC;IACvB,IAAI,EAAE,cAAc,EAAE,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSwapInput.d.ts","sourceRoot":"","sources":["../../src/hooks/useSwapInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAsBzD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"useSwapInput.d.ts","sourceRoot":"","sources":["../../src/hooks/useSwapInput.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAsBzD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,UAAU,GAAG,IAAI,CAAC;IACzB,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,IAAI,YAAY,CAyH3C"}
|