diff --git a/VergeiOS/Components/UI/Inputs/CurrencyInput.swift b/VergeiOS/Components/UI/Inputs/CurrencyInput.swift index 4c12c2a2..7018dacc 100644 --- a/VergeiOS/Components/UI/Inputs/CurrencyInput.swift +++ b/VergeiOS/Components/UI/Inputs/CurrencyInput.swift @@ -32,7 +32,11 @@ class CurrencyInput: UITextField { @objc public func editingDidEnd(_ textField: UITextField) { if getNumber().doubleValue == 0.0 { textField.text = "" + return } + + // Final Format. + setAmount(getNumber()) } public func getNumber() -> NSNumber { diff --git a/VergeiOS/Views/Receive/ReceiveViewController.swift b/VergeiOS/Views/Receive/ReceiveViewController.swift index 20640dae..a9bded51 100644 --- a/VergeiOS/Views/Receive/ReceiveViewController.swift +++ b/VergeiOS/Views/Receive/ReceiveViewController.swift @@ -53,7 +53,7 @@ class ReceiveViewController: UIViewController { addTapRecognizer(target: addressTextField, action: #selector(copyAddress(recognizer:))) addTapRecognizer(target: xvgCardImageView, action: #selector(copyAddress(recognizer:))) - amountTextField.addTarget(self, action: #selector(amountTextFieldDidChange), for: .editingChanged) + amountTextField.addTarget(self, action: #selector(amountTextFieldDidChange), for: .editingDidEnd) } override func viewWillAppear(_ animated: Bool) {