Merge pull request #24 from m2049r/feature_spend_mainnet

mainnet spending
This commit is contained in:
m2049r 2017-08-29 22:37:23 +02:00 committed by GitHub
commit 30792c53c0
3 changed files with 1 additions and 9 deletions

View File

@ -99,10 +99,6 @@ public class SendFragment extends Fragment {
etPaymentId.setRawInputType(InputType.TYPE_CLASS_TEXT);
etNotes.setRawInputType(InputType.TYPE_CLASS_TEXT);
// etAddress.setText("9tDC52GsMjTNt4dpnRCwAF7ekVBkbkgkXGaMKTcSTpBhGpqkPX56jCNRydLq9oGjbbAQBsZhLfgmTKsntmxRd3TaJFYM2f8");
boolean testnet = WalletManager.getInstance().isTestNet();
if (!testnet) throw new IllegalStateException("Sending TX only on testnet. sorry.");
Helper.showKeyboard(getActivity());
etAddress.requestFocus();
etAddress.setOnEditorActionListener(new TextView.OnEditorActionListener() {

View File

@ -122,7 +122,7 @@ public class WalletFragment extends Fragment implements TransactionInfoAdapter.O
}
public void onSynced() {
if (!activityCallback.isWatchOnly() && WalletManager.getInstance().isTestNet()) {
if (!activityCallback.isWatchOnly()) {
bSend.setVisibility(View.VISIBLE);
bSend.setEnabled(true);
}

View File

@ -341,10 +341,6 @@ public class WalletService extends Service {
} else if (cmd.equals(REQUEST_CMD_SEND)) {
Wallet myWallet = getWallet();
Log.d(TAG, "SEND TX for wallet: " + myWallet.getName());
if (!myWallet.isTestNet()) {
Log.e(TAG, "Sending transactions only on testnet");
throw new IllegalStateException("Sending transactions only in testnet");
}
PendingTransaction pendingTransaction = myWallet.getPendingTransaction();
if (pendingTransaction.getStatus() != PendingTransaction.Status.Status_Ok) {
Log.e(TAG, "PendingTransaction is " + pendingTransaction.getStatus());