chore: prettier fixes
This commit is contained in:
parent
ea1295300d
commit
8cf98ec4e2
|
@ -314,7 +314,9 @@ declare module '@solana/web3.js' {
|
|||
info: Info;
|
||||
|
||||
constructor(key: PublicKey, info: Info);
|
||||
static fromConfigData(buffer: Buffer | Uint8Array | Array<number>): ValidatorInfo | null;
|
||||
static fromConfigData(
|
||||
buffer: Buffer | Uint8Array | Array<number>,
|
||||
): ValidatorInfo | null;
|
||||
}
|
||||
|
||||
// === src/sysvar.js ===
|
||||
|
@ -346,7 +348,9 @@ declare module '@solana/web3.js' {
|
|||
credits: number;
|
||||
lastEpochCredits: number;
|
||||
epochCredits: Array<EpochCredits>;
|
||||
static fromAccountData(buffer: Buffer | Uint8Array | Array<number>): VoteAccount;
|
||||
static fromAccountData(
|
||||
buffer: Buffer | Uint8Array | Array<number>,
|
||||
): VoteAccount;
|
||||
}
|
||||
|
||||
// === src/instruction.js ===
|
||||
|
|
|
@ -395,7 +395,9 @@ declare module '@solana/web3.js' {
|
|||
info: Info;
|
||||
|
||||
constructor(key: PublicKey, info: Info): ValidatorInfo;
|
||||
static fromConfigData(buffer: Buffer | Uint8Array | Array<number>): ValidatorInfo | null;
|
||||
static fromConfigData(
|
||||
buffer: Buffer | Uint8Array | Array<number>,
|
||||
): ValidatorInfo | null;
|
||||
}
|
||||
|
||||
// === src/sysvar.js ===
|
||||
|
@ -427,7 +429,9 @@ declare module '@solana/web3.js' {
|
|||
credits: number;
|
||||
lastEpochCredits: number;
|
||||
epochCredits: Array<EpochCredits>;
|
||||
static fromAccountData(buffer: Buffer | Uint8Array | Array<number>): VoteAccount;
|
||||
static fromAccountData(
|
||||
buffer: Buffer | Uint8Array | Array<number>,
|
||||
): VoteAccount;
|
||||
}
|
||||
|
||||
// === src/instruction.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<number>): ValidatorInfo | null {
|
||||
static fromConfigData(
|
||||
buffer: Buffer | Uint8Array | Array<number>,
|
||||
): ValidatorInfo | null {
|
||||
const PUBKEY_LENGTH = 32;
|
||||
|
||||
let byteArray = [...buffer];
|
||||
|
|
|
@ -80,7 +80,9 @@ export class VoteAccount {
|
|||
* @param buffer account data
|
||||
* @return VoteAccount
|
||||
*/
|
||||
static fromAccountData(buffer: Buffer | Uint8Array | Array<number>): VoteAccount {
|
||||
static fromAccountData(
|
||||
buffer: Buffer | Uint8Array | Array<number>,
|
||||
): VoteAccount {
|
||||
const va = VoteAccountLayout.decode(toBuffer(buffer), 0);
|
||||
va.nodePubkey = new PublicKey(va.nodePubkey);
|
||||
va.authorizedVoterPubkey = new PublicKey(va.authorizedVoterPubkey);
|
||||
|
|
|
@ -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,
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue