This commit is contained in:
tim
2024-10-22 03:42:08 -04:00
parent 82fccc1be3
commit d33eca6931
12 changed files with 101 additions and 40 deletions

View File

@@ -23,7 +23,7 @@
<div v-if="status===Status.NEEDS_NETWORK">
<v-card-text>
Please connect your wallet to the Arbitrum-Sepolia test network to continue.
Please connect your wallet to the Arbitrum One network to continue.
</v-card-text>
</div>
@@ -39,7 +39,7 @@
<script setup>
import {useStore} from "@/store/store";
import {computed, ref} from "vue";
import {connectWallet, switchChain} from "@/blockchain/wallet.js";
import {addNetwork, connectWallet, switchChain} from "@/blockchain/wallet.js";
import Btn from "@/components/Btn.vue";
import Logo from "@/components/Logo.vue";
import BetaSignin from "@/components/BetaSignin.vue";
@@ -75,6 +75,14 @@ async function connect() {
// explicit user rejection
return
}
else if (e.code===4902) {
try {
await addNetwork(s.chainId)
}
catch (e) {
console.log(`Could not add network ${s.chainId}`)
}
}
else
console.log('switchChain() failure',e)
}