Skip to content

Commit

Permalink
cli: fix displaying fungible amount with history command
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Sep 20, 2024
1 parent e8c987f commit 954f7f2
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ use rgb::{
RgbDescr, RgbKeychain, RgbWallet, StateType, TransferParams, WalletError, WalletProvider,
XChain, XOutpoint, XWitnessId,
};
use rgbstd::interface::ContractIface;
use rgbstd::interface::{AllocatedState, ContractIface};
use rgbstd::persistence::{MemContractState, StockError};
use rgbstd::{KnownState, OutputAssignment};
use seals::SecretSeal;
Expand Down Expand Up @@ -379,7 +379,12 @@ impl Exec for RgbArgs {
witness,
} in history

Check warning on line 380 in cli/src/command.rs

View check run for this annotation

Codecov / codecov/patch

cli/src/command.rs#L374-L380

Added lines #L374 - L380 were not covered by tests
{
print!("{direction}\t{state}");
print!("{direction: <9}\t");
if let AllocatedState::Amount(amount) = state {
print!("{: >9}", amount.value());
} else {
print!("{state}");
}
if *details {
print!("\t{ty}");
}
Expand All @@ -392,7 +397,7 @@ impl Exec for RgbArgs {
);
if *details {
println!(
"{}",
"\t{}",
opids
.iter()
.map(OpId::to_string)
Expand Down

0 comments on commit 954f7f2

Please sign in to comment.