Skip to content

Commit

Permalink
add dummy fields to keep ethers6 happy (#2003)
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene authored Aug 1, 2024
1 parent c3ad0a4 commit 65d9646
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/walletextension/rpcapi/blockchain_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,11 @@ func (api *BlockChainAPI) GetBlockByNumber(ctx context.Context, number rpc.Block
// convert to geth header and marshall
header := subscription.ConvertBatchHeader(resp)
fields := RPCMarshalHeader(header)

// dummy fields
fields["size"] = hexutil.Uint64(0)
fields["transactions"] = []any{}

addExtraTenFields(fields, resp)
return fields, err
}
Expand All @@ -129,6 +134,11 @@ func (api *BlockChainAPI) GetBlockByHash(ctx context.Context, hash gethcommon.Ha
// convert to geth header and marshall
header := subscription.ConvertBatchHeader(resp)
fields := RPCMarshalHeader(header)

// dummy fields
fields["size"] = hexutil.Uint64(0)
fields["transactions"] = []any{}

addExtraTenFields(fields, resp)
return fields, err
}
Expand Down

0 comments on commit 65d9646

Please sign in to comment.