From ecf5335ea36368d4430a73cccd8a6ef9b07fd169 Mon Sep 17 00:00:00 2001 From: Javier Varona Date: Sun, 18 Nov 2018 22:26:05 -0400 Subject: [PATCH] - Fixing amount in receive fragment - Fixing send fragment to read bitcoin uris qr code --- .../fragments/ReceiveTransactionFragment.java | 2 +- .../crystalwallet/fragments/SendTransactionFragment.java | 4 ++-- .../requestmanagers/CalculateBitcoinUriRequest.java | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java index bc94748..8a78d5a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java @@ -402,7 +402,7 @@ public class ReceiveTransactionFragment extends DialogFragment implements UIVali // @Override // public void onCarryOut() { // if (addressRequest.getStatus() == NextBitcoinAccountAddressRequest.StatusCode.SUCCEEDED){ - final CalculateBitcoinUriRequest uriRequest = new CalculateBitcoinUriRequest(cryptoCoin, cryptoNetAccount, getContext()); + final CalculateBitcoinUriRequest uriRequest = new CalculateBitcoinUriRequest(cryptoCoin, cryptoNetAccount, getContext(), amount); uriRequest.setListener(new CryptoNetInfoRequestListener(){ @Override diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java index be671e9..d48b28d 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java @@ -810,8 +810,8 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat } //Is not a bitshares QR - CryptoCoin cryptoCoin = CryptoCoin.getByCryptoNet(this.cryptoNetAccount.getCryptoNet()).get(0); - final BitcoinUriParseRequest bitcoinUriParseRequest = new BitcoinUriParseRequest(result.getText(), cryptoCoin); + //CryptoCoin cryptoCoin = CryptoCoin.getByCryptoNet(this.cryptoNetAccount.getCryptoNet()).get(0); + final BitcoinUriParseRequest bitcoinUriParseRequest = new BitcoinUriParseRequest(result.getText(), CryptoCoin.BITCOIN); bitcoinUriParseRequest.setListener(new CryptoNetInfoRequestListener() { @Override diff --git a/app/src/main/java/cy/agorise/crystalwallet/requestmanagers/CalculateBitcoinUriRequest.java b/app/src/main/java/cy/agorise/crystalwallet/requestmanagers/CalculateBitcoinUriRequest.java index 7388e78..f664751 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/requestmanagers/CalculateBitcoinUriRequest.java +++ b/app/src/main/java/cy/agorise/crystalwallet/requestmanagers/CalculateBitcoinUriRequest.java @@ -27,6 +27,13 @@ public class CalculateBitcoinUriRequest extends CryptoNetInfoRequest { this.context = context; } + public CalculateBitcoinUriRequest(CryptoCoin coin, CryptoNetAccount account, Context context, double amount) { + super(coin); + this.account = account; + this.context = context; + this.amount = amount; + } + public CalculateBitcoinUriRequest(CryptoCoin coin, CryptoNetAccount account, CryptoCurrency currency, double amount, Context context) { super(coin); this.account = account;