Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix: mismatch network error #3834

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { usePoolStaking } from '@/providers/local/pool-staking.provider';
import { useCrossChainSync } from '@/providers/cross-chain-sync.provider';
import useTransactions from '@/composables/useTransactions';
import useWeb3 from '@/services/web3/useWeb3';

interface Props {
isVisible?: boolean;
Expand All @@ -16,6 +17,7 @@ const emit = defineEmits(['close', 'success']);
const { poolGauges } = usePoolStaking();
const { triggerGaugeUpdate } = useCrossChainSync();
const { addTransaction } = useTransactions();
const { isMismatchedNetwork } = useWeb3();

const showCloseBtn = ref(false);

Expand Down Expand Up @@ -59,6 +61,7 @@ const actions = [
<template>
<BalModal
:show="isVisible"
:disabled="isMismatchedNetwork"
title="Trigger pool gauge veBAL update"
@close="emit('close')"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { TransactionResponse } from '@ethersproject/abstract-provider';
import { useCrossChainSync } from '@/providers/cross-chain-sync.provider';
import useTransactions from '@/composables/useTransactions';
import useEthers from '@/composables/useEthers';
import useWeb3 from '@/services/web3/useWeb3';

/**
* TYPES
Expand Down Expand Up @@ -36,6 +37,7 @@ const {
tempSyncingNetworks,
setSyncTxHashes,
} = useCrossChainSync();
const { isMismatchedNetwork } = useWeb3();

/**
* STATE
Expand Down Expand Up @@ -171,6 +173,7 @@ const networkSyncSteps = computed(() => {
:actions="networkSyncSteps"
primaryActionType="sync"
:spacerWidth="10"
:disabled="isMismatchedNetwork"
@success="handleSuccess"
@set-current-action-index="currentActionIndex = $event"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const lockActionStates = reactive<LockActionState[]>(
*/
const { t } = useI18n();
const { networkConfig } = useConfig();
const { getProvider, explorerLinks } = useWeb3();
const { getProvider, explorerLinks, isMismatchedNetwork } = useWeb3();
const { addTransaction } = useTransactions();
const { txListener, getTxConfirmedAt } = useEthers();
const { fNum } = useNumbers();
Expand Down Expand Up @@ -228,6 +228,7 @@ onBeforeMount(async () => {
v-if="!lockActionStatesConfirmed"
:actions="actions"
:isLoading="isLoadingApprovals"
:disabled="isMismatchedNetwork"
primaryActionType="extendLock"
/>
<template v-else>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const unlockActionState = reactive<UnlockActionState>({
*/
const { t } = useI18n();
const { networkConfig } = useConfig();
const { getProvider, explorerLinks } = useWeb3();
const { getProvider, explorerLinks, isMismatchedNetwork } = useWeb3();
const { addTransaction } = useTransactions();
const { txListener, getTxConfirmedAt } = useEthers();

Expand Down Expand Up @@ -131,6 +131,7 @@ async function submit() {
<BalActionSteps
v-if="!unlockActionState.confirmed"
:actions="actions"
:disabled="isMismatchedNetwork"
primaryActionType="unlock"
/>
<template v-else>
Expand Down