diff --git a/src/main.rs b/src/main.rs index 0c626e3..94ada4e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -94,8 +94,6 @@ pub enum Message { Donate, // Core messages we get from core CoreMessage(CoreUIMsg), - // Fake stuff for testing - FakeAddTransaction, } // This is the UI state. It should only contain data that is directly rendered by the UI @@ -338,15 +336,6 @@ impl HarborWallet { println!("Copying to clipboard: {s}"); clipboard::write(s) } - Message::FakeAddTransaction => { - if self.transaction_history.len() % 2 == 0 { - self.transaction_history - .push(TransactionItem::make_dummy_onchain()); - } else { - self.transaction_history.push(TransactionItem::make_dummy()); - } - Command::none() - } // Handle any messages we get from core Message::CoreMessage(msg) => match msg { CoreUIMsg::Sending => { diff --git a/src/routes/history.rs b/src/routes/history.rs index 6cf6fe7..a5975ce 100644 --- a/src/routes/history.rs +++ b/src/routes/history.rs @@ -2,15 +2,12 @@ use iced::widget::{column, container, scrollable}; use iced::Element; use iced::{Length, Padding}; -use crate::components::{h_button, h_header, h_transaction_item, SvgIcon}; +use crate::components::{h_header, h_transaction_item}; use crate::{HarborWallet, Message}; pub fn history(harbor: &HarborWallet) -> Element { let header = h_header("History", "Here's what's happened so far."); - let fake_button = - h_button("Add Transaction", SvgIcon::Squirrel, false).on_press(Message::FakeAddTransaction); - let transactions = harbor .transaction_history .iter() @@ -18,7 +15,7 @@ pub fn history(harbor: &HarborWallet) -> Element { column.push(h_transaction_item(item)) }); - let column = column![header, fake_button, transactions].spacing(48); + let column = column![header, transactions].spacing(48); container(scrollable( column