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

add ui component for minting txn #6

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

eolesinski
Copy link
Contributor

@eolesinski eolesinski commented Aug 30, 2024

This PR adds a UI component (an Admin page) to facilitate initiating new minting transactions. This is the first part of connecting the wallet UI to opencbdc-tx as detailed in #2.

Default page:

mint-default

Input validation checks:

mint-fail mint-success

Copy link

@maurermi maurermi left a comment

Choose a reason for hiding this comment

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

T-ACK. Great looking admin page! Eventually we may wish to verify format of public keys beyond length requirements as well

<b-form-label for="amount-input">Number of UTXOs to Mint</b-form-label>
</div>

<!-- form input area for specifying the amount of utxos to mint -->

Choose a reason for hiding this comment

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

nit: Ideally, the arrows provided here cannot even generate a negative number

Copy link
Collaborator

Choose a reason for hiding this comment

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

The regexp in numberFormatValidator below seems to require the string start with a digit. (Non-negative) should also check that this isn't a bug server side though as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

amountFormatValidator requires > 0 as well.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Not an issue for this PR but I'm a little worried that we are allowing unauthenticated posts to the mintTx endpoint - should probably rearchitect things at some point.

Copy link
Contributor

Choose a reason for hiding this comment

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

opened #10 to capture this.

@eolesinski
Copy link
Contributor Author

also, open to feedback from @anders94 as well!

@anders94
Copy link
Collaborator

LGTM

@anders94
Copy link
Collaborator

As noted in a code level comment, at some point we should propose at least a minimal authentication system so these endpoints aren't just reachable by anyone. Should also do the same with a minimal key service that does something better than hardcode minting keys into the server. The risk we run into here is a less than observant user might assume this level of security is suggested by us which it very much is not!

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.

4 participants