@rango-dev/widget-embedded 0.17.1-next.15 → 0.17.1-next.16
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/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/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
- 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
|
@@ -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"}
|