@aurora-is-near/intents-swap-widget 3.0.0 → 3.0.1
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/config.d.ts
CHANGED
|
@@ -19,26 +19,26 @@ export declare const useConfig: () => {
|
|
|
19
19
|
readonly intentsAccountType: "evm" | "near" | "sol";
|
|
20
20
|
readonly walletSupportedChains: ReadonlyArray<import('./types').Chains>;
|
|
21
21
|
readonly connectedWallets: {
|
|
22
|
-
readonly eth?: string | undefined;
|
|
23
|
-
readonly bera?: string | undefined;
|
|
24
|
-
readonly base?: string | undefined;
|
|
25
|
-
readonly gnosis?: string | undefined;
|
|
26
|
-
readonly arb?: string | undefined;
|
|
27
|
-
readonly bsc?: string | undefined;
|
|
28
|
-
readonly avax?: string | undefined;
|
|
29
|
-
readonly op?: string | undefined;
|
|
30
|
-
readonly pol?: string | undefined;
|
|
31
|
-
readonly sui?: string | undefined;
|
|
32
|
-
readonly xrp?: string | undefined;
|
|
33
|
-
readonly btc?: string | undefined;
|
|
34
|
-
readonly doge?: string | undefined;
|
|
35
|
-
readonly tron?: string | undefined;
|
|
36
|
-
readonly ton?: string | undefined;
|
|
37
|
-
readonly near?: string | undefined;
|
|
38
|
-
readonly sol?: string | undefined;
|
|
39
|
-
readonly zec?: string | undefined;
|
|
40
|
-
readonly cardano?: string | undefined;
|
|
41
|
-
readonly default?: string | undefined;
|
|
22
|
+
readonly eth?: string | null | undefined;
|
|
23
|
+
readonly bera?: string | null | undefined;
|
|
24
|
+
readonly base?: string | null | undefined;
|
|
25
|
+
readonly gnosis?: string | null | undefined;
|
|
26
|
+
readonly arb?: string | null | undefined;
|
|
27
|
+
readonly bsc?: string | null | undefined;
|
|
28
|
+
readonly avax?: string | null | undefined;
|
|
29
|
+
readonly op?: string | null | undefined;
|
|
30
|
+
readonly pol?: string | null | undefined;
|
|
31
|
+
readonly sui?: string | null | undefined;
|
|
32
|
+
readonly xrp?: string | null | undefined;
|
|
33
|
+
readonly btc?: string | null | undefined;
|
|
34
|
+
readonly doge?: string | null | undefined;
|
|
35
|
+
readonly tron?: string | null | undefined;
|
|
36
|
+
readonly ton?: string | null | undefined;
|
|
37
|
+
readonly near?: string | null | undefined;
|
|
38
|
+
readonly sol?: string | null | undefined;
|
|
39
|
+
readonly zec?: string | null | undefined;
|
|
40
|
+
readonly cardano?: string | null | undefined;
|
|
41
|
+
readonly default?: string | null | undefined;
|
|
42
42
|
};
|
|
43
43
|
readonly sendAddress?: string | null | undefined;
|
|
44
44
|
readonly defaultMaxSlippage: number;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Quote, QuoteRequest } from '@defuse-protocol/one-click-sdk-typescript';
|
|
|
2
2
|
import { Chains, ChainsFilter } from './chain';
|
|
3
3
|
import { SimpleToken, Token } from './token';
|
|
4
4
|
import { FetchQuoteOptions } from './quote';
|
|
5
|
-
export type WalletAddresses = Partial<Record<Chains | 'default', string>>;
|
|
5
|
+
export type WalletAddresses = Partial<Record<Chains | 'default', string | null>>;
|
|
6
6
|
export type WidgetConfig = {
|
|
7
7
|
appName: string;
|
|
8
8
|
appIcon: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getWalletAddressForToken.js","sources":["../../src/utils/getWalletAddressForToken.ts"],"sourcesContent":["import { Token, WalletAddresses } from '../types';\n\nexport const getWalletAddressForToken = (\n walletAddress: WalletAddresses,\n token?: Token,\n): string | undefined => {\n if (!walletAddress) {\n return undefined;\n }\n\n const { blockchain } = token ?? {};\n\n // Select the wallet provided for the specific chain\n if (blockchain && blockchain in walletAddress) {\n return walletAddress[blockchain];\n\n return;\n }\n\n // Fallback to the default wallet, if provided\n if (walletAddress.default) {\n return walletAddress.default;\n }\n};\n"],"names":["getWalletAddressForToken","walletAddress","token","blockchain"],"mappings":"AAEO,MAAMA,IAA2B,CACtCC,GACAC,MACuB;AACvB,MAAI,CAACD;AACH;AAGF,QAAM,EAAE,YAAAE,MAAeD,KAAS,CAAA;AAGhC,MAAIC,KAAcA,KAAcF;AAC9B,WAAOA,EAAcE,CAAU;
|
|
1
|
+
{"version":3,"file":"getWalletAddressForToken.js","sources":["../../src/utils/getWalletAddressForToken.ts"],"sourcesContent":["import { Token, WalletAddresses } from '../types';\n\nexport const getWalletAddressForToken = (\n walletAddress: WalletAddresses,\n token?: Token,\n): string | undefined => {\n if (!walletAddress) {\n return undefined;\n }\n\n const { blockchain } = token ?? {};\n\n // Select the wallet provided for the specific chain\n if (blockchain && blockchain in walletAddress) {\n return walletAddress[blockchain] ?? undefined;\n\n return;\n }\n\n // Fallback to the default wallet, if provided\n if (walletAddress.default) {\n return walletAddress.default;\n }\n};\n"],"names":["getWalletAddressForToken","walletAddress","token","blockchain"],"mappings":"AAEO,MAAMA,IAA2B,CACtCC,GACAC,MACuB;AACvB,MAAI,CAACD;AACH;AAGF,QAAM,EAAE,YAAAE,MAAeD,KAAS,CAAA;AAGhC,MAAIC,KAAcA,KAAcF;AAC9B,WAAOA,EAAcE,CAAU,KAAK;AAMtC,MAAIF,EAAc;AAChB,WAAOA,EAAc;AAEzB;"}
|
package/package.json
CHANGED
package/src/types/config.ts
CHANGED
|
@@ -3,7 +3,9 @@ import { Chains, ChainsFilter } from './chain';
|
|
|
3
3
|
import { SimpleToken, Token } from './token';
|
|
4
4
|
import { FetchQuoteOptions } from './quote';
|
|
5
5
|
|
|
6
|
-
export type WalletAddresses = Partial<
|
|
6
|
+
export type WalletAddresses = Partial<
|
|
7
|
+
Record<Chains | 'default', string | null>
|
|
8
|
+
>;
|
|
7
9
|
|
|
8
10
|
export type WidgetConfig = {
|
|
9
11
|
// Application metadata
|