Skip to content

Commit

Permalink
fix(mfi-v2-ui): 2-step signature for LST minting
Browse files Browse the repository at this point in the history
  • Loading branch information
losman0s committed Sep 19, 2023
1 parent e9e60d1 commit 476ea69
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 476ea69

Please sign in to comment.