feat: use .env to setup chain ID
This commit is contained in:
parent
af788a526e
commit
454ab1ae21
@ -20,7 +20,8 @@ export default {
|
||||
const provider = await detectEthereumProvider()
|
||||
if (provider) {
|
||||
const chainId = await window.ethereum.request({ method: 'eth_chainId' })
|
||||
if (chainId == 0xaa36a7) {
|
||||
console.log(chainId)
|
||||
if (chainId == import.meta.env.VITE_CHAIN_ID) {
|
||||
const account = await window.ethereum.request({ method: 'eth_requestAccounts' })
|
||||
this.client.address = account[0]
|
||||
this.client.linked = true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user