diff --git a/web3.js/src/stake-program.js b/web3.js/src/stake-program.js index 76326d8dd0..b22dd2725e 100644 --- a/web3.js/src/stake-program.js +++ b/web3.js/src/stake-program.js @@ -328,6 +328,7 @@ export class StakeProgram { return new Transaction().add({ keys: [ {pubkey: stakeAccount, isSigner: false, isWritable: true}, + {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true}, {pubkey: authorizedPubkey, isSigner: true, isWritable: false}, ], programId: this.programId, diff --git a/web3.js/test/connection.test.js b/web3.js/test/connection.test.js index d4c6f77f56..ee2b8fa41d 100644 --- a/web3.js/test/connection.test.js +++ b/web3.js/test/connection.test.js @@ -785,7 +785,9 @@ test('multi-instruction transaction', async () => { const connection = new Connection(url, 'recent'); await connection.requestAirdrop(accountFrom.publicKey, LAMPORTS_PER_SOL); - expect(await connection.getBalance(accountFrom.publicKey)).toBe(LAMPORTS_PER_SOL); + expect(await connection.getBalance(accountFrom.publicKey)).toBe( + LAMPORTS_PER_SOL, + ); await connection.requestAirdrop(accountTo.publicKey, 21); expect(await connection.getBalance(accountTo.publicKey)).toBe(21); diff --git a/web3.js/test/stake-program.test.js b/web3.js/test/stake-program.test.js index 1eea61a0ae..4cef5bebf5 100644 --- a/web3.js/test/stake-program.test.js +++ b/web3.js/test/stake-program.test.js @@ -106,7 +106,7 @@ test('authorize', () => { type, ); - expect(transaction.keys).toHaveLength(2); + expect(transaction.keys).toHaveLength(3); expect(transaction.programId).toEqual(StakeProgram.programId); // TODO: Validate transaction contents more });