fix: update buffer-layout to fix downstream bundler issues (#18529)
* fix: update buffer-layout to fix downstream bundler issues * chore: run check on generated type declaration
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
import type {Buffer} from 'buffer';
|
||||
|
||||
import {Connection} from '../connection';
|
||||
import type {TransactionSignature} from '../transaction';
|
||||
import type {ConfirmOptions} from '../connection';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import {Buffer} from 'buffer';
|
||||
|
||||
export const toBuffer = (arr: Buffer | Uint8Array | Array<number>): Buffer => {
|
||||
if (arr instanceof Buffer) {
|
||||
if (Buffer.isBuffer(arr)) {
|
||||
return arr;
|
||||
} else if (arr instanceof Uint8Array) {
|
||||
return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);
|
||||
|
Reference in New Issue
Block a user