mirror of
https://github.com/Instadapp/assembly.git
synced 2024-07-29 22:37:06 +00:00
Update useSafeAppConnection.ts
This commit is contained in:
parent
b00b101c6a
commit
bd8a7f0e80
|
@ -2,7 +2,7 @@ import { useWeb3 } from "@instadapp/vue-web3";
|
|||
import { injected } from "../connectors";
|
||||
import { onMounted, ref, watch } from "@nuxtjs/composition-api";
|
||||
import { SafeAppConnector } from "@gnosis.pm/safe-apps-web3-react";
|
||||
import { useNetwork } from "./useNetwork";
|
||||
import { Network, useNetwork } from "./useNetwork";
|
||||
|
||||
export function useSafeAppConnection(connector?: SafeAppConnector) {
|
||||
const { activate, active } = useWeb3();
|
||||
|
@ -17,8 +17,7 @@ export function useSafeAppConnection(connector?: SafeAppConnector) {
|
|||
tried.value = true;
|
||||
});
|
||||
|
||||
//@ts-ignore
|
||||
activeNetworkId.value = await connector.getChainId()
|
||||
activeNetworkId.value = (await connector.getChainId() === 1) ? Network.Mainnet : Network.Polygon;
|
||||
} else {
|
||||
tried.value = true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user