Skip to content

Commit

Permalink
cli: save wallet data when modified
Browse files Browse the repository at this point in the history
Closes #173
  • Loading branch information
dr-orlovsky committed Apr 19, 2024
1 parent f9813b7 commit 7aa7361
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,8 @@ impl Exec for RgbArgs {
.set_amount_raw(*value)
.finish();
println!("{invoice}");
Some(runtime.into_stock())
runtime.store();
None
}
Command::Prepare {
v2,
Expand Down Expand Up @@ -719,7 +720,8 @@ impl Exec for RgbArgs {
PsbtVer::V2 => println!("{psbt:#}"),
},
}
Some(runtime.into_stock())
runtime.store();
None
}
Command::Consign {
invoice,
Expand All @@ -735,7 +737,8 @@ impl Exec for RgbArgs {
let mut psbt_file = File::create(psbt_name)?;
psbt.encode(psbt.version, &mut psbt_file)?;
transfer.save_file(out_file)?;
Some(runtime.into_stock())
runtime.store();
None
}
Command::Transfer {
v2,
Expand Down Expand Up @@ -767,7 +770,8 @@ impl Exec for RgbArgs {
PsbtVer::V2 => println!("{psbt:#}"),
},
}
Some(runtime.into_stock())
runtime.store();
None
}
Command::Inspect { file, dir, path } => {
#[derive(Clone, Debug)]
Expand Down

0 comments on commit 7aa7361

Please sign in to comment.