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(frontend): manage incoming auth tokens #2935

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

furkan-bilgin
Copy link

@furkan-bilgin furkan-bilgin commented Sep 2, 2024

Changes proposed in this pull request

  • Add incoming tokens to getPeer: this is needed to display, edit and remove incoming tokens in Rafiki Admin, whilst previously, they could only be added.
  • Add EditableTable to edit incoming tokens: I believe it is more understandable to edit data in tables - rather than dropdowns.

Context

fixes #2765

Checklist

  • Related issues linked using fixes #number
  • Tests added/updated
  • Documentation added
  • Make sure that all checks pass
  • Bruno collection updated

@github-actions github-actions bot added type: tests Testing related pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. type: source Changes business logic pkg: mock-ase pkg: mock-account-service-lib labels Sep 2, 2024
Copy link

netlify bot commented Sep 2, 2024

Deploy Preview for brilliant-pasca-3e80ec canceled.

Name Link
🔨 Latest commit bb3293e
🔍 Latest deploy log https://app.netlify.com/sites/brilliant-pasca-3e80ec/deploys/66eaef5daabe7c00089377c7

Copy link
Contributor

@mkurapov mkurapov left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! A few first comments

packages/frontend/app/components/ui/EditableTable.tsx Outdated Show resolved Hide resolved
packages/backend/src/graphql/schema.graphql Outdated Show resolved Hide resolved
@furkan-bilgin furkan-bilgin force-pushed the main branch 2 times, most recently from 62ece89 to 0a1bdbf Compare September 18, 2024 15:04
Copy link
Contributor

@mkurapov mkurapov left a comment

Choose a reason for hiding this comment

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

Can we also handle the case when overflowing?
Screenshot 2024-10-31 at 15 52 17

Also, I will tag this as hacktoberfest! See more here

@@ -122,6 +122,9 @@ export const peerToGraphql = (peer: Peer): SchemaPeer => ({
id: peer.id,
maxPacketAmount: peer.maxPacketAmount,
http: peer.http,
incomingTokens: peer.incomingTokens?.map(
Copy link
Contributor

Choose a reason for hiding this comment

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

I think incomingTokens would probably benefit from a separate resolver kind of like liquidity is done. Check packages/backend/src/graphql/resolvers/index.ts. This will require a new function in the HttpTokenService instead of doing .withGraphFetched('incomingTokens') in the getter in peer service.

@mkurapov
Copy link
Contributor

Hi @furkan-bilgin for the last comment, is it something you'd like to do or should I get someone from the team to make the change?

@mkurapov mkurapov linked an issue Dec 9, 2024 that may be closed by this pull request
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted pkg: backend Changes in the backend package. pkg: frontend Changes in the frontend package. pkg: mock-account-service-lib pkg: mock-ase type: source Changes business logic type: tests Testing related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants