Skip to content

Commit

Permalink
[web3js] fixing type guard on parsedaccountdata
Browse files Browse the repository at this point in the history
  • Loading branch information
ochaloup committed Jan 21, 2025
1 parent 5a3f6c1 commit c03a426
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/lib/web3js-common/src/stakeAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,14 @@ function isAccountInfoParsedData(
data: AccountInfo<Buffer | ParsedAccountData> | null
): data is AccountInfo<ParsedAccountData> {
if (data === null) {
return false
return false;

Check failure on line 82 in packages/lib/web3js-common/src/stakeAccount.ts

View workflow job for this annotation

GitHub Actions / build (16)

Delete `;`

Check failure on line 82 in packages/lib/web3js-common/src/stakeAccount.ts

View workflow job for this annotation

GitHub Actions / build (16)

Extra semicolon
}
if (!data.data) {
return false;

Check failure on line 85 in packages/lib/web3js-common/src/stakeAccount.ts

View workflow job for this annotation

GitHub Actions / build (16)

Delete `;`

Check failure on line 85 in packages/lib/web3js-common/src/stakeAccount.ts

View workflow job for this annotation

GitHub Actions / build (16)

Extra semicolon
}
return (
data.data &&
!(data.data instanceof Buffer) &&
'parsed' in data.data &&
data.data.parsed !== undefined
)
}
Expand Down

0 comments on commit c03a426

Please sign in to comment.