diff --git a/src/features/locking/LockForm.tsx b/src/features/locking/LockForm.tsx index a1ca45e..c50fa90 100644 --- a/src/features/locking/LockForm.tsx +++ b/src/features/locking/LockForm.tsx @@ -54,7 +54,7 @@ export function LockForm({ useTransactionPlan({ createTxPlan: (v) => getLockTxPlan(v, pendingWithdrawals || [], stakeBalances || emptyStakeBalances), - onStepSuccess: () => refetch, + onStepSuccess: () => refetch(), onPlanSuccess: onConfirmed ? (v, r) => onConfirmed({ diff --git a/src/features/staking/StakeForm.tsx b/src/features/staking/StakeForm.tsx index c489605..4516fb3 100644 --- a/src/features/staking/StakeForm.tsx +++ b/src/features/staking/StakeForm.tsx @@ -59,7 +59,7 @@ export function StakeForm({ const { getNextTx, txPlanIndex, numTxs, isPlanStarted, onTxSuccess } = useTransactionPlan({ createTxPlan: (v) => getStakeTxPlan(v, groups || [], groupToStake || {}), - onStepSuccess: () => refetch, + onStepSuccess: () => refetch(), onPlanSuccess: (v, r) => onConfirmed({ message: `${v.action} successful`, diff --git a/src/features/transactions/hooks.ts b/src/features/transactions/hooks.ts index 2e8b4fa..b29dd0e 100644 --- a/src/features/transactions/hooks.ts +++ b/src/features/transactions/hooks.ts @@ -7,6 +7,7 @@ import { capitalizeFirstLetter } from 'src/utils/strings'; import { TransactionReceipt } from 'viem'; import { useWaitForTransactionReceipt, useWriteContract } from 'wagmi'; +// TODO force chain switch to celo mainnet before sending txs export function useWriteContractWithReceipt( description: string, onSuccess?: (receipt: TransactionReceipt) => any,