mainnet spending

This commit is contained in:
m2049r 2017-08-29 22:22:07 +02:00
parent c66ebd654a
commit 3846a0c391
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); etPaymentId.setRawInputType(InputType.TYPE_CLASS_TEXT);
etNotes.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()); Helper.showKeyboard(getActivity());
etAddress.requestFocus(); etAddress.requestFocus();
etAddress.setOnEditorActionListener(new TextView.OnEditorActionListener() { etAddress.setOnEditorActionListener(new TextView.OnEditorActionListener() {

View File

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

View File

@ -341,10 +341,6 @@ public class WalletService extends Service {
} else if (cmd.equals(REQUEST_CMD_SEND)) { } else if (cmd.equals(REQUEST_CMD_SEND)) {
Wallet myWallet = getWallet(); Wallet myWallet = getWallet();
Log.d(TAG, "SEND TX for wallet: " + myWallet.getName()); 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(); PendingTransaction pendingTransaction = myWallet.getPendingTransaction();
if (pendingTransaction.getStatus() != PendingTransaction.Status.Status_Ok) { if (pendingTransaction.getStatus() != PendingTransaction.Status.Status_Ok) {
Log.e(TAG, "PendingTransaction is " + pendingTransaction.getStatus()); Log.e(TAG, "PendingTransaction is " + pendingTransaction.getStatus());