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: Send and receive on-chain funds #1857

Merged
merged 3 commits into from
Jan 20, 2024
Merged

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Jan 20, 2024

send-and-receive-onchain

@holzeis holzeis requested review from bonomat and luckysori January 20, 2024 11:34
@holzeis holzeis self-assigned this Jan 20, 2024
@holzeis holzeis force-pushed the feat/send-and-receive-on-chain branch from 603f382 to ff429ce Compare January 20, 2024 11:37
Comment on lines +46 to +71
.unwrap_or(Balance {
on_chain: 0,
off_chain: 0,
});
Copy link
Contributor

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.

Copy link
Contributor Author

@holzeis holzeis Jan 20, 2024

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.

webapp/src/main.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@bonomat bonomat 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. A few minor nits.

Comment on lines 75 to 80
AmountInputField(
value: amount != null ? amount! : Amount.zero(),
label: "Amount in sats",
controller: _amountController,
validator: (value) {
return null;
Copy link
Contributor

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

Base automatically changed from chore/start-backend to main January 20, 2024 12:53
@holzeis holzeis force-pushed the feat/send-and-receive-on-chain branch from ff429ce to 5332482 Compare January 20, 2024 17:40
@holzeis holzeis force-pushed the feat/send-and-receive-on-chain branch from 5332482 to 8c9e24a Compare January 20, 2024 17:41
@holzeis holzeis enabled auto-merge January 20, 2024 17:41
@holzeis holzeis added this pull request to the merge queue Jan 20, 2024
Merged via the queue into main with commit fdef687 Jan 20, 2024
9 checks passed
@holzeis holzeis deleted the feat/send-and-receive-on-chain branch January 20, 2024 18:06
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.

2 participants