@reown/appkit
Advanced tools
Comparing version 1.5.3-ae9267.0 to 1.5.3-c311t6.0
@@ -1,2 +0,2 @@ | ||
export const PACKAGE_VERSION = '1.5.3-ae9267.0'; | ||
export const PACKAGE_VERSION = '1.5.3-c311t6.0'; | ||
//# sourceMappingURL=constants.js.map |
{ | ||
"name": "@reown/appkit", | ||
"version": "1.5.3-ae9267.0", | ||
"version": "1.5.3-c311t6.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "main": "./dist/esm/exports/index.js", |
@@ -60,2 +60,3 @@ /* eslint-disable max-depth */ | ||
this.setStatus = (status, chain) => { | ||
StorageUtil.setConnectionStatus(status); | ||
AccountController.setStatus(status, chain); | ||
@@ -675,5 +676,8 @@ }; | ||
this.setLoading(isLoginEmailUsed); | ||
if (isLoginEmailUsed) { | ||
this.setStatus('connecting', ChainController.state.activeChain); | ||
} | ||
const { isConnected } = await provider.isConnected(); | ||
if (isConnected && this.connectionControllerClient?.connectExternal) { | ||
this.connectionControllerClient?.connectExternal({ | ||
await this.connectionControllerClient?.connectExternal({ | ||
id: 'ID_AUTH', | ||
@@ -687,5 +691,8 @@ info: { | ||
}); | ||
this.setLoading(false); | ||
this.setStatus('connected', ChainController.state.activeChain); | ||
} | ||
else { | ||
this.setLoading(false); | ||
this.setStatus('disconnected', ChainController.state.activeChain); | ||
} | ||
@@ -817,2 +824,9 @@ provider.onRpcRequest((request) => { | ||
const adapter = this.getAdapter(chainNamespace); | ||
const connectionStatus = StorageUtil.getConnectionStatus(); | ||
if (connectionStatus === 'connected' || connectionStatus === 'connecting') { | ||
this.setStatus('connecting', chainNamespace); | ||
} | ||
else { | ||
this.setStatus(connectionStatus, chainNamespace); | ||
} | ||
adapter?.on('switchNetwork', ({ address, chainId }) => { | ||
@@ -900,2 +914,3 @@ if (chainId && this.caipNetworks?.find(n => n.id === chainId)) { | ||
try { | ||
// this.setStatus('connecting', chainNamespace) | ||
await adapter?.connect({ | ||
@@ -913,2 +928,3 @@ id: 'walletConnect', | ||
if (adapter?.reconnect) { | ||
// this.setStatus('reconnecting', chainNamespace) | ||
adapter?.reconnect({ | ||
@@ -1068,2 +1084,5 @@ id: 'walletConnect', | ||
async syncExistingConnection() { | ||
if (!CoreHelperUtil.isClient()) { | ||
return; | ||
} | ||
const connectedConnector = SafeLocalStorage.getItem(SafeLocalStorageKeys.CONNECTED_CONNECTOR); | ||
@@ -1078,2 +1097,3 @@ const connectedNamespace = SafeLocalStorage.getItem(SafeLocalStorageKeys.CONNECTED_NAMESPACE); | ||
connectedNamespace) { | ||
this.setStatus('connecting', connectedNamespace); | ||
const adapter = this.getAdapter(connectedNamespace); | ||
@@ -1089,3 +1109,7 @@ const res = await adapter?.syncConnection({ | ||
await this.syncAccount({ ...res, chainNamespace: connectedNamespace }); | ||
this.setStatus('connected', connectedNamespace); | ||
} | ||
else { | ||
this.setStatus('disconnected', connectedNamespace); | ||
} | ||
if (!this.caipNetworks?.some(network => network.id === res?.chainId)) { | ||
@@ -1095,2 +1119,5 @@ ChainController.showUnsupportedChainUI(); | ||
} | ||
else if (connectedConnector !== UtilConstantsUtil.CONNECTOR_TYPE_W3M_AUTH) { | ||
this.setStatus('disconnected', ChainController.state.activeChain); | ||
} | ||
} | ||
@@ -1097,0 +1124,0 @@ getAdapter(namespace) { |
@@ -26,5 +26,6 @@ import { vi } from 'vitest'; | ||
off: vi.fn(), | ||
emit: vi.fn() | ||
emit: vi.fn(), | ||
construct: vi.fn() | ||
}; | ||
export default mockUniversalAdapter; | ||
//# sourceMappingURL=Adapter.js.map |
@@ -1,1 +0,1 @@ | ||
export declare const PACKAGE_VERSION = "1.5.3-ae9267.0"; | ||
export declare const PACKAGE_VERSION = "1.5.3-c311t6.0"; |
@@ -19,5 +19,3 @@ import { type EventsControllerState, type PublicStateControllerState, type ThemeControllerState, type ModalControllerState, type ConnectedWalletInfo, type RouterControllerState, type ChainAdapter, type SdkVersion, type UseAppKitAccountReturn, type UseAppKitNetworkReturn, type ConnectorType, type Provider } from '@reown/appkit-core'; | ||
} | ||
type Adapters = Record<ChainNamespace, AdapterBlueprint & { | ||
adapterType: string; | ||
}>; | ||
type Adapters = Record<ChainNamespace, AdapterBlueprint>; | ||
export declare class AppKit { | ||
@@ -24,0 +22,0 @@ private static instance?; |
import type UniversalProvider from '@walletconnect/universal-provider'; | ||
import { AdapterBlueprint } from '../adapters/ChainAdapterBlueprint.js'; | ||
export declare class UniversalAdapter extends AdapterBlueprint { | ||
connectWalletConnect(onUri: (uri: string) => void, chainId?: number | string): Promise<void>; | ||
connectWalletConnect(onUri: (uri: string) => void): Promise<void>; | ||
connect(params: AdapterBlueprint.ConnectParams): Promise<AdapterBlueprint.ConnectResult>; | ||
@@ -6,0 +6,0 @@ disconnect(): Promise<void>; |
@@ -6,5 +6,5 @@ import type { NamespaceConfig } from '@walletconnect/universal-provider'; | ||
getMethodsByChainNamespace(chainNamespace: ChainNamespace): string[]; | ||
createNamespaces(caipNetworks: CaipNetwork[], defaultChain: number | string | undefined): NamespaceConfig; | ||
createNamespaces(caipNetworks: CaipNetwork[]): NamespaceConfig; | ||
resolveReownName: (name: string) => Promise<string | false>; | ||
getChainsFromNamespaces(namespaces?: SessionTypes.Namespaces): CaipNetworkId[]; | ||
}; |
{ | ||
"name": "@reown/appkit", | ||
"version": "1.5.3-ae9267.0", | ||
"version": "1.5.3-c311t6.0", | ||
"type": "module", | ||
@@ -11,10 +11,2 @@ "main": "./dist/esm/exports/index.js", | ||
], | ||
"scripts": { | ||
"build:clean": "rm -rf dist", | ||
"build": "tsc --build tsconfig.build.json", | ||
"watch": "tsc --watch", | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"test": "vitest run --coverage.enabled=true -- coverage.reporter=json --coverage.reporter=json-summary --coverage.reportOnFailure=true" | ||
}, | ||
"exports": { | ||
@@ -101,10 +93,2 @@ ".": { | ||
"dependencies": { | ||
"@reown/appkit-common": "workspace:*", | ||
"@reown/appkit-core": "workspace:*", | ||
"@reown/appkit-polyfills": "workspace:*", | ||
"@reown/appkit-scaffold-ui": "workspace:*", | ||
"@reown/appkit-siwe": "workspace:*", | ||
"@reown/appkit-ui": "workspace:*", | ||
"@reown/appkit-utils": "workspace:*", | ||
"@reown/appkit-wallet": "workspace:*", | ||
"@walletconnect/types": "2.17.0", | ||
@@ -115,3 +99,11 @@ "@walletconnect/universal-provider": "2.17.0", | ||
"valtio": "1.11.2", | ||
"viem": "2.x" | ||
"viem": "2.x", | ||
"@reown/appkit-common": "1.5.3-c311t6.0", | ||
"@reown/appkit-core": "1.5.3-c311t6.0", | ||
"@reown/appkit-polyfills": "1.5.3-c311t6.0", | ||
"@reown/appkit-scaffold-ui": "1.5.3-c311t6.0", | ||
"@reown/appkit-siwe": "1.5.3-c311t6.0", | ||
"@reown/appkit-ui": "1.5.3-ae9267.0", | ||
"@reown/appkit-utils": "1.5.3-c311t6.0", | ||
"@reown/appkit-wallet": "1.5.3-c311t6.0" | ||
}, | ||
@@ -139,3 +131,11 @@ "devDependencies": { | ||
"url": "https://github.com/reown-com/appkit/issues" | ||
}, | ||
"scripts": { | ||
"build:clean": "rm -rf dist", | ||
"build": "tsc --build tsconfig.build.json", | ||
"watch": "tsc --watch", | ||
"typecheck": "tsc --noEmit", | ||
"lint": "eslint . --ext .js,.jsx,.ts,.tsx", | ||
"test": "vitest run --coverage.enabled=true -- coverage.reporter=json --coverage.reporter=json-summary --coverage.reportOnFailure=true" | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1057003
132
4351
1
80
+ Added@lit-labs/ssr-dom-shim@1.2.1(transitive)
+ Added@lit/reactive-element@2.0.4(transitive)
+ Added@reown/appkit-common@1.5.3-c311t6.0(transitive)
+ Added@reown/appkit-core@1.5.3-c311t6.0(transitive)
+ Added@reown/appkit-polyfills@1.5.3-c311t6.0(transitive)
+ Added@reown/appkit-scaffold-ui@1.5.3-c311t6.0(transitive)
+ Added@reown/appkit-siwe@1.5.3-c311t6.0(transitive)
+ Added@reown/appkit-ui@1.5.3-ae9267.0(transitive)
+ Added@reown/appkit-utils@1.5.3-c311t6.0(transitive)
+ Added@reown/appkit-wallet@1.5.3-c311t6.0(transitive)
+ Added@types/trusted-types@2.0.7(transitive)
+ Addedansi-regex@5.0.1(transitive)
+ Addedansi-styles@4.3.0(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbignumber.js@9.1.2(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedcliui@6.0.0(transitive)
+ Addedcolor-convert@2.0.1(transitive)
+ Addedcolor-name@1.1.4(transitive)
+ Addeddayjs@1.11.10(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addeddijkstrajs@1.0.3(transitive)
+ Addedemoji-regex@8.0.0(transitive)
+ Addedencode-utf8@1.0.3(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedget-caller-file@2.0.5(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedis-fullwidth-code-point@3.0.0(transitive)
+ Addedlit@3.1.0(transitive)
+ Addedlit-element@4.1.1(transitive)
+ Addedlit-html@3.2.1(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpngjs@5.0.0(transitive)
+ Addedqrcode@1.5.3(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@2.0.0(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedstring-width@4.2.3(transitive)
+ Addedstrip-ansi@6.0.1(transitive)
+ Addedwhich-module@2.0.1(transitive)
+ Addedwrap-ansi@6.2.0(transitive)
+ Addedy18n@4.0.3(transitive)
+ Addedyargs@15.4.1(transitive)
+ Addedyargs-parser@18.1.3(transitive)
+ Addedzod@3.22.4(transitive)