Skip to content

Commit

Permalink
Update transaction debug info
Browse files Browse the repository at this point in the history
  • Loading branch information
mcintyre94 committed Sep 26, 2023
1 parent ef840d7 commit b64f235
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/SendTransactionRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const SendTransactionRequest: FC<SendTransactionRequestProps> = ({ refere
// Debug: log current and expected signers of the transaction
// The API can return a partially signed transaction
console.log('Fetched transaction', transaction);
const currentSigners = transaction.signatures.filter(k => k.signature !== null).map(k => k.publicKey.toBase58());
const expectedSigners = transaction.instructions.flatMap(i => i.keys.filter(k => k.isSigner).map(k => k.pubkey.toBase58()));
console.log({ currentSigners, expectedSigners });
const currentSigners = [... new Set(transaction.signatures.filter(k => k.signature !== null).map(k => k.publicKey.toBase58()))];
const expectedSigners = [... new Set(transaction.instructions.flatMap(i => i.keys.filter(k => k.isSigner).map(k => k.pubkey.toBase58())))];
console.log({ currentSigners, expectedSigners, transaction: response.transaction });

// Send the transaction
await sendTransaction(transaction, connection);
Expand Down

0 comments on commit b64f235

Please sign in to comment.