fix: Remove deprecated length field
This commit is contained in:
parent
efd0392706
commit
f2b38bcc56
|
@ -464,14 +464,8 @@ export class Connection {
|
|||
async sendRawTransaction(
|
||||
rawTransaction: Buffer,
|
||||
): Promise<TransactionSignature> {
|
||||
// sendTransaction RPC API requires a u64 length field prepended to the raw
|
||||
// Transaction bytes
|
||||
const rpcTransaction = Buffer.alloc(8 + rawTransaction.length);
|
||||
rpcTransaction.writeUInt32LE(rawTransaction.length, 0);
|
||||
rawTransaction.copy(rpcTransaction, 8);
|
||||
|
||||
const unsafeRes = await this._rpcRequest('sendTransaction', [
|
||||
[...rpcTransaction],
|
||||
[...rawTransaction],
|
||||
]);
|
||||
const res = SendTransactionRpcResult(unsafeRes);
|
||||
if (res.error) {
|
||||
|
|
Loading…
Reference in New Issue