[wallet] panic: 'attempt to subtract with overflow' when sending small quantities #396 (#603)

* Fund calculation inconsistent (#582)

* [wallet] panic: 'attempt to subtract with overflow' when sending small quantities (#396)
This commit is contained in:
Heung B Lee
2018-01-12 04:44:15 -08:00
committed by Yeastplume
parent 31f91dc487
commit 5edc63f617
4 changed files with 57 additions and 4 deletions
+8
View File
@@ -489,6 +489,14 @@ fn wallet_command(wallet_args: &ArgMatches, global_config: GlobalConfig) {
amount_to_hr_string(available),
);
}
Err(wallet::Error::FeeExceedsAmount {sender_amount, recipient_fee}) => {
error!(
LOGGER,
"Recipient rejected the transfer because transaction fee ({}) exceeded amount ({}).",
amount_to_hr_string(recipient_fee),
amount_to_hr_string(sender_amount)
);
}
Err(e) => {
error!(LOGGER, "Tx not sent: {:?}", e);
}