- Now the send fragment reads bitcoin alike URI
This commit is contained in:
parent
91ef2d0e9a
commit
a11f74f6a5
1 changed files with 12 additions and 8 deletions
|
@ -68,6 +68,7 @@ import cy.agorise.crystalwallet.enums.CryptoCoin;
|
||||||
import cy.agorise.crystalwallet.enums.CryptoNet;
|
import cy.agorise.crystalwallet.enums.CryptoNet;
|
||||||
import cy.agorise.crystalwallet.interfaces.OnResponse;
|
import cy.agorise.crystalwallet.interfaces.OnResponse;
|
||||||
import cy.agorise.crystalwallet.requestmanagers.BitcoinSendRequest;
|
import cy.agorise.crystalwallet.requestmanagers.BitcoinSendRequest;
|
||||||
|
import cy.agorise.crystalwallet.requestmanagers.BitcoinUriParseRequest;
|
||||||
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequest;
|
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequest;
|
||||||
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequestListener;
|
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequestListener;
|
||||||
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests;
|
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests;
|
||||||
|
@ -809,18 +810,21 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
|
||||||
}
|
}
|
||||||
|
|
||||||
//Is not a bitshares QR
|
//Is not a bitshares QR
|
||||||
/*BitcoinUriParseRequest bitcoinUriParseRequest = new BitcoinUriParseRequest(result.getText());
|
CryptoCoin cryptoCoin = CryptoCoin.getByCryptoNet(this.cryptoNetAccount.getCryptoNet()).get(0);
|
||||||
|
final BitcoinUriParseRequest bitcoinUriParseRequest = new BitcoinUriParseRequest(result.getText(), cryptoCoin);
|
||||||
|
|
||||||
bitcoinUriParseRequest.setListener(new CryptoNetInfoRequestListener() {
|
bitcoinUriParseRequest.setListener(new CryptoNetInfoRequestListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onCarryOut() {
|
public void onCarryOut() {
|
||||||
if (bitcoinUriParseRequest.getAddress() != null) {
|
if (bitcoinUriParseRequest.getAddress() != null) {
|
||||||
try {
|
if (!bitcoinUriParseRequest.getAddress().equals("")) {
|
||||||
crystalDialog.dismiss();
|
etTo.setText(bitcoinUriParseRequest.getAddress());
|
||||||
thisFragment.dismiss();
|
}
|
||||||
//thisFragment.finalize();
|
if (bitcoinUriParseRequest.getAmount() > 0) {
|
||||||
} catch (Throwable throwable) {
|
etAmount.setText(bitcoinUriParseRequest.getAmount().toString());
|
||||||
throwable.printStackTrace();
|
}
|
||||||
|
if (!bitcoinUriParseRequest.getMemo().equals("")) {
|
||||||
|
etMemo.setText(bitcoinUriParseRequest.getMemo());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(getContext(), "Not a valid QR info", Toast.LENGTH_LONG);
|
Toast.makeText(getContext(), "Not a valid QR info", Toast.LENGTH_LONG);
|
||||||
|
@ -828,6 +832,6 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
CryptoNetInfoRequests.getInstance().addRequest(bitcoinUriParseRequest);*/
|
CryptoNetInfoRequests.getInstance().addRequest(bitcoinUriParseRequest);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue