From 8cf98ec4e25e7b8dd8e338cb300a5930654747f5 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Fri, 14 Feb 2020 22:33:11 +0800 Subject: [PATCH] chore: prettier fixes --- web3.js/module.d.ts | 8 ++++++-- web3.js/module.flow.js | 8 ++++++-- web3.js/src/validator-info.js | 4 +++- web3.js/src/vote-account.js | 4 +++- web3.js/test/transaction.test.js | 4 +++- 5 files changed, 21 insertions(+), 7 deletions(-) diff --git a/web3.js/module.d.ts b/web3.js/module.d.ts index 724645216a..420fbf74c5 100644 --- a/web3.js/module.d.ts +++ b/web3.js/module.d.ts @@ -314,7 +314,9 @@ declare module '@solana/web3.js' { info: Info; constructor(key: PublicKey, info: Info); - static fromConfigData(buffer: Buffer | Uint8Array | Array): ValidatorInfo | null; + static fromConfigData( + buffer: Buffer | Uint8Array | Array, + ): ValidatorInfo | null; } // === src/sysvar.js === @@ -346,7 +348,9 @@ declare module '@solana/web3.js' { credits: number; lastEpochCredits: number; epochCredits: Array; - static fromAccountData(buffer: Buffer | Uint8Array | Array): VoteAccount; + static fromAccountData( + buffer: Buffer | Uint8Array | Array, + ): VoteAccount; } // === src/instruction.js === diff --git a/web3.js/module.flow.js b/web3.js/module.flow.js index 63a2380498..1db334a537 100644 --- a/web3.js/module.flow.js +++ b/web3.js/module.flow.js @@ -395,7 +395,9 @@ declare module '@solana/web3.js' { info: Info; constructor(key: PublicKey, info: Info): ValidatorInfo; - static fromConfigData(buffer: Buffer | Uint8Array | Array): ValidatorInfo | null; + static fromConfigData( + buffer: Buffer | Uint8Array | Array, + ): ValidatorInfo | null; } // === src/sysvar.js === @@ -427,7 +429,9 @@ declare module '@solana/web3.js' { credits: number; lastEpochCredits: number; epochCredits: Array; - static fromAccountData(buffer: Buffer | Uint8Array | Array): VoteAccount; + static fromAccountData( + buffer: Buffer | Uint8Array | Array, + ): VoteAccount; } // === src/instruction.js === diff --git a/web3.js/src/validator-info.js b/web3.js/src/validator-info.js index 3c8ea97db0..0079260ffe 100644 --- a/web3.js/src/validator-info.js +++ b/web3.js/src/validator-info.js @@ -72,7 +72,9 @@ export class ValidatorInfo { * @param buffer config account data * @return null if info was not found */ - static fromConfigData(buffer: Buffer | Uint8Array | Array): ValidatorInfo | null { + static fromConfigData( + buffer: Buffer | Uint8Array | Array, + ): ValidatorInfo | null { const PUBKEY_LENGTH = 32; let byteArray = [...buffer]; diff --git a/web3.js/src/vote-account.js b/web3.js/src/vote-account.js index fdb30d1d96..7e0803e21f 100644 --- a/web3.js/src/vote-account.js +++ b/web3.js/src/vote-account.js @@ -80,7 +80,9 @@ export class VoteAccount { * @param buffer account data * @return VoteAccount */ - static fromAccountData(buffer: Buffer | Uint8Array | Array): VoteAccount { + static fromAccountData( + buffer: Buffer | Uint8Array | Array, + ): VoteAccount { const va = VoteAccountLayout.decode(toBuffer(buffer), 0); va.nodePubkey = new PublicKey(va.nodePubkey); va.authorizedVoterPubkey = new PublicKey(va.authorizedVoterPubkey); diff --git a/web3.js/test/transaction.test.js b/web3.js/test/transaction.test.js index 58e3163642..67195c185d 100644 --- a/web3.js/test/transaction.test.js +++ b/web3.js/test/transaction.test.js @@ -423,5 +423,7 @@ test('serialize unsigned transaction', () => { expect(wireTransaction).toEqual(expectedTransaction.serialize()); expect(Transaction.from(wireTransaction)).toEqual(expectedTransaction); expect(Transaction.from(wireTransactionArray)).toEqual(expectedTransaction); - expect(Transaction.from(Uint8Array.from(wireTransactionArray))).toEqual(expectedTransaction); + expect(Transaction.from(Uint8Array.from(wireTransactionArray))).toEqual( + expectedTransaction, + ); });