refactor: add message for next receive address
The Next message will be used for getting the next page of unused addresses.
This commit is contained in:
parent
8b8b48142f
commit
daa3daa938
@ -156,7 +156,7 @@ impl State for ReceivePanel {
|
||||
));
|
||||
Task::none()
|
||||
}
|
||||
Message::View(view::Message::Next) => {
|
||||
Message::View(view::Message::NextReceiveAddress) => {
|
||||
let daemon = daemon.clone();
|
||||
Task::perform(
|
||||
async move {
|
||||
@ -364,7 +364,11 @@ mod tests {
|
||||
let cache = Cache::default();
|
||||
let sandbox = sandbox.load(client.clone(), &cache, wallet).await;
|
||||
let sandbox = sandbox
|
||||
.update(client, &cache, Message::View(viewMessage::Next))
|
||||
.update(
|
||||
client,
|
||||
&cache,
|
||||
Message::View(viewMessage::NextReceiveAddress),
|
||||
)
|
||||
.await;
|
||||
|
||||
let panel = sandbox.state();
|
||||
|
||||
@ -14,6 +14,7 @@ pub enum Message {
|
||||
Select(usize),
|
||||
SelectPayment(OutPoint),
|
||||
Label(Vec<String>, LabelMessage),
|
||||
NextReceiveAddress,
|
||||
Settings(SettingsMessage),
|
||||
CreateSpend(CreateSpendMessage),
|
||||
ImportSpend(ImportSpendMessage),
|
||||
|
||||
@ -45,7 +45,7 @@ pub fn receive<'a>(
|
||||
.push(Container::new(h3("Receive")).width(Length::Fill))
|
||||
.push(
|
||||
button::primary(Some(icon::plus_icon()), "Generate address")
|
||||
.on_press(Message::Next),
|
||||
.on_press(Message::NextReceiveAddress),
|
||||
),
|
||||
)
|
||||
.push(p1_bold("New and never used reception addresses"))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user