Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Refactor oneOf Formatting to be More Generic #5370

@spacesailor24

Description

@spacesailor24

This is the fix that's specific to blockSchema.transactions, and needs to be refactored to be more general.
It's checking if the first value in the transactions array is a hash or a transaction object and uses the corresponding schema

Originally posted by @spacesailor24 in #5363 (comment)


Additionally, if one of the schemas defined by oneOf is an array of items that need to be formatted (e.g. blockSchema.transacitons), they're not currently being formatted i.e. When formatting a block the array of transaction hashes or object will always be returned using hex strings instead of whatever data format the user specifies


#5363 (review)

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.x4.0 related

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions