- Fixed the error sending decimals in the send fragment

master
Javier Varona 2018-09-19 21:47:26 -04:00
parent fefe7d054b
commit d38d0ed7ed
1 changed files with 2 additions and 2 deletions

View File

@ -401,8 +401,8 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
//TODO convert the amount to long type using the precision of the currency
Long amountFromEditText = Long.parseLong(this.etAmount.getText().toString());
Long amount = amountFromEditText*Math.round(Math.pow(10,((CryptoCurrency)spAsset.getSelectedItem()).getPrecision()));
Double amountFromEditText = Double.parseDouble(this.etAmount.getText().toString());
Long amount = (long)Math.floor(amountFromEditText*Math.round(Math.pow(10,((CryptoCurrency)spAsset.getSelectedItem()).getPrecision())));
final ValidateBitsharesSendRequest sendRequest = new ValidateBitsharesSendRequest(
this.getContext(),