Update web3modal (#68)

This commit is contained in:
Gregório Granado Magalhães 2023-07-11 06:09:00 -03:00 committed by GitHub
parent c21b117a61
commit 5618811dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 965 additions and 1824 deletions

2779
js/ui/package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -49,9 +49,9 @@
"validate": "svelte-check" "validate": "svelte-check"
}, },
"dependencies": { "dependencies": {
"@wagmi/core": "^1.2.0", "@wagmi/core": "^1.3.7",
"@web3modal/ethereum": "^2.4.5", "@web3modal/ethereum": "^2.6.2",
"@web3modal/html": "^2.4.5", "@web3modal/html": "^2.6.2",
"js-cookie": "^3.0.5", "js-cookie": "^3.0.5",
"siwe": "^2.1.4", "siwe": "^2.1.4",
"url": "^0.11.0", "url": "^0.11.0",

View File

@ -25,7 +25,7 @@
const { publicClient } = configureChains(chains, [w3mProvider({ projectId })]); const { publicClient } = configureChains(chains, [w3mProvider({ projectId })]);
const wagmiConfig = createConfig({ const wagmiConfig = createConfig({
autoConnect: true, autoConnect: true,
connectors: w3mConnectors({ projectId, version: 1, chains }), connectors: w3mConnectors({ projectId, chains }),
publicClient, publicClient,
}); });
const ethereumClient = new EthereumClient(wagmiConfig, chains); const ethereumClient = new EthereumClient(wagmiConfig, chains);
@ -44,7 +44,7 @@
if (account.isConnected) { if (account.isConnected) {
try { try {
const expirationTime = new Date( const expirationTime = new Date(
new Date().getTime() + (2 * 24 * 60 * 60 * 1000) // 48h new Date().getTime() + 2 * 24 * 60 * 60 * 1000, // 48h
); );
const signMessage = new SiweMessage({ const signMessage = new SiweMessage({
domain: window.location.host, domain: window.location.host,