From 344eeb7a3bb4779484a58c970e9085fda49f27d5 Mon Sep 17 00:00:00 2001 From: m2049r <30435443+m2049r@users.noreply.github.com> Date: Sun, 20 Aug 2017 17:04:57 +0200 Subject: [PATCH] removed debugging code + docs + some bugfixing --- README.md | 1 + app/src/main/cpp/monerujo.cpp | 12 ------- .../xmrwallet/GenerateReviewFragment.java | 2 +- .../com/m2049r/xmrwallet/SendFragment.java | 2 +- .../java/com/m2049r/xmrwallet/TxFragment.java | 34 +++++++++---------- doc/FAQ.md | 3 ++ 6 files changed, 22 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 81106d8..2c59ae9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ You may loose all your Moneroj if you use this App. - Monerujo means "Monero Wallet" according to https://www.reddit.com/r/Monero/comments/3exy7t/esperanto_corner/ ### TODO +- Display outgoing pending transactions - wallet backup functions - adjust layout so we can use bigger font sizes (maybe show only 5 decimal places instead of 12 in main view) - review visibility of methods/classes diff --git a/app/src/main/cpp/monerujo.cpp b/app/src/main/cpp/monerujo.cpp index 2be7399..308e10d 100644 --- a/app/src/main/cpp/monerujo.cpp +++ b/app/src/main/cpp/monerujo.cpp @@ -963,12 +963,6 @@ jobject cpp2java(JNIEnv *env, std::vector vector) jobject arrayList = env->NewObject(class_ArrayList, java_util_ArrayList_, vector.size()); for (Bitmonero::TransactionInfo *s: vector) { - if (s->fee() > 1) { - LOGE("TX %s %" - PRIu64 - " %" - PRIu64, s->hash().c_str(), s->fee(), s->amount()); - } jobject info = newTransactionInfo(env, s); env->CallBooleanMethod(arrayList, java_util_ArrayList_add, info); env->DeleteLocalRef(info); @@ -1033,13 +1027,7 @@ Java_com_m2049r_xmrwallet_model_PendingTransaction_getFee(JNIEnv *env, jobject i JNIEXPORT jstring JNICALL Java_com_m2049r_xmrwallet_model_PendingTransaction_getFirstTxId(JNIEnv *env, jobject instance) { Bitmonero::PendingTransaction *tx = getHandle(env, instance); - std::vector txids = tx->txid(); - - for (std::string &s: txids) { - LOGD("TX %s", s.c_str()); - } - return env->NewStringUTF(txids.front().c_str()); } diff --git a/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java b/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java index 758e194..9c2dcd8 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/GenerateReviewFragment.java @@ -104,9 +104,9 @@ public class GenerateReviewFragment extends Fragment { getActivity().runOnUiThread(new Runnable() { public void run() { show(wallet, password, type); + wallet.close(); } }); - wallet.close(); } } , "DetailsReview", MoneroHandlerThread.THREAD_STACK_SIZE).start(); diff --git a/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java b/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java index 698512f..c28c7fe 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/SendFragment.java @@ -100,7 +100,7 @@ public class SendFragment extends Fragment { etPaymentId.setRawInputType(InputType.TYPE_CLASS_TEXT); etNotes.setRawInputType(InputType.TYPE_CLASS_TEXT); - etAddress.setText("9tDC52GsMjTNt4dpnRCwAF7ekVBkbkgkXGaMKTcSTpBhGpqkPX56jCNRydLq9oGjbbAQBsZhLfgmTKsntmxRd3TaJFYM2f8"); +// etAddress.setText("9tDC52GsMjTNt4dpnRCwAF7ekVBkbkgkXGaMKTcSTpBhGpqkPX56jCNRydLq9oGjbbAQBsZhLfgmTKsntmxRd3TaJFYM2f8"); boolean testnet = WalletManager.getInstance().isTestNet(); if (!testnet) throw new IllegalStateException("Sending TX only on testnet. sorry."); diff --git a/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java b/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java index e9b74e6..8cc30af 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java +++ b/app/src/main/java/com/m2049r/xmrwallet/TxFragment.java @@ -145,16 +145,15 @@ public class TxFragment extends Fragment { sb.append(getString(R.string.tx_transfers)).append(": "); if (info.transfers != null) { boolean comma = false; - for (int i = 0; i < 10; i++) - for (Transfer transfer : info.transfers) { - if (comma) { - sb.append(","); - } else { - comma = true; - } - sb.append("[").append(transfer.address.substring(0, 6)).append("] "); - sb.append(Wallet.getDisplayAmount(transfer.amount)); + for (Transfer transfer : info.transfers) { + if (comma) { + sb.append(","); + } else { + comma = true; } + sb.append("[").append(transfer.address.substring(0, 6)).append("] "); + sb.append(Wallet.getDisplayAmount(transfer.amount)); + } } else { sb.append("-"); } @@ -192,16 +191,15 @@ public class TxFragment extends Fragment { StringBuffer sb = new StringBuffer(); if (info.transfers != null) { boolean newline = false; - for (int i = 0; i < 10; i++) - for (Transfer transfer : info.transfers) { - if (newline) { - sb.append("\n"); - } else { - newline = true; - } - sb.append("[").append(transfer.address.substring(0, 6)).append("] "); - sb.append(Wallet.getDisplayAmount(transfer.amount)); + for (Transfer transfer : info.transfers) { + if (newline) { + sb.append("\n"); + } else { + newline = true; } + sb.append("[").append(transfer.address.substring(0, 6)).append("] "); + sb.append(Wallet.getDisplayAmount(transfer.amount)); + } } else { sb.append("-"); } diff --git a/doc/FAQ.md b/doc/FAQ.md index 173bc13..92ee6ff 100644 --- a/doc/FAQ.md +++ b/doc/FAQ.md @@ -12,6 +12,9 @@ - Spend Moneroj (only on testnet - someone will loose money and want to blame me. No thanks!) - Manually import existing wallet (by copying them to the Monerujo folder) +## I sent a transaction but it's not in my transactions list! +Pending transactions are not displayed. Wait for the block to be mined. + ## Do you have any screenshots of what it looks like and how it works? Here are some old screenshots #### [Select Wallet](images/A-wallet_selection.png)