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"
},
"dependencies": {
"@wagmi/core": "^1.2.0",
"@web3modal/ethereum": "^2.4.5",
"@web3modal/html": "^2.4.5",
"@wagmi/core": "^1.3.7",
"@web3modal/ethereum": "^2.6.2",
"@web3modal/html": "^2.6.2",
"js-cookie": "^3.0.5",
"siwe": "^2.1.4",
"url": "^0.11.0",

View File

@ -25,7 +25,7 @@
const { publicClient } = configureChains(chains, [w3mProvider({ projectId })]);
const wagmiConfig = createConfig({
autoConnect: true,
connectors: w3mConnectors({ projectId, version: 1, chains }),
connectors: w3mConnectors({ projectId, chains }),
publicClient,
});
const ethereumClient = new EthereumClient(wagmiConfig, chains);
@ -44,7 +44,7 @@
if (account.isConnected) {
try {
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({
domain: window.location.host,