From ebda95bd114a434aafef44ba43493376d3db7ac5 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Mon, 3 Feb 2020 16:59:39 +0800 Subject: [PATCH] chore: run lint --- web3.js/src/connection.js | 2 +- web3.js/src/stake-program.js | 8 ++++++-- web3.js/test/connection.test.js | 4 +--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/web3.js/src/connection.js b/web3.js/src/connection.js index 242aa61ffb..5a24697be5 100644 --- a/web3.js/src/connection.js +++ b/web3.js/src/connection.js @@ -1056,7 +1056,7 @@ export class Connection { } assert(typeof result.result !== 'undefined'); if (!result.result) { - throw new Error('Confirmed block '+slot+' not found'); + throw new Error('Confirmed block ' + slot + ' not found'); } return { blockhash: new PublicKey(result.result.blockhash).toString(), diff --git a/web3.js/src/stake-program.js b/web3.js/src/stake-program.js index e4fc5ecfe7..0e7c2074ea 100644 --- a/web3.js/src/stake-program.js +++ b/web3.js/src/stake-program.js @@ -297,9 +297,13 @@ export class StakeProgram { {pubkey: stakeAccount, isSigner: false, isWritable: true}, {pubkey: votePubkey, isSigner: false, isWritable: false}, {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false}, - {pubkey: SYSVAR_STAKE_HISTORY_PUBKEY, isSigner: false, isWritable: false}, + { + pubkey: SYSVAR_STAKE_HISTORY_PUBKEY, + isSigner: false, + isWritable: false, + }, {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false}, - {pubkey: authorizedPubkey, isSigner: true, isWritable: false} + {pubkey: authorizedPubkey, isSigner: true, isWritable: false}, ], programId: this.programId, data, diff --git a/web3.js/test/connection.test.js b/web3.js/test/connection.test.js index a0310373a3..1129cedb11 100644 --- a/web3.js/test/connection.test.js +++ b/web3.js/test/connection.test.js @@ -658,9 +658,7 @@ test('get confirmed block', async () => { result: null, }, ]); - await expect( - connection.getConfirmedBlock(10000), - ).rejects.toThrow(); + await expect(connection.getConfirmedBlock(10000)).rejects.toThrow(); }); test('get recent blockhash', async () => {