Skip to content

Commit

Permalink
fix: Send serialized message
Browse files Browse the repository at this point in the history
  • Loading branch information
y3fers0n committed Apr 25, 2024
1 parent 6819e7e commit 6383c20
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/solana_provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,14 @@ class TrustSolanaWeb3Provider extends BaseProvider {
})
).toString("base64");

return this._request("signRawTransaction", { data, raw, version })
const rawMessage = Buffer.from(tx.message.serialize()).toString("base64");

return this._request("signRawTransaction", {
data,
raw,
rawMessage,
version,
})
.then((signatureEncoded) =>
this.mapSignedTransaction(tx, signatureEncoded)
)
Expand All @@ -110,14 +117,18 @@ class TrustSolanaWeb3Provider extends BaseProvider {
const data = JSON.stringify(tx);
const version = tx.version;

const rawMessage = Buffer.from(tx.message.serialize()).toString(
"base64"
);

const raw = Buffer.from(
tx.serialize({
requireAllSignatures: false,
verifySignatures: false,
})
).toString("base64");

return { data, raw, version };
return { data, raw, rawMessage, version };
}),
})
.then((signaturesEncoded) =>
Expand Down

0 comments on commit 6383c20

Please sign in to comment.