-
Notifications
You must be signed in to change notification settings - Fork 23
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: Send and receive on-chain funds #1857
Conversation
holzeis
commented
Jan 20, 2024
•
edited
Loading
edited
603f382
to
ff429ce
Compare
.unwrap_or(Balance { | ||
on_chain: 0, | ||
off_chain: 0, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably return an error to the caller instead of setting it to 0 here. Could be quite scary if the balance shows suddenly 0.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we do that when we consider implementing polling or push. Otherwise, the user would simply get an error only because his request came in earlier than the wallet info event has been published.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A few minor nits.
AmountInputField( | ||
value: amount != null ? amount! : Amount.zero(), | ||
label: "Amount in sats", | ||
controller: _amountController, | ||
validator: (value) { | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When merged I'll see to make this look the same as the other input fields
ff429ce
to
5332482
Compare
5332482
to
8c9e24a
Compare