|
|
|
@ -181,15 +181,8 @@ class SendViewController: UIViewController { |
|
|
|
|
let input = targetAddressTextField.value.trimmed |
|
|
|
|
targetAddressTextField.errorState = .none |
|
|
|
|
amountTextField.errorState = .none |
|
|
|
|
let checkIfGreaterThanZero: Bool |
|
|
|
|
switch transactionType { |
|
|
|
|
case .nativeCryptocurrency, .dapp, .tokenScript, .claimPaidErc875MagicLink: |
|
|
|
|
checkIfGreaterThanZero = false |
|
|
|
|
case .erc20Token, .erc875Token, .erc875TokenOrder, .erc721Token, .erc721ForTicketToken, .erc1155Token: |
|
|
|
|
checkIfGreaterThanZero = true |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
guard let value = viewModel.validatedAmount(value: amountTextField.ethCost, checkIfGreaterThanZero: checkIfGreaterThanZero) else { |
|
|
|
|
guard let value = viewModel.validatedAmount(value: amountTextField.ethCost, checkIfGreaterThanZero: viewModel.checkIfGreaterThanZero) else { |
|
|
|
|
amountTextField.errorState = .error |
|
|
|
|
return |
|
|
|
|
} |
|
|
|
|