@web3modal/scaffold-utils
Advanced tools
Comparing version 5.0.6 to 5.0.7-cn-login-fc.0
{ | ||
"name": "@web3modal/scaffold-utils", | ||
"version": "5.0.6", | ||
"version": "5.0.7-cn-login-fc.0", | ||
"type": "module", | ||
@@ -43,4 +43,4 @@ "main": "./dist/esm/exports/index.js", | ||
"dependencies": { | ||
"@web3modal/core": "5.0.6", | ||
"@web3modal/polyfills": "5.0.6", | ||
"@web3modal/core": "5.0.7-cn-login-fc.0", | ||
"@web3modal/polyfills": "5.0.7-cn-login-fc.0", | ||
"valtio": "1.11.2" | ||
@@ -47,0 +47,0 @@ }, |
export const ConstantsUtil = { | ||
WALLET_CONNECT_CONNECTOR_ID: 'walletConnect', | ||
INJECTED_CONNECTOR_ID: 'injected', | ||
WALLET_STANDARD_CONNECTOR_ID: 'announced', | ||
COINBASE_CONNECTOR_ID: 'coinbaseWallet', | ||
@@ -5,0 +6,0 @@ COINBASE_SDK_CONNECTOR_ID: 'coinbaseWalletSDK', |
@@ -23,7 +23,7 @@ import { ConstantsUtil } from './ConstantsUtil.js'; | ||
async getUserInfo(provider) { | ||
const [address, chainId] = await Promise.all([ | ||
EthersHelpersUtil.getAddress(provider), | ||
const [addresses, chainId] = await Promise.all([ | ||
EthersHelpersUtil.getAddresses(provider), | ||
EthersHelpersUtil.getChainId(provider) | ||
]); | ||
return { chainId, address }; | ||
return { chainId, addresses }; | ||
}, | ||
@@ -38,2 +38,6 @@ async getChainId(provider) { | ||
}, | ||
async getAddresses(provider) { | ||
const addresses = await provider.request({ method: 'eth_accounts' }); | ||
return addresses; | ||
}, | ||
async addEthereumChain(provider, chain) { | ||
@@ -40,0 +44,0 @@ await provider.request({ |
export declare const ConstantsUtil: { | ||
WALLET_CONNECT_CONNECTOR_ID: string; | ||
INJECTED_CONNECTOR_ID: string; | ||
WALLET_STANDARD_CONNECTOR_ID: string; | ||
COINBASE_CONNECTOR_ID: string; | ||
@@ -5,0 +6,0 @@ COINBASE_SDK_CONNECTOR_ID: string; |
@@ -9,7 +9,8 @@ import type { CaipNetwork } from '@web3modal/core'; | ||
chainId: number; | ||
address: string | undefined; | ||
addresses: string[]; | ||
}>; | ||
getChainId(provider: Provider): Promise<number>; | ||
getAddress(provider: Provider): Promise<string | undefined>; | ||
getAddresses(provider: Provider): Promise<string[]>; | ||
addEthereumChain(provider: Provider, chain: Chain): Promise<void>; | ||
}; |
@@ -1,1 +0,1 @@ | ||
export type SocialProvider = 'google' | 'github' | 'apple' | 'facebook' | 'x' | 'discord'; | ||
export type SocialProvider = 'google' | 'github' | 'apple' | 'facebook' | 'x' | 'discord' | 'farcaster'; |
{ | ||
"name": "@web3modal/scaffold-utils", | ||
"version": "5.0.6", | ||
"version": "5.0.7-cn-login-fc.0", | ||
"type": "module", | ||
@@ -43,4 +43,4 @@ "main": "./dist/esm/exports/index.js", | ||
"dependencies": { | ||
"@web3modal/core": "5.0.6", | ||
"@web3modal/polyfills": "5.0.6", | ||
"@web3modal/core": "5.0.7-cn-login-fc.0", | ||
"@web3modal/polyfills": "5.0.7-cn-login-fc.0", | ||
"valtio": "1.11.2" | ||
@@ -47,0 +47,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
26572
388
1
+ Added@web3modal/common@5.0.7-cn-login-fc.0(transitive)
+ Added@web3modal/core@5.0.7-cn-login-fc.0(transitive)
+ Added@web3modal/polyfills@5.0.7-cn-login-fc.0(transitive)
+ Added@web3modal/wallet@5.0.7-cn-login-fc.0(transitive)
- Removed@web3modal/common@5.0.6(transitive)
- Removed@web3modal/core@5.0.6(transitive)
- Removed@web3modal/polyfills@5.0.6(transitive)
- Removed@web3modal/wallet@5.0.6(transitive)