@reown/appkit-core 1.6.7-rc.0 → 1.6.7

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.
@@ -217,8 +217,8 @@ export declare const OptionsController: {
217
217
  };
218
218
  } | undefined;
219
219
  readonly customWallets?: readonly {
220
- readonly id: string;
221
220
  readonly name: string;
221
+ readonly id: string;
222
222
  readonly homepage?: string | undefined;
223
223
  readonly image_url?: string | undefined;
224
224
  readonly mobile_link?: string | null | undefined;
@@ -1,56 +1,47 @@
1
- import { type Balance } from '@reown/appkit-common'
2
-
1
+ import { type Balance } from '@reown/appkit-common';
3
2
  export interface TxParams {
4
- receiverAddress: string
5
- sendTokenAmount: number
6
- gasPrice: bigint
7
- decimals: string
3
+ receiverAddress: string;
4
+ sendTokenAmount: number;
5
+ gasPrice: bigint;
6
+ decimals: string;
8
7
  }
9
8
  export interface ContractWriteParams {
10
- receiverAddress: string
11
- tokenAddress: string
12
- sendTokenAmount: number
13
- decimals: string
9
+ receiverAddress: string;
10
+ tokenAddress: string;
11
+ sendTokenAmount: number;
12
+ decimals: string;
14
13
  }
15
14
  export interface SendControllerState {
16
- token?: Balance
17
- sendTokenAmount?: number
18
- receiverAddress?: string
19
- receiverProfileName?: string
20
- receiverProfileImageUrl?: string
21
- gasPrice?: bigint
22
- gasPriceInUSD?: number
23
- networkBalanceInUSD?: string
24
- loading: boolean
15
+ token?: Balance;
16
+ sendTokenAmount?: number;
17
+ receiverAddress?: string;
18
+ receiverProfileName?: string;
19
+ receiverProfileImageUrl?: string;
20
+ gasPrice?: bigint;
21
+ gasPriceInUSD?: number;
22
+ networkBalanceInUSD?: string;
23
+ loading: boolean;
25
24
  }
26
25
  export declare const SendController: {
27
- state: SendControllerState
28
- subscribe(callback: (newState: SendControllerState) => void): () => void
29
- subscribeKey<K extends keyof SendControllerState>(
30
- key: K,
31
- callback: (value: SendControllerState[K]) => void
32
- ): () => void
33
- setToken(token: SendControllerState['token']): void
34
- setTokenAmount(sendTokenAmount: SendControllerState['sendTokenAmount']): void
35
- setReceiverAddress(receiverAddress: SendControllerState['receiverAddress']): void
36
- setReceiverProfileImageUrl(
37
- receiverProfileImageUrl: SendControllerState['receiverProfileImageUrl']
38
- ): void
39
- setReceiverProfileName(receiverProfileName: SendControllerState['receiverProfileName']): void
40
- setGasPrice(gasPrice: SendControllerState['gasPrice']): void
41
- setGasPriceInUsd(gasPriceInUSD: SendControllerState['gasPriceInUSD']): void
42
- setNetworkBalanceInUsd(networkBalanceInUSD: SendControllerState['networkBalanceInUSD']): void
43
- setLoading(loading: SendControllerState['loading']): void
44
- sendToken(): void
45
- sendEvmToken(): void
46
- fetchNetworkBalance(): Promise<void>
47
- isInsufficientNetworkTokenForGas(
48
- networkBalanceInUSD: string,
49
- gasPriceInUSD: number | undefined
50
- ): boolean
51
- hasInsufficientGasFunds(): boolean
52
- sendNativeToken(params: TxParams): Promise<void>
53
- sendERC20Token(params: ContractWriteParams): Promise<void>
54
- sendSolanaToken(): void
55
- resetSend(): void
56
- }
26
+ state: SendControllerState;
27
+ subscribe(callback: (newState: SendControllerState) => void): () => void;
28
+ subscribeKey<K extends keyof SendControllerState>(key: K, callback: (value: SendControllerState[K]) => void): () => void;
29
+ setToken(token: SendControllerState['token']): void;
30
+ setTokenAmount(sendTokenAmount: SendControllerState['sendTokenAmount']): void;
31
+ setReceiverAddress(receiverAddress: SendControllerState['receiverAddress']): void;
32
+ setReceiverProfileImageUrl(receiverProfileImageUrl: SendControllerState['receiverProfileImageUrl']): void;
33
+ setReceiverProfileName(receiverProfileName: SendControllerState['receiverProfileName']): void;
34
+ setGasPrice(gasPrice: SendControllerState['gasPrice']): void;
35
+ setGasPriceInUsd(gasPriceInUSD: SendControllerState['gasPriceInUSD']): void;
36
+ setNetworkBalanceInUsd(networkBalanceInUSD: SendControllerState['networkBalanceInUSD']): void;
37
+ setLoading(loading: SendControllerState['loading']): void;
38
+ sendToken(): void;
39
+ sendEvmToken(): void;
40
+ fetchNetworkBalance(): Promise<void>;
41
+ isInsufficientNetworkTokenForGas(networkBalanceInUSD: string, gasPriceInUSD: number | undefined): boolean;
42
+ hasInsufficientGasFunds(): boolean;
43
+ sendNativeToken(params: TxParams): Promise<void>;
44
+ sendERC20Token(params: ContractWriteParams): Promise<void>;
45
+ sendSolanaToken(): void;
46
+ resetSend(): void;
47
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reown/appkit-core",
3
- "version": "1.6.7-rc.0",
3
+ "version": "1.6.7",
4
4
  "type": "module",
5
5
  "main": "./dist/esm/exports/index.js",
6
6
  "types": "./dist/types/exports/index.d.ts",
@@ -39,8 +39,8 @@
39
39
  "@walletconnect/universal-provider": "2.18.0",
40
40
  "valtio": "1.13.2",
41
41
  "viem": "2.x",
42
- "@reown/appkit-common": "1.6.7-rc.0",
43
- "@reown/appkit-wallet": "1.6.7-rc.0"
42
+ "@reown/appkit-common": "1.6.7",
43
+ "@reown/appkit-wallet": "1.6.7"
44
44
  },
45
45
  "peerDependencies": {},
46
46
  "devDependencies": {
@@ -1,26 +0,0 @@
1
- export const ConnectorUtil = {
2
- handleSolanaDeeplinkRedirect: (wallet, connector) => {
3
- /**
4
- * Universal Links requires explicit user interaction to open the wallet app.
5
- * Previously we've been calling this with the life-cycle methods in the Solana clients by listening the SELECT_WALLET event of EventController.
6
- * But this breaks the UL functionality for some wallets like Phantom.
7
- */
8
- console.log('ConnectorUtil.handleSolanaDeeplinkRedirect', wallet, connector);
9
- const href = window.location.href;
10
- const encodedHref = encodeURIComponent(href);
11
- const name = connector?.name || wallet?.name || '';
12
- console.log('>> Name:', name, window);
13
- if (name === 'Phantom' && !('phantom' in window)) {
14
- console.log('>> Update phantom');
15
- const protocol = href.startsWith('https') ? 'https' : 'http';
16
- const host = href.split('/')[2];
17
- const encodedRef = encodeURIComponent(`${protocol}://${host}`);
18
- window.location.href = `https://phantom.app/ul/browse/${encodedHref}?ref=${encodedRef}`;
19
- }
20
- if (name === 'Coinbase Wallet' && !('coinbaseSolana' in window)) {
21
- console.log('>> Update coinbaseSolana');
22
- window.location.href = `https://go.cb-w.com/dapp?cb_url=${encodedHref}`;
23
- }
24
- }
25
- };
26
- //# sourceMappingURL=ConnectorUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConnectorUtil.js","sourceRoot":"","sources":["../../../../src/utils/ConnectorUtil.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,4BAA4B,EAAE,CAAC,MAAgB,EAAE,SAAqB,EAAE,EAAE;QACxE;;;;WAIG;QACH,OAAO,CAAC,GAAG,CAAC,4CAA4C,EAAE,MAAM,EAAE,SAAS,CAAC,CAAA;QAC5E,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAA;QACjC,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAA;QAC5C,MAAM,IAAI,GAAG,SAAS,EAAE,IAAI,IAAI,MAAM,EAAE,IAAI,IAAI,EAAE,CAAA;QAClD,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,CAAC,CAAA;QACrC,IAAI,IAAI,KAAK,SAAS,IAAI,CAAC,CAAC,SAAS,IAAI,MAAM,CAAC,EAAE,CAAC;YACjD,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAA;YAChC,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAA;YAC5D,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAA;YAC/B,MAAM,UAAU,GAAG,kBAAkB,CAAC,GAAG,QAAQ,MAAM,IAAI,EAAE,CAAC,CAAA;YAE9D,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,iCAAiC,WAAW,QAAQ,UAAU,EAAE,CAAA;QACzF,CAAC;QAED,IAAI,IAAI,KAAK,iBAAiB,IAAI,CAAC,CAAC,gBAAgB,IAAI,MAAM,CAAC,EAAE,CAAC;YAChE,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAA;YACvC,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,mCAAmC,WAAW,EAAE,CAAA;QACzE,CAAC;IACH,CAAC;CACF,CAAA"}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=DeeplinkUtil.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeeplinkUtil.js","sourceRoot":"","sources":["../../../../src/utils/DeeplinkUtil.ts"],"names":[],"mappings":""}
@@ -1,4 +0,0 @@
1
- import type { Connector, WcWallet } from './TypeUtil.js';
2
- export declare const ConnectorUtil: {
3
- handleSolanaDeeplinkRedirect: (wallet: WcWallet, connector?: Connector) => void;
4
- };
File without changes