From d1d7599faaafb87da47989506069b8beef99e1c1 Mon Sep 17 00:00:00 2001 From: Iamsohungrynow <261225237+Iamsohungrynow@users.noreply.github.com> Date: Sun, 22 Nov 2026 02:32:44 +0800 Subject: [PATCH] js-legacy: Import Buffer explicitly instead of relying on the global --- clients/js-legacy/package.json | 3 ++- clients/js-legacy/src/instruction.ts | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/clients/js-legacy/package.json b/clients/js-legacy/package.json index a925065..e08a555 100644 --- a/clients/js-legacy/package.json +++ b/clients/js-legacy/package.json @@ -49,7 +49,8 @@ "@solana/web3.js": "^1.95.5" }, "dependencies": { - "@solana/codecs": "8.6.0" + "@solana/codecs": "8.6.0", + "buffer": "^6.0.3" }, "devDependencies": { "@solana/spl-type-length-value": "0.2.0", diff --git a/clients/js-legacy/src/instruction.ts b/clients/js-legacy/src/instruction.ts index b51dd03..14a9dfb 100644 --- a/clients/js-legacy/src/instruction.ts +++ b/clients/js-legacy/src/instruction.ts @@ -1,3 +1,4 @@ +import { Buffer } from 'buffer'; import type { Encoder } from '@solana/codecs'; import type { PublicKey } from '@solana/web3.js'; import {