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

fix: src-20 tokens map #5347

Closed
wants to merge 1 commit into from
Closed

fix: src-20 tokens map #5347

wants to merge 1 commit into from

Conversation

fbwoolf
Copy link
Contributor

@fbwoolf fbwoolf commented May 6, 2024

Try out Leather build a8278c8Extension build, Test report, Storybook, Chromatic

Put up this quick fix bc the SRC-20 balance endpoint started returning an object instead of an array. Their team made a fix on their end, but we can merge this ...or do something better ...if we want to make sure it doesn't happen again for our users.

EDIT: I added the same fix for their stamps array just in case.

@fbwoolf fbwoolf changed the title fix: stx-20 tokens map fix: src-20 tokens map May 6, 2024
@fbwoolf fbwoolf force-pushed the fix/src-20-asset-list branch 2 times, most recently from 76de724 to 6030a8f Compare May 6, 2024 23:27
@fbwoolf fbwoolf requested a review from kyranjamie May 7, 2024 00:34
@fbwoolf fbwoolf force-pushed the fix/src-20-asset-list branch from 6030a8f to a8278c8 Compare May 7, 2024 01:02
@fbwoolf fbwoolf requested review from alter-eggo and pete-watters and removed request for alter-eggo May 7, 2024 01:11
@kyranjamie
Copy link
Collaborator

kyranjamie commented May 7, 2024

Didn't see this before making #5348. This only checks for the one property, and would miss other changes, I reckon it's better to validate the entire schema.

Also not sure this would have caught the problem. resp.data was defined, just not the type we expect, and this just checks for undefined.

@fbwoolf
Copy link
Contributor Author

fbwoolf commented May 7, 2024

Didn't see this before making #5348. This only checks for the one property, and would miss other changes, I reckon it's better to validate the entire schema.

Np, was an effort to do a quick fix.

Also not sure this would have caught the problem. resp.data was defined, just not the type we expect, and this just checks for undefined.

This did fix it bc it was defined but an object ...so ensuring it was an array was the prob. We did test it as a fix, but I will close bc the validation schema is def better.

@fbwoolf fbwoolf closed this May 7, 2024
@kyranjamie
Copy link
Collaborator

gotcha, missed the ensure array

@fbwoolf fbwoolf deleted the fix/src-20-asset-list branch July 12, 2024 16:31
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.

3 participants