This commit is contained in:
evan-schott 2024-06-10 15:48:50 -07:00
parent 98a1314280
commit f82294b49a
4 changed files with 7 additions and 6 deletions

View File

@ -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,
}

View File

@ -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

View File

@ -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(())
}

View File

@ -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,
}