Skip to content

Commit

Permalink
Partial sign transactions *after* modifying them
Browse files Browse the repository at this point in the history
  • Loading branch information
steveluscher committed May 13, 2024
1 parent 5a538a4 commit ac668b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/secure-clients/src/SolanaClient/BackpackSolanaWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,18 +169,18 @@ export class BackpackSolanaWallet {
const commitment = request.commitment;

if (!isVersionedTransaction(tx)) {
if (signers) {
signers.forEach((s: Signer) => {
tx.partialSign(s);
});
}
if (!tx.feePayer) {
tx.feePayer = publicKey;
}
if (!tx.recentBlockhash) {
const { blockhash } = await connection.getLatestBlockhash(commitment);
tx.recentBlockhash = blockhash;
}
if (signers) {
signers.forEach((s: Signer) => {
tx.partialSign(s);
});
}
} else {
if (signers) {
tx.sign(signers);
Expand Down

0 comments on commit ac668b6

Please sign in to comment.