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 authored May 16, 2024
1 parent 660b842 commit b21535e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/routes/receive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,10 @@ 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,]
match harbor.receive_method {
ReceiveMethod::Lightning => column![header, method_choice, amount_input, generate_button],
ReceiveMethod::OnChain => column![header, method_choice, generate_address_button],
};
column
};

container(scrollable(
Expand Down

0 comments on commit b21535e

Please sign in to comment.