@rango-dev/widget-embedded 0.51.1-next.4 → 0.51.1-next.6
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/components/ConfirmWalletsModal/WalletList.d.ts.map +1 -1
- package/dist/components/HeaderButtons/WalletButton.d.ts.map +1 -1
- package/dist/components/WalletStatefulConnect/ConnectStatus.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +3 -3
- package/dist/pages/WalletsPage.d.ts.map +1 -1
- package/dist/utils/wallets.d.ts +6 -13
- package/dist/utils/wallets.d.ts.map +1 -1
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +2 -2
- package/src/components/ConfirmWalletsModal/WalletList.tsx +8 -2
- package/src/components/HeaderButtons/WalletButton.tsx +4 -2
- package/src/components/SwapDetailsModal/SwapDetailsModal.WalletState.tsx +3 -3
- package/src/components/WalletStatefulConnect/ConnectStatus.tsx +6 -3
- package/src/hooks/useWalletList.ts +1 -1
- package/src/pages/WalletsPage.tsx +1 -16
- package/src/utils/wallets.ts +41 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WalletsPage.d.ts","sourceRoot":"","sources":["../../src/pages/WalletsPage.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA4BxC,wBAAgB,WAAW,sBA0E1B"}
|
package/dist/utils/wallets.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { BalanceState, ConnectedWallet } from '../store/slices/wallets';
|
|
2
2
|
import type { Balance, SelectedQuote, Wallet, WalletInfoWithExtra } from '../types';
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
5
|
-
import type { Network, WalletState, WalletType } from '@rango-dev/wallets-shared';
|
|
3
|
+
import type { ExtendedWalletInfo, ProviderContext } from '@rango-dev/wallets-react';
|
|
4
|
+
import type { Network, WalletType } from '@rango-dev/wallets-shared';
|
|
6
5
|
import type { BlockchainMeta, Token } from 'rango-sdk';
|
|
7
6
|
import { WalletState as WalletStatus } from '@rango-dev/ui';
|
|
8
7
|
export type ExtendedModalWalletInfo = WalletInfoWithExtra & Pick<ExtendedWalletInfo, 'properties' | 'isHub'>;
|
|
9
|
-
export declare function
|
|
10
|
-
export declare function mapWalletTypesToWalletInfo(getState:
|
|
8
|
+
export declare function getWalletConnectionStatus(wallet: ExtendedWalletInfo, walletState: ReturnType<ProviderContext['state']>): WalletStatus;
|
|
9
|
+
export declare function mapWalletTypesToWalletInfo(getState: ProviderContext['state'], getWalletInfo: (type: WalletType) => ExtendedWalletInfo, list: WalletType[], chain?: string): ExtendedModalWalletInfo[];
|
|
11
10
|
export declare function walletAndSupportedChainsNames(supportedBlockchains: BlockchainMeta[]): Network[] | null;
|
|
12
11
|
export declare function prepareAccountsForWalletStore(wallet: WalletType, accounts: string[], evmBasedChains: string[], supportedChainNames: Network[] | null, isContractWallet: boolean): Wallet[];
|
|
13
12
|
export declare function getQuoteChains(params: {
|
|
@@ -22,11 +21,7 @@ export declare const getKeplrCompatibleConnectedWallets: (selectableWallets: Wal
|
|
|
22
21
|
export declare function formatBalance(balance: Balance | null): Balance | null;
|
|
23
22
|
export declare function compareTokenBalance(token1Balance: Balance | null, token2Balance: Balance | null): number;
|
|
24
23
|
export declare function areTokensEqual(tokenA: Pick<Token, 'blockchain' | 'symbol' | 'address'> | null, tokenB: Pick<Token, 'blockchain' | 'symbol' | 'address'> | null): boolean;
|
|
25
|
-
export declare function sortWalletsBasedOnConnectionState(wallets: ExtendedModalWalletInfo[]
|
|
26
|
-
namespaces?: Map<Namespace, {
|
|
27
|
-
connected: boolean;
|
|
28
|
-
}>;
|
|
29
|
-
}): ExtendedModalWalletInfo[];
|
|
24
|
+
export declare function sortWalletsBasedOnConnectionState(wallets: ExtendedModalWalletInfo[]): ExtendedModalWalletInfo[];
|
|
30
25
|
export declare function getConciseAddress(address: string, maxChars?: number, ellipsisLength?: number): string;
|
|
31
26
|
export declare function getAddress({ chain, connectedWallets, walletType, }: {
|
|
32
27
|
connectedWallets: ConnectedWallet[];
|
|
@@ -37,7 +32,5 @@ export declare const isFetchingBalance: (connectedWallets: ConnectedWallet[], bl
|
|
|
37
32
|
export declare function hashWalletsState(walletsInfo: WalletInfoWithExtra[]): string;
|
|
38
33
|
export declare function filterBlockchainsByWalletTypes(wallets: WalletInfoWithExtra[], blockchains: BlockchainMeta[]): BlockchainMeta[];
|
|
39
34
|
export declare function filterWalletsByCategory(wallets: ExtendedModalWalletInfo[], category: string): ExtendedModalWalletInfo[];
|
|
40
|
-
export declare function checkIsWalletPartiallyConnected(wallet:
|
|
41
|
-
connected: boolean;
|
|
42
|
-
}>): boolean;
|
|
35
|
+
export declare function checkIsWalletPartiallyConnected(wallet: ExtendedWalletInfo, walletState: ReturnType<ProviderContext['state']>): boolean;
|
|
43
36
|
//# sourceMappingURL=wallets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/utils/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,MAAM,EACN,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/utils/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACV,OAAO,EACP,aAAa,EACb,MAAM,EACN,mBAAmB,EACpB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,kBAAkB,EAClB,eAAe,EAChB,MAAM,0BAA0B,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