From 476ea695dc1a24c95bdbad5358f7167bbedc02d8 Mon Sep 17 00:00:00 2001 From: man0s <95379755+losman0s@users.noreply.github.com> Date: Tue, 19 Sep 2023 23:11:08 +0800 Subject: [PATCH] fix(mfi-v2-ui): 2-step signature for LST minting --- .../src/components/Staking/StakingCard/StakingCard.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/marginfi-v2-ui/src/components/Staking/StakingCard/StakingCard.tsx b/apps/marginfi-v2-ui/src/components/Staking/StakingCard/StakingCard.tsx index 3906559784..8dbd82ccb9 100644 --- a/apps/marginfi-v2-ui/src/components/Staking/StakingCard/StakingCard.tsx +++ b/apps/marginfi-v2-ui/src/components/Staking/StakingCard/StakingCard.tsx @@ -273,9 +273,8 @@ export const StakingCard: FC = () => { depositTransaction.sign(signers); // Send txs - const versionedTransactions = await wallet.signAllTransactions([swapTransaction, depositTransaction]); - - const swapSig = await connection.sendTransaction(versionedTransactions[0]); + const signedSwapTransaction = await wallet.signTransaction(swapTransaction); + const swapSig = await connection.sendTransaction(signedSwapTransaction); await connection.confirmTransaction( { blockhash, @@ -284,7 +283,9 @@ export const StakingCard: FC = () => { }, "confirmed" ); // TODO: explicitly warn if second tx fails - const depositSig = await connection.sendTransaction(versionedTransactions[1]); + + const signedDepositTransaction = await wallet.signTransaction(depositTransaction); + const depositSig = await connection.sendTransaction(signedDepositTransaction); await connection.confirmTransaction( { blockhash,