Skip to content

Conversation

codingpeanut157
Copy link
Contributor

@codingpeanut157 codingpeanut157 commented Jun 9, 2025

User description

📝 Description

change treasury-service endpoints according to changes in wildcat
PR: #218


PR Type

enhancement


Description

  • Updated BALANCES endpoint to /v1/admin/treasury/balance

  • Aligned endpoint with recent changes in Wildcat service


Changes walkthrough 📝

Relevant files
Enhancement
endpoints.ts
Update BALANCES endpoint path for treasury-service             

src/constants/endpoints.ts

  • Changed BALANCES endpoint to /v1/admin/treasury/balance
  • Ensured endpoint consistency with backend updates
  • +1/-1     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • Copy link

    qodo-merge-pro bot commented Jun 9, 2025

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    Copy link

    qodo-merge-pro bot commented Jun 9, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    Copy link

    codecov bot commented Jun 9, 2025

    Codecov Report

    Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

    Files with missing lines Patch % Lines
    src/generated/client/sdk.gen.ts 0.00% 3 Missing ⚠️
    src/lib/api.ts 0.00% 1 Missing ⚠️

    📢 Thoughts on this report? Let us know!

    @stefanbitcr
    Copy link
    Contributor

    Constants end points doesn't do much if I recall correctly

    @stefanbitcr
    Copy link
    Contributor

    stefanbitcr commented Jun 9, 2025

    Most of the working ones are in generated/client/sdk.gen.ts

    Might be better to delete these constants in a future PR as they are misleading

    @codingpeanut157
    Copy link
    Contributor Author

    codingpeanut157 commented Jun 9, 2025

    Most of the working ones are in generated/client/sdk.gen.ts

    Might be better to delete these constants in a future PR as they are misleading

    I am trying to
    But it seems the BALANCES in a function that ends up being used in the EarningPage.tsx. I am referring to fetchBalances function

    @stefanbitcr
    Copy link
    Contributor

    stefanbitcr commented Jun 9, 2025

    Most of the working ones are in generated/client/sdk.gen.ts
    Might be better to delete these constants in a future PR as they are misleading

    I am trying to But it seems the BALANCES in a function that ends up being used in the EarningPage.tsx. I am referring to fetchBalances function

    The earnings page also needs to be uncommented from main and the side bar its not currently used. We can remove the fetchBalances. The actual balances we use are in the balances page and for historical ones we can probably do something in a similar vein (speaking as a non-frontend dev), I'm not sure if fetchBalances was functional before.

    Copy link

    cloudflare-workers-and-pages bot commented Jun 11, 2025

    Deploying wildcat-dashboard with  Cloudflare Pages  Cloudflare Pages

    Latest commit: 2a4340d
    Status: ✅  Deploy successful!
    Preview URL: https://383f4f7c.wildcat-dashboard.pages.dev
    Branch Preview URL: https://peanut-endpoints-1.wildcat-dashboard.pages.dev

    View logs

    Copy link

    qodo-merge-pro bot commented Jun 11, 2025

    CI Feedback 🧐

    (Feedback updated until commit 0f7978b)

    A test triggered by this PR failed. Here is an AI-generated analysis of the failure:

    Action: test (v22.11.0)

    Failed stage: Lint [❌]

    Failure summary:

    The action failed due to ESLint errors in the codebase:
    src/pages/balances/CashFlowPage.tsx line
    7: useSuspenseQuery is imported but never used
    src/pages/balances/CashFlowPage.tsx line 8:
    useLocalStorage is imported but never used
    src/pages/balances/EarningsPage.tsx line 5: useSuspenseQuery is imported but never used

    src/pages/balances/EarningsPage.tsx line 6: useLocalStorage is imported but never used
    ESLint found
    4 errors and 1 warning, causing the lint check to fail with exit code 1.

    Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    154:  11 low severity vulnerabilities
    155:  To address issues that do not require attention, run:
    156:  npm audit fix
    157:  To address all issues (including breaking changes), run:
    158:  npm audit fix --force
    159:  Run `npm audit` for details.
    160:  ##[group]Run npm run lint
    161:  �[36;1mnpm run lint�[0m
    162:  shell: /usr/bin/bash -e {0}
    163:  ##[endgroup]
    164:  > [email protected] lint
    165:  > eslint .
    166:  /home/runner/work/wildcat-dashboard-ui/wildcat-dashboard-ui/src/main.tsx
    167:  ##[warning]  25:10  warning  Fast refresh only works when a file has exports. Move your component(s) to a separate file  react-refresh/only-export-components
    168:  /home/runner/work/wildcat-dashboard-ui/wildcat-dashboard-ui/src/pages/balances/CashFlowPage.tsx
    169:  ##[error]  7:10  error  'useSuspenseQuery' is defined but never used  @typescript-eslint/no-unused-vars
    170:  ##[error]  8:8   error  'useLocalStorage' is defined but never used   @typescript-eslint/no-unused-vars
    171:  /home/runner/work/wildcat-dashboard-ui/wildcat-dashboard-ui/src/pages/balances/EarningsPage.tsx
    172:  ##[error]  5:10  error  'useSuspenseQuery' is defined but never used  @typescript-eslint/no-unused-vars
    173:  ##[error]  6:8   error  'useLocalStorage' is defined but never used   @typescript-eslint/no-unused-vars
    174:  ✖ 5 problems (4 errors, 1 warning)
    175:  ##[error]Process completed with exit code 1.
    176:  Post job cleanup.
    

    @codingpeanut157 codingpeanut157 merged commit 6bd929b into master Jun 11, 2025
    5 of 6 checks passed
    @stefanbitcr
    Copy link
    Contributor

    Looks good 👍

    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.

    3 participants