Skip to content

Commit e53a4b6

Browse files
Revert fee payer based simulation for voting page
1 parent fa5bf2f commit e53a4b6

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

apps/web/app/(authenticated)/vault/[vaultId]/(dashboard)/transactions/page.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { motion, AnimatePresence } from 'motion/react';
1212
import { useMemo } from 'react';
1313
import { Network } from '@aptos-labs/ts-sdk';
1414
import { useAccount } from '@aptos-labs/react';
15+
import { isDevelopment } from '@/lib/development';
1516

1617
export default function VaultTransactionsPage() {
1718
const account = useAccount();
@@ -66,7 +67,7 @@ export default function VaultTransactionsPage() {
6667

6768
return (
6869
<div className="h-full flex flex-col pb-12">
69-
{isOwner && (
70+
{(isOwner || isDevelopment) && (
7071
<>
7172
<br />
7273
<VaultDetailsPendingTransactions />

apps/web/context/ActiveProposalProvider.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ export const [ActiveProposalProvider, useActiveProposal] = constate(
103103
sender: vaultAddress,
104104
payload: new TransactionPayloadEntryFunction(
105105
multisigPayload.transaction_payload
106-
),
107-
feePayerAddress: AccountAddress.from(account.address)
106+
)
107+
// TODO: There is an issue with fee payer addresses not respecting gas estimation issues.
108+
// feePayerAddress: AccountAddress.from(account.address)
108109
});
109110
},
110111
refetchInterval: 20 * 1000,
@@ -115,7 +116,12 @@ export const [ActiveProposalProvider, useActiveProposal] = constate(
115116
transaction: simulationPayload.data ?? undefined,
116117
network: { network },
117118
sender: AccountAddress.from(vaultAddress),
118-
withFeePayer: true
119+
// TODO: Revert this when the issue is fixed by the full node providers.
120+
// withFeePayer: true,
121+
options: {
122+
estimateGasUnitPrice: true,
123+
estimateMaxGasAmount: true
124+
}
119125
});
120126

121127
const transactionPayload = useQuery({

apps/web/lib/development.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const isDevelopment = process.env.NODE_ENV === 'development';

0 commit comments

Comments
 (0)