Skip to content

Commit 349c847

Browse files
authored
Merge pull request #8211 from BitGo/luis/BTC-3099-fix-explain-signature-validation
fix: use serialize without signature validation in WASM explain path
2 parents 7befc20 + df7223b commit 349c847

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

modules/sdk-coin-sol/src/lib/transaction.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,8 +507,15 @@ export class Transaction extends BaseTransaction {
507507
// This validates the WASM path against production traffic before
508508
// replacing the legacy implementation for all networks.
509509
if (this._coinConfig.name === 'tsol') {
510+
// explainTransaction should work on unsigned/partially-signed transactions
511+
// (e.g., during parseTransaction round-trips where null signatures become
512+
// zero-filled buffers). Use serialize without signature validation since
513+
// we only need to read the transaction, not broadcast it.
514+
const txBase64 = Buffer.from(
515+
this._solTransaction.serialize({ verifySignatures: false, requireAllSignatures: false })
516+
).toString('base64');
510517
return explainSolTransaction({
511-
txBase64: this.toBroadcastFormat(),
518+
txBase64,
512519
feeInfo: this._lamportsPerSignature ? { fee: this._lamportsPerSignature.toString() } : undefined,
513520
tokenAccountRentExemptAmount: this._tokenAccountRentExemptAmount,
514521
coinName: this._coinConfig.name,

0 commit comments

Comments
 (0)