Skip to content

Return [] rather than null when getTransactions is empty #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 16, 2025
Merged

Conversation

Shaptic
Copy link
Contributor

@Shaptic Shaptic commented Apr 15, 2025

What

Using an uninitialized array causes the result to be null if it's never appended to.

Why

This is way more intuitive, closes #398.

Known limitations

n/a

@Shaptic Shaptic requested review from 2opremio and a team April 15, 2025 21:47
@Shaptic Shaptic merged commit c6f9d58 into main Apr 16, 2025
16 of 19 checks passed
@Shaptic Shaptic deleted the empty-getTxs branch April 16, 2025 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

getTransactions should always return transactions as an array instead of null
3 participants