mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-07-14 17:10:34 +03:00
fixes
This commit is contained in:
parent
98a1314280
commit
f82294b49a
@ -407,7 +407,7 @@ create_messages!(
|
||||
|
||||
@backtraced
|
||||
insufficient_balance {
|
||||
args: (balance: impl Display, fee: impl Display),
|
||||
args: (address: impl Display, balance: impl Display, fee: impl Display),
|
||||
msg: format!("❌ Your public balance of {balance} for {address} is insufficient to pay the base fee of {fee}"),
|
||||
help: None,
|
||||
}
|
||||
|
@ -50,14 +50,14 @@ create_messages!(
|
||||
@formatted
|
||||
snarkvm_parsing_error {
|
||||
args: (),
|
||||
msg: format!("SnarkVM failure to parse `.aleo` program"),
|
||||
msg: "SnarkVM failure to parse `.aleo` program".to_string(),
|
||||
help: None,
|
||||
}
|
||||
|
||||
@formatted
|
||||
circular_dependency_error {
|
||||
args: (),
|
||||
msg: format!("Circular dependency detected"),
|
||||
msg: "Circular dependency detected".to_string(),
|
||||
help: None,
|
||||
}
|
||||
|
||||
@ -65,7 +65,7 @@ create_messages!(
|
||||
network_error {
|
||||
args: (url: impl Display, status: impl Display),
|
||||
msg: format!("Failed network request to {url}. Status: {status}"),
|
||||
help: Some("Make sure that you are using the correct `--network` and `--endpoint` options.".to_string())
|
||||
help: Some("Make sure that you are using the correct `--network` and `--endpoint` options.".to_string()),
|
||||
}
|
||||
|
||||
@formatted
|
||||
|
@ -208,7 +208,7 @@ impl Default for BuildOptions {
|
||||
|
||||
/// On Chain Execution Options to set preferences for keys, fees and networks.
|
||||
/// Used by Execute and Deploy commands.
|
||||
#[derive(Parser, Clone, Debug)]
|
||||
#[derive(Parser, Clone, Debug, Default)]
|
||||
pub struct FeeOptions {
|
||||
#[clap(short, long, help = "Performs a dry-run of transaction generation")]
|
||||
pub(crate) dry_run: bool,
|
||||
@ -265,7 +265,7 @@ fn check_balance<N: Network>(
|
||||
public_balance.truncate(public_balance.len() - 3);
|
||||
// Compare balance.
|
||||
if public_balance.parse::<u64>().unwrap() < total_cost {
|
||||
Err(PackageError::insufficient_balance(public_balance, total_cost).into())
|
||||
Err(PackageError::insufficient_balance(address, public_balance, total_cost).into())
|
||||
} else {
|
||||
Ok(())
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ pub struct Context {
|
||||
/// Path to use for the Aleo registry, None when default
|
||||
pub home: Option<PathBuf>,
|
||||
/// Recursive flag.
|
||||
// TODO: Shift from callee to caller by including display method
|
||||
pub recursive: bool,
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user