Skip to content

Commit

Permalink
cli: fix feature gates on WalletError
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jul 10, 2024
1 parent 66ebbc6 commit 0b98e6e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ log = { workspace = true, optional = true }

[features]
default = ["esplora_blocking"]
all = ["esplora_blocking", "electrum_blocking", "serde", "log", "fs"]
all = ["esplora_blocking", "electrum_blocking", "serde", "log", "fs", "cli"]
fs = ["serde", "bp-wallet/fs"]
cli = ["fs"]
esplora_blocking = ["bp-esplora"]
electrum_blocking = ["bp-electrum"]
serde = ["serde_crate", "serde_yaml", "bp-std/serde", "descriptors/serde", "rgb-psbt/serde"]
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ bp-wallet = { workspace = true, features = ["cli"] }
psbt = { workspace = true }
rgb-std = { workspace = true, features = ["serde"] }
rgb-interfaces = { workspace = true }
rgb-runtime = { version = "0.11.0-beta.6", path = "..", features = ["electrum_blocking", "esplora_blocking", "log", "serde", "fs"] }
rgb-runtime = { version = "0.11.0-beta.6", path = "..", features = ["electrum_blocking", "esplora_blocking", "log", "serde", "fs", "cli"] }
log = { workspace = true }
env_logger = "0.11.3"
clap = { version = "4.4.8", features = ["derive", "env"] }
Expand Down
5 changes: 2 additions & 3 deletions cli/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ use rgb::containers::{
BuilderSeal, ContainerVer, ContentId, ContentSigs, Contract, FileContent, Supplement, Terminal,
Transfer, UniversalFile,
};
use rgb::interface::{AmountChange, IfaceId};
use rgb::interface::{AmountChange, IfaceId, OutpointFilter};
use rgb::invoice::{Beneficiary, Pay2Vout, RgbInvoice, RgbInvoiceBuilder, XChainNet};
use rgb::persistence::StashReadProvider;
use rgb::schema::SchemaId;
use rgb::validation::Validity;
use rgb::vm::RgbIsa;
Expand All @@ -45,8 +46,6 @@ use rgb::{
RgbKeychain, RgbWallet, StateType, TransferParams, WalletError, WalletProvider, XChain,
XOutpoint, XOutputSeal,
};
use rgbstd::interface::OutpointFilter;
use rgbstd::persistence::StashReadProvider;
use serde_crate::{Deserialize, Serialize};
use strict_types::encoding::{FieldName, TypeName};
use strict_types::StrictVal;
Expand Down
15 changes: 9 additions & 6 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,15 @@ pub enum WalletError {
Deserialize(DeserializeError),

#[from]
Load(LoadError),
StockLoad(LoadError),

#[cfg(feature = "fs")]
#[from]
WalletLoad(bpwallet::fs::LoadError),

#[cfg(feature = "cli")]
#[from]
WalletExect(bpwallet::cli::ExecError),

#[from]
Builder(BuilderError),
Expand Down Expand Up @@ -82,11 +90,6 @@ pub enum WalletError {
#[display(doc_comments)]
IncompleteContract(validation::Status),

#[cfg(feature = "fs")]
#[from]
#[from(bpwallet::fs::LoadError)]
Bp(bpwallet::cli::ExecError),

/// resolver error: {0}
#[display(doc_comments)]
Resolver(String),
Expand Down

0 comments on commit 0b98e6e

Please sign in to comment.