ADD: Show alert if amount is less or equal 500 sats

This commit is contained in:
marcosrdz 2021-01-11 16:38:25 -05:00
parent e7f4fbc30b
commit 65c5df0f34
2 changed files with 4 additions and 0 deletions

View File

@ -177,6 +177,7 @@
"details_adv_full_sure": "Are you sure you want to use your wallet's full balance for this transaction?",
"details_adv_import": "Import Transaction",
"details_amount_field_is_not_valid": "Amount field is not valid",
"details_amount_field_is_less_than_minimum_amount_sat": "The specified amount is too small. Please enter an amount greater than 500 sats.",
"details_create": "Create Invoice",
"details_error_decode": "Error: Unable to decode Bitcoin address",
"details_fee_field_is_not_valid": "Fee field is not valid",

View File

@ -434,6 +434,9 @@ export default class SendDetails extends Component {
if (!transaction.amount || transaction.amount < 0 || parseFloat(transaction.amount) === 0) {
error = loc.send.details_amount_field_is_not_valid;
console.log('validation error');
} else if (parseFloat(transaction.amount) <= 500) {
error = loc.send.details_amount_field_is_less_than_minimum_amount_sat;
console.log('validation error');
} else if (!requestedSatPerByte || parseFloat(requestedSatPerByte) < 1) {
error = loc.send.details_fee_field_is_not_valid;
console.log('validation error');