Disable DSA v1

This commit is contained in:
Georges KABBOUCHI 2021-10-02 01:59:37 +03:00
parent ca4e3b19db
commit 41f1cf1b37
2 changed files with 15 additions and 2 deletions

View File

@ -9,7 +9,17 @@
class="px-8 md:px-4 max-w-6xl mx-auto"
:class="{ 'text-center': !active, 'py-12': active }"
>
<Nuxt v-if="active" />
<div v-if="active && activeAccount && activeAccount.version === '1'" class="text-center w-full my-16">
<h3 class="font-semibold text-2xl">
Assembly doesn't support DSA v1
</h3>
<p
class="mt-4 font-medium leading-normal text-grey-pure text-base"
>
Please create or switch to DSA v2.
</p>
</div>
<Nuxt v-else-if="active" />
<web-3-modal slim v-else />
</div>
@ -95,6 +105,7 @@ import { useNetwork } from "~/composables/useNetwork";
import { useModal } from "~/composables/useModal";
import { useEagerConnect } from "~/composables/useEagerConnect";
import Web3Modal from "~/components/modal/web3/Web3Modal.vue";
import { useDSA } from "~/composables/useDSA";
export default defineComponent({
components: {
@ -105,6 +116,7 @@ export default defineComponent({
},
setup() {
const { active, activate, deactivate, chainId } = useWeb3();
const { activeAccount } = useDSA();
const { activeNetworkId, activeNetwork, checkForNetworkMismatch } = useNetwork();
const { isShown: isBackdropShown, close: closeBackdrop } = useBackdrop()
const { redirect } = useContext()
@ -154,6 +166,7 @@ export default defineComponent({
})
return {
activeAccount,
active,
activate,
deactivate,

View File

@ -89,7 +89,7 @@ const appsPerNetwork = {
icon: YearnIcon,
name: "Yearn",
url: "/mainnet/yearn-v2",
description: ""
description: "Automated Yield Strategies"
}
],
polygon: [