Restart new spending process on user demand
This commit is contained in:
parent
ed363963b3
commit
2d2cd12bda
@ -177,6 +177,17 @@ impl App {
|
||||
self.cache.network,
|
||||
);
|
||||
}
|
||||
menu::Menu::CreateSpendTx => {
|
||||
// redo the process of spending only if user want to start a new one.
|
||||
if !self.panels.create_spend.is_first_step() {
|
||||
self.panels.create_spend = CreateSpendPanel::new(
|
||||
self.wallet.clone(),
|
||||
&self.cache.coins,
|
||||
self.cache.blockheight as u32,
|
||||
self.cache.network,
|
||||
);
|
||||
}
|
||||
}
|
||||
_ => {}
|
||||
};
|
||||
self.panels.current = menu;
|
||||
|
||||
@ -63,6 +63,10 @@ impl CreateSpendPanel {
|
||||
],
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_first_step(&self) -> bool {
|
||||
self.current == 0
|
||||
}
|
||||
}
|
||||
|
||||
impl State for CreateSpendPanel {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user