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

Link Gatewayd to UI via API #2323

Closed
wants to merge 8 commits into from
Closed

Conversation

okjodom
Copy link
Contributor

@okjodom okjodom commented Apr 25, 2023

Connect Gateway UI to a gatewayd instance.
Assumes a gatewayd REST api which is the current reality, but we should switch to a JSON RPC API as proposed by #2293

Closes fedimint/ui#20

@okjodom okjodom changed the title Connect Gateway API Link Gatewayd to UI via API Apr 25, 2023
@okjodom
Copy link
Contributor Author

okjodom commented Apr 25, 2023

@IgboPharaoh you might be interested in this specific work item

@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -1.26 ⚠️

Comparison is base (b0778fd) 59.94% compared to head (4e4a49e) 58.69%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    fedimint/fedimint#2323       /-   ##
==========================================
- Coverage   59.94%   58.69%   -1.26%     
==========================================
  Files         154      159        5     
  Lines       32263    34128     1865     
==========================================
  Hits        19341    20031      690     
- Misses      12922    14097     1175     
Impacted Files Coverage Δ
gateway/ln-gateway/src/rpc/mod.rs 77.92% <ø> (-2.60%) ⬇️
gateway/ln-gateway/src/rpc/rpc_client.rs 74.46% <100.00%> (ø)

... and 69 files with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@justinmoon
Copy link
Contributor

How to test it?

@okjodom
Copy link
Contributor Author

okjodom commented May 4, 2023

How to test it?

  1. Run tmuxinator with just tmuxinator
  2. In a nix develop .#fedimint-ui shell, yarn start to run the gateway ui with the following environment variables:
  • REACT_APP_FM_GATEWAY_API_PASSWORD
  • REACT_APP_FM_GATEWAY_API_ADDR

Here is a pre-filled yarn start with a test password to one of the gateways we spin up in tmuxinator

REACT_APP_FM_GATEWAY_API_PASSWORD="theresnosecondbest" REACT_APP_FM_GATEWAY_API_ADDR="http://127.0.0.1:8175" yarn start

You should see a live gateway UI connected to gatewayd. Test the functionality, and take note of bugs

@IgboPharaoh
Copy link

Hello @okjodom I'll like to pick up this issue and work on it. I'm currently looking at the current implementation of the API spec you made in the commits


// RealMintgate makes API calls to a given Mintgate API
export class RealMintgate implements Mintgate {
private readonly password: string;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@IgboPharaoh , debug this line

@okjodom okjodom closed this May 26, 2023
@okjodom okjodom deleted the connect-gw-api branch June 9, 2023 20:33
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.

Gateway UI: Gatewayd API Integration
3 participants