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: paginate display cells #1496

Merged
merged 1 commit into from
Nov 13, 2023

Conversation

rabbitz
Copy link
Collaborator

@rabbitz rabbitz commented Nov 13, 2023

GET /api/v1/transactions/:id/display_outputs?page=2&page_size=2
GET /api/v1/transactions/:id/display_inputs?page=2&page_size=2

{
    "data": [
        {
            "id": "65853834",
            "capacity": "15000000000.0",
            "occupied_capacity": "11600000000",
            "address_hash": "ckt1qpexcgzey7lepv7per00j7fn8edqf78c9c2cu234mm595e6s6wx0zqgpe54puq0gw8dg9qxjks5ds7yn2f3vx6n7y7yf7m",
            "status": "dead",
            "consumed_tx_hash": "0xc788121705867de78ccb531e94a15cdd7ff3d5d3ccba68dff58c4c2fea8f33c7",
            "cell_type": "cota_regular",
            "cota_regular_info": {
                "symbol": "",
                "amount": "",
                "decimal": "",
                "type_hash": "0xca06bf3ca2a4eaa974d940211e90090610725e760b387c94c53270a701f7e5f4",
                "published": "true",
                "display_name": "",
                "uan": "",
                "code_hash": "0x89cd8003a0eaf8e65e0c31525b7d1d5c1becefd2ea75bb4cff87810ae37764d8"
            },
            "extra_info": {
                "symbol": "",
                "amount": "",
                "decimal": "",
                "type_hash": "0xca06bf3ca2a4eaa974d940211e90090610725e760b387c94c53270a701f7e5f4",
                "published": "true",
                "display_name": "",
                "uan": "",
                "code_hash": "0x89cd8003a0eaf8e65e0c31525b7d1d5c1becefd2ea75bb4cff87810ae37764d8"
            }
        },
        {
            "id": "65853835",
            "capacity": "15000000000.0",
            "occupied_capacity": "11600000000",
            "address_hash": "ckt1qpexcgzey7lepv7per00j7fn8edqf78c9c2cu234mm595e6s6wx0zqgpgukmr56guuy8f0ep4nt8l7uy9qa6fr7ma4p7k5",
            "status": "dead",
            "consumed_tx_hash": "0x213dd6db7cd56ffe206f8cf14ef0f2508b4f049020964a1167628f9d141e50ed",
            "cell_type": "cota_regular",
            "cota_regular_info": {
                "symbol": "",
                "amount": "",
                "decimal": "",
                "type_hash": "0xdac9d922475c7277193ae55028d501b6a7a531facfdcb51d50ddc5031ef8d731",
                "published": "true",
                "display_name": "",
                "uan": "",
                "code_hash": "0x89cd8003a0eaf8e65e0c31525b7d1d5c1becefd2ea75bb4cff87810ae37764d8"
            },
            "extra_info": {
                "symbol": "",
                "amount": "",
                "decimal": "",
                "type_hash": "0xdac9d922475c7277193ae55028d501b6a7a531facfdcb51d50ddc5031ef8d731",
                "published": "true",
                "display_name": "",
                "uan": "",
                "code_hash": "0x89cd8003a0eaf8e65e0c31525b7d1d5c1becefd2ea75bb4cff87810ae37764d8"
            }
        }
    ],
    "meta": {
        "total": 202,
        "page_size": 2
    }
}

@codecov-commenter
Copy link

Codecov Report

Attention: 187 lines in your changes are missing coverage. Please review.

Comparison is base (bb447e4) 66.37% compared to head (8868401) 67.09%.
Report is 138 commits behind head on develop.

❗ Current head 8868401 differs from pull request most recent head 4471c53. Consider uploading reports for the commit 4471c53 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1496      +/-   ##
===========================================
+ Coverage    66.37%   67.09%   +0.71%     
===========================================
  Files          275      283       +8     
  Lines         7397     7634     +237     
===========================================
+ Hits          4910     5122     +212     
- Misses        2487     2512      +25     
Files Coverage Δ
...trollers/api/v1/address_transactions_controller.rb 95.55% <100.00%> (-0.10%) ⬇️
app/controllers/api/v1/blocks_controller.rb 95.34% <ø> (-0.11%) ⬇️
...rollers/api/v1/contract_transactions_controller.rb 100.00% <100.00%> (ø)
.../controllers/api/v1/daily_statistics_controller.rb 100.00% <100.00%> (ø)
app/controllers/api/v1/monetary_data_controller.rb 100.00% <100.00%> (ø)
app/controllers/api/v1/udt_queries_controller.rb 100.00% <100.00%> (ø)
.../controllers/api/v1/udt_transactions_controller.rb 100.00% <100.00%> (ø)
...controllers/api/v1/udt_verifications_controller.rb 100.00% <100.00%> (ø)
app/controllers/api/v1/udts_controller.rb 100.00% <100.00%> (ø)
...trollers/api/v2/pending_transactions_controller.rb 100.00% <100.00%> (ø)
... and 41 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rabbitz rabbitz added this pull request to the merge queue Nov 13, 2023
Merged via the queue into nervosnetwork:develop with commit ce3c5fb Nov 13, 2023
1 check passed
@rabbitz rabbitz deleted the feat/paginate_display_cells branch November 13, 2023 02:58
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