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

feat(jellyfish-api-core): Add index based pagination support to listaccounthistory RPC #1923

Merged
merged 17 commits into from
Jan 19, 2023

Conversation

helloscoopa
Copy link
Contributor

@helloscoopa helloscoopa commented Dec 12, 2022

What this PR does / why we need it:

Requirement: Upcoming consortium transaction history page on defiscan.live requires a way to paginate the list of transactions among consortium members.

Issue: Currently we only have blockHeight and depth based pagination/cursor which we're unable to use to address the requirement as it only cursor through blocks but not transactions., More info here.

Solution:

  • Add index based pagination support.
  • Add multi transaction types filter support.
  • Add multi address filter support.

Huge thanks to @shohamc1 for supporting me on defich/ain side, refer defich/ain PR

@codeclimate
Copy link

codeclimate bot commented Dec 12, 2022

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

View more on Code Climate.

@netlify
Copy link

netlify bot commented Dec 12, 2022

Deploy Preview for jellyfishsdk ready!

Name Link
🔨 Latest commit eddd153
🔍 Latest deploy log https://app.netlify.com/sites/jellyfishsdk/deploys/63c8f65640bd330008975c46
😎 Deploy Preview https://deploy-preview-1923--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 Dec 12, 2022

Codecov Report

Base: 91.33% // Head: 92.98% // Increases project coverage by +1.65% 🎉

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1923      +/-   ##
==========================================
+ Coverage   91.33%   92.98%   +1.65%     
==========================================
  Files         363      363              
  Lines       10764    10765       +1     
  Branches     1370     1370              
==========================================
+ Hits         9831    10010     +179     
+ Misses        896      727     -169     
+ Partials       37       28       -9     
Impacted Files Coverage Δ
...ackages/jellyfish-api-core/src/category/account.ts 100.00% <100.00%> (+2.38%) ⬆️
apps/whale-api/src/module.api/stats.controller.ts 29.00% <0.00%> (-67.94%) ⬇️
...h-transaction-builder/src/txn/txn_builder_token.ts 60.00% <0.00%> (-40.00%) ⬇️
packages/whale-api-client/src/api/stats.ts 80.00% <0.00%> (-20.00%) ⬇️
...transaction-builder/src/txn/txn_builder_oracles.ts 87.50% <0.00%> (-12.50%) ⬇️
packages/jellyfish-crypto/src/der.ts 92.59% <0.00%> (-3.71%) ⬇️
...ellyfish-transaction-signature/src/tx_signature.ts 90.90% <0.00%> (-3.41%) ⬇️
apps/whale-api/src/module.api/rawtx.controller.ts 71.64% <0.00%> (-2.99%) ⬇️
apps/whale-api/src/module.api/poolpair.service.ts 81.25% <0.00%> (-0.40%) ⬇️
...h-transaction-builder/src/txn/txn_builder_vault.ts 88.23% <0.00%> (ø)
... and 49 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 Dec 12, 2022

Docker build preview for jellyfish/apps is ready!

Built with commit 4f7ad70

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

You can also get an immutable image with the commit hash

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

@helloscoopa helloscoopa marked this pull request as ready for review December 22, 2022 15:32
@helloscoopa helloscoopa changed the base branch from main to dilshan/add-more-filter-options-to-accounthistorycount December 23, 2022 08:40
@helloscoopa helloscoopa changed the base branch from dilshan/add-more-filter-options-to-accounthistorycount to main December 23, 2022 08:43
…ountHistory.test.ts

Co-authored-by: Isaac Yong <[email protected]>
Signed-off-by: Dilshan Madushanka <[email protected]>
infinia-yzl
infinia-yzl previously approved these changes Jan 4, 2023
marktanrj
marktanrj previously approved these changes Jan 4, 2023
imkven
imkven previously approved these changes Jan 6, 2023
Copy link
Contributor

@imkven imkven left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@fuxingloh fuxingloh merged commit 3d0e633 into main Jan 19, 2023
@fuxingloh fuxingloh deleted the dilshan/listaccounthistory-pagination branch January 19, 2023 08:37
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.

6 participants