Skip to content

Commit

Permalink
client/pendingBlock: ensure withdrawals only get added if they are no…
Browse files Browse the repository at this point in the history
…t null && not undefined
  • Loading branch information
jochem-brouwer committed Oct 25, 2023
1 parent 61af5c3 commit 56ce1d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/client/src/miner/pendingBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export class PendingBlock {

let withdrawalsBuf = zeros(0)

if (withdrawals !== undefined) {
if (withdrawals !== undefined && withdrawals !== null) {
const withdrawalsBufTemp: Uint8Array[] = []
for (const withdrawal of withdrawals) {
const indexBuf = bigIntToUnpaddedBytes(toType(withdrawal.index ?? 0, TypeOutput.BigInt))
Expand Down

0 comments on commit 56ce1d5

Please sign in to comment.