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(apps/whale-api): api error when getting all data using OCG listing endpoint but response is empty #2016

Merged
merged 5 commits into from
Feb 3, 2023

Conversation

kyleleow
Copy link
Contributor

@kyleleow kyleleow commented Jan 31, 2023

What this PR does / why we need it:

  • As titled, to allow nextProvider of ApiPagedResponse.of to be able to return undefined to enforce data and limit to be > 0 in ApiPagedResponse.of
  • This is to fix the error on whale side currently when downstream is requesting all results using listProposals() and listProposalVotes() but response is empty. This is because on the upstream (ain) is using size: 0 to return all results.
  • To add the previously skipped test cases

Which issue(s) does this PR fixes?:

Fixes #

Additional comments?:

@codeclimate
Copy link

codeclimate bot commented Jan 31, 2023

Code Climate has analyzed commit 76a8f6d and detected 0 issues on this pull request.

View more on Code Climate.

@netlify
Copy link

netlify bot commented Jan 31, 2023

Deploy Preview for jellyfishsdk ready!

Name Link
🔨 Latest commit 76a8f6d
🔍 Latest deploy log https://app.netlify.com/sites/jellyfishsdk/deploys/63db0e7471fd620008eef534
😎 Deploy Preview https://deploy-preview-2016--jellyfishsdk.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 87.90% // Head: 93.56% // Increases project coverage by +5.65% 🎉

Coverage data is based on head (76a8f6d) compared to base (c500b8a).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2016      +/-   ##
==========================================
+ Coverage   87.90%   93.56%   +5.65%     
==========================================
  Files         364      366       +2     
  Lines       10975    10990      +15     
  Branches     1433     1433              
==========================================
+ Hits         9648    10283     +635     
+ Misses       1275      682     -593     
+ Partials       52       25      -27     
Impacted Files Coverage Δ
...ale-api/src/module.api/_core/api.paged.response.ts 100.00% <100.00%> (ø)
packages/jellyfish-api-core/src/category/oracle.ts 80.00% <0.00%> (-20.00%) ⬇️
packages/jellyfish-wallet-classic/src/index.ts 100.00% <0.00%> (ø)
packages/jellyfish-wallet-classic/src/classic.ts 100.00% <0.00%> (ø)
...pps/whale-api/src/module.api/address.controller.ts 98.07% <0.00%> (+0.96%) ⬆️
packages/jellyfish-api-core/src/category/wallet.ts 100.00% <0.00%> (+2.24%) ⬆️
packages/whale-api-client/src/whale.api.client.ts 95.45% <0.00%> (+2.27%) ⬆️
...pps/whale-api/src/module.api/loan.vault.service.ts 90.17% <0.00%> (+2.67%) ⬆️
...-api/src/module.indexer/model/dftx/active.price.ts 83.56% <0.00%> (+2.73%) ⬆️
apps/whale-api/src/module.api/rpc.controller.ts 91.17% <0.00%> (+2.94%) ⬆️
... and 76 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Jan 31, 2023

Docker build preview for jellyfish/apps is ready!

Built with commit f42fd8c

  • ghcr.io/jellyfishsdk/legacy-api:pr-2016
  • ghcr.io/jellyfishsdk/playground-api:pr-2016
  • ghcr.io/jellyfishsdk/status-api:pr-2016
  • ghcr.io/jellyfishsdk/whale-api:pr-2016

You can also get an immutable image with the commit hash

  • ghcr.io/jellyfishsdk/legacy-api:f42fd8c7c0a0c5d0f87224b5832afd2e2cd4745e
  • ghcr.io/jellyfishsdk/playground-api:f42fd8c7c0a0c5d0f87224b5832afd2e2cd4745e
  • ghcr.io/jellyfishsdk/status-api:f42fd8c7c0a0c5d0f87224b5832afd2e2cd4745e
  • ghcr.io/jellyfishsdk/whale-api:f42fd8c7c0a0c5d0f87224b5832afd2e2cd4745e

@fuxingloh fuxingloh changed the title fix(whale-api): api error when empty list for all results fix(apps/whale-api): api error when empty list for all results Jan 31, 2023
@kyleleow kyleleow changed the title fix(apps/whale-api): api error when empty list for all results fix(apps/whale-api): api error when empty response for OCG listing endpoint Jan 31, 2023
@kyleleow kyleleow changed the title fix(apps/whale-api): api error when empty response for OCG listing endpoint fix(apps/whale-api): api error when getting all data using OCG listing endpoint but response is empty Jan 31, 2023
@kyleleow kyleleow marked this pull request as ready for review January 31, 2023 08:26
@fuxingloh fuxingloh merged commit d353e96 into main Feb 3, 2023
@fuxingloh fuxingloh deleted the kengye/fix-empty-list-all branch February 3, 2023 05:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants