Skip to content

Commit

Permalink
use match statement
Browse files Browse the repository at this point in the history
Co-authored-by: benthecarman <[email protected]>
  • Loading branch information
futurepaul and benthecarman committed May 16, 2024
1 parent 660b842 commit d743053
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/routes/receive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ pub fn receive(harbor: &HarborWallet) -> Element<Message> {
let generate_address_button = h_button("Generate Address", SvgIcon::Qr, generating)
.on_press(Message::GenerateAddress);

let column = if harbor.receive_method == ReceiveMethod::Lightning {
column![header, method_choice, amount_input, generate_button,]
} else {
column![header, method_choice, generate_address_button,]
};
column
match harbor.receive_method {
ReceiveMethod::Lightning => {
column![header, method_choice, amount_input, generate_button]
}
ReceiveMethod::OnChain => column![header, method_choice, generate_address_button],
}
};

container(scrollable(
Expand Down

0 comments on commit d743053

Please sign in to comment.