From cf941b0eda304a38db71ef4a97d46d677c8a751d Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Thu, 20 Aug 2020 12:36:42 +0800 Subject: [PATCH] fix: properly decode account notifications (#11724) --- web3.js/src/connection.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index b2bc738172..c97f7c0980 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -2832,12 +2832,13 @@ export class Connection { const {result} = res; const {value, context} = result; + assert(value.data[1] === 'base64'); sub.callback( { executable: value.executable, owner: new PublicKey(value.owner), lamports: value.lamports, - data: Buffer.from(value.data, 'base64'), + data: Buffer.from(value.data[0], 'base64'), }, context, );