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

fix: various faucet fixes for next #362

Merged
merged 13 commits into from
May 21, 2024
Merged

fix: various faucet fixes for next #362

merged 13 commits into from
May 21, 2024

Conversation

tomyrd
Copy link
Collaborator

@tomyrd tomyrd commented May 17, 2024

This PR fixes a few things related to the faucet:

  • Brings some faucet fixes from main to next.
  • Fixes the docker local node.
  • Fixes a problem with the config file path that made running the node somewhat awkward.
  • Adds a loading spinner to the UI (change requested in this comment).
  • It adds some instructions on how to run the faucet.

Here is a video showing the new spinner:

loading_spinner.mov

@tomyrd tomyrd marked this pull request as ready for review May 17, 2024 16:32
@igamigo igamigo requested review from phklive and bobbinth May 17, 2024 17:53
Copy link
Collaborator

@igamigo igamigo left a comment

Choose a reason for hiding this comment

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

LGTM! I think it would be good if we could add two changes:

  • If the spinner is active, make sure the buttons are deactivated/don't do anything when clicked in order to avoid people spamming requests.
  • Judging by the video it looks like the spinner moves the page layout a bit which is probably not ideal.

bin/faucet/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@mFragaBA mFragaBA left a comment

Choose a reason for hiding this comment

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

I noticed the docker is using rust 1.76, could that be?

image

Should we bump it up to 1.78?

Copy link
Contributor

@mFragaBA mFragaBA left a comment

Choose a reason for hiding this comment

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

I left some small comments. I'm waiting for the docker image to build so I can test it 😅

utils::{build_client, FaucetState},
};

const TOKEN_AMOUNT_OPTIONS: [u64; 3] = [100, 500, 1000];
Copy link
Contributor

Choose a reason for hiding this comment

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

wasn't this already part of the config? I can still see it in miden-faucet.toml

@@ -23,14 +29,14 @@ struct FaucetRequest {
#[derive(Serialize)]
struct FaucetMetadataReponse {
id: String,
asset_amount_options: Vec<u64>,
asset_amount_options: [u64; 3],
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need the change to a fixed size array?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This was one of the changes I left on my PR to main, but I think @tomyrd is going to roll it back into using the configuration field.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

@phklive phklive left a comment

Choose a reason for hiding this comment

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

Tested and LGTM.

Only thing I could say is that I believe that you should run cargo update and commit before merging because we are now also tracking the cargo.lock file.

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@bobbinth bobbinth merged commit bca2ed4 into next May 21, 2024
5 checks passed
@bobbinth bobbinth deleted the tomyrd-fix-next-faucet branch May 21, 2024 20:07
bobbinth pushed a commit that referenced this pull request Jun 10, 2024
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.

5 participants