Skip to content

Commit

Permalink
[web3js common] making non async when not needed being async
Browse files Browse the repository at this point in the history
  • Loading branch information
ochaloup committed Jun 13, 2024
1 parent 236f6be commit 12ddc71
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"@types/bn.js": "^5.1.5",
"bigint-buffer": "^1.1.5",
"gts": "^5.3.0",
"eslint": "8.57.0",
"eslint-plugin-node": "11.1.0",
"eslint": "8.1.1",
"husky": "^9.0.11",
"jest": "^29.7.0",
"lint-staged": "^15.2.2",
Expand Down
8 changes: 7 additions & 1 deletion packages/lib/cli-common/src/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ export class CliCommandError extends ExecutionError {
}
let errorMessage: string
if (valueName) {
errorMessage = format('%s [%s=%s]: %s', commandName, valueName, value, msg)
errorMessage = format(
'%s [%s=%s]: %s',
commandName,
valueName,
value,
msg
)
} else {
errorMessage = format('%s: %s', commandName, msg)
}
Expand Down
4 changes: 2 additions & 2 deletions packages/lib/web3js-common/src/voteAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ export async function getVoteAccount(
return await getVoteAccountFromData(address, voteAccountInfo)
}

export async function getVoteAccountFromData(
export function getVoteAccountFromData(
address: PublicKey,
voteAccountInfo: AccountInfo<Buffer>
): Promise<ProgramAccountInfo<VoteAccount>> {
): ProgramAccountInfo<VoteAccount> {
const versionOffset = 4
const version = VoteAccountVersionLayout.decode(
toBuffer(voteAccountInfo.data),
Expand Down
2 changes: 1 addition & 1 deletion packages/marinade-ts-cli/__tests__/setup/globalSetup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import path from 'path'
import { tmpdir } from 'os'
import { Wallet } from '@coral-xyz/anchor/dist/cjs/provider'

// eslint-disable-next-line n/no-extraneous-require
// eslint-disable-next-line node/no-extraneous-require
require('ts-node/register')

// 6LHBDKtwo69UKxWgY15vE3QykP4uf5DzZUgBiMzhEWpf
Expand Down

0 comments on commit 12ddc71

Please sign in to comment.