Skip to content
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

[Patch] check for array type on beaconcha.in response #611

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

wackerow
Copy link
Member

@wackerow wackerow commented Mar 9, 2023

Description

Recent change to beaconcha.in API endpoint returns either an object or an array of objects, depending on the network being utilized.

This surfaced on the Zhejiang Withdrawals page in the credentials check widget, where the responses were no longer being parsed properly.

PR checks for .length property of data to differentiate between and object and an array, then parses out the first item in the case of an array.

Screenshots

Issue:
image

Patch:
image

@wackerow wackerow requested review from CarlBeek and hwwhww March 10, 2023 20:22
@wackerow wackerow merged commit 6a39103 into dev Mar 16, 2023
@wackerow wackerow deleted the patch-credential-check branch March 16, 2023 16:18
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.

2 participants