Skip to content

Commit

Permalink
Remove onUnmounted from walletConnectV2
Browse files Browse the repository at this point in the history
  • Loading branch information
ccali11 committed Aug 21, 2023
1 parent 98a3e8b commit d145b60
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions apps/web/src/composables/walletConnectV2.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref, onMounted, onBeforeUnmount, onUnmounted } from 'vue'
import { ref, onMounted, onBeforeUnmount } from 'vue'
import Client from '@walletconnect/sign-client'
import { ethers, providers } from 'ethers'
import { apiGetChainNamespace, ChainsMap } from 'caip-api'
Expand Down Expand Up @@ -119,6 +119,7 @@ export default function useWalletConnectV2() {
onBeforeUnmount(() => {
cleanupFunctions.forEach((cleanup) => cleanup())
cleanupFunctions = [] // Reset the array
componentIsMounted.value = false
})

onMounted(async () => {
Expand Down Expand Up @@ -146,10 +147,6 @@ export default function useWalletConnectV2() {
}
})

onUnmounted(() => {
componentIsMounted.value = false
})

async function signWalletConnectMessage(message: string) : Promise<string>{
try {
const signer = walletConnectWeb3Provider.value?.getSigner()
Expand Down

0 comments on commit d145b60

Please sign in to comment.