diff --git a/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java b/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java index 9c2dcd87..0f84fcbd 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java @@ -65,6 +65,7 @@ public class GenerateReviewFragment extends Fragment { boolean testnet = WalletManager.getInstance().isTestNet(); tvWalletMnemonic.setTextIsSelectable(testnet); + tvWalletSpendKey.setTextIsSelectable(testnet); bAccept.setOnClickListener(new View.OnClickListener() { @Override diff --git a/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java b/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java index eb217a95..c3a3eb39 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java @@ -60,6 +60,7 @@ public class SendFragment extends Fragment { TextView tvTxDust; EditText etNotes; Button bSend; + Button bReallySend; ProgressBar pbProgress; final static int Mixins[] = {4, 6, 8, 10, 13}; // must match the layout XML @@ -90,6 +91,7 @@ public class SendFragment extends Fragment { tvTxDust = (TextView) view.findViewById(R.id.tvTxDust); etNotes = (EditText) view.findViewById(R.id.etNotes); bSend = (Button) view.findViewById(R.id.bSend); + bReallySend = (Button) view.findViewById(R.id.bReallySend); pbProgress = (ProgressBar) view.findViewById(R.id.pbProgress); @@ -229,6 +231,19 @@ public class SendFragment extends Fragment { @Override public void onClick(View v) { bSend.setEnabled(false); + boolean testnet = WalletManager.getInstance().isTestNet(); + if (testnet) { + send(); + } else { + bReallySend.setVisibility(View.VISIBLE); + } + } + }); + + bReallySend.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + bReallySend.setEnabled(false); send(); } }); @@ -310,6 +325,7 @@ public class SendFragment extends Fragment { bSweep.setEnabled(true); bPrepareSend.setEnabled(true); llConfirmSend.setVisibility(View.GONE); + bReallySend.setVisibility(View.GONE); } private void send() { diff --git a/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java b/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java index bb259f4a..9c40ec05 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java @@ -50,7 +50,7 @@ public class TxFragment extends Fragment { static public final String ARG_INFO = "info"; - private final SimpleDateFormat TS_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + private final SimpleDateFormat TS_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); public TxFragment() { super(); @@ -146,10 +146,10 @@ public class TxFragment extends Fragment { sb.append(getString(R.string.tx_timestamp)).append(": "); sb.append(TS_FORMATTER.format(new Date(info.timestamp * 1000))).append("\n"); sb.append(getString(R.string.tx_blockheight)).append(": "); - if (info.isPending) { - sb.append(getString(R.string.tx_pending)).append("\n"); - } else if (info.isFailed) { + if (info.isFailed) { sb.append(getString(R.string.tx_failed)).append("\n"); + } else if (info.isPending) { + sb.append(getString(R.string.tx_pending)).append("\n"); } else { sb.append(info.blockheight).append("\n"); } @@ -196,10 +196,10 @@ public class TxFragment extends Fragment { tvTxId.setText(info.hash); tvTxKey.setText(info.txKey.isEmpty() ? "-" : info.txKey); tvTxPaymentId.setText(info.paymentId); - if (info.isPending) { - tvTxBlockheight.setText(getString(R.string.tx_pending)); - } else if (info.isFailed) { + if (info.isFailed) { tvTxBlockheight.setText(getString(R.string.tx_failed)); + } else if (info.isPending) { + tvTxBlockheight.setText(getString(R.string.tx_pending)); } else { tvTxBlockheight.setText("" + info.blockheight); } diff --git a/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java b/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java index a3a1aabd..e7511131 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java +++ b/app/src/main/java/com/m2049r/xmrwallet/WalletActivity.java @@ -332,6 +332,7 @@ public class WalletActivity extends AppCompatActivity implements WalletFragment. final WalletFragment walletFragment = (WalletFragment) getFragmentManager().findFragmentById(R.id.fragment_container); if (wallet.isSynchronized()) { + Log.d(TAG, "onRefreshed() synced"); releaseWakeLock(); // the idea is to stay awake until synced if (!synced) { onProgress(null); diff --git a/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java b/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java index 83db9c6a..3b8dc54e 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java +++ b/app/src/main/java/com/m2049r/xmrwallet/layout/TransactionInfoAdapter.java @@ -40,8 +40,7 @@ import java.util.TimeZone; public class TransactionInfoAdapter extends RecyclerView.Adapter { private static final String TAG = "TransactionInfoAdapter"; - private final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd"); - private final SimpleDateFormat TIME_FORMATTER = new SimpleDateFormat("HH:mm:ss"); + private final SimpleDateFormat DATETIME_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm"); static final int TX_RED = Color.rgb(255, 79, 65); static final int TX_GREEN = Color.rgb(54, 176, 91); @@ -60,8 +59,7 @@ public class TransactionInfoAdapter extends RecyclerView.Adapterb2) { + if (b1 > b2) { return -1; - } else if (b1 - - - - - -