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 48c06fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/lib/web3js-common/src/stakeAccount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,12 @@ function isAccountInfoParsedData(
if (data === null) {
return false
}
if (!data.data) {
return false
}
return (
data.data &&
!(data.data instanceof Buffer) &&
'parsed' in data.data &&
data.data.parsed !== undefined
)
}
Expand Down

0 comments on commit 48c06fb

Please sign in to comment.