1
mirror of https://github.com/m2049r/xmrwallet synced 2025-09-05 09:58:42 +02:00

Compare commits

...

8 Commits

Author SHA1 Message Date
m2049r
ffda0e965b bump version 2023-01-07 11:07:19 +01:00
m2049r
cc7cdb383c tweak http timeouts so sideshift does not timeout (#881) 2023-01-07 10:22:21 +01:00
m2049r
ac1ea05ef6 add unlockTime (#880)
show lock icon for currently locked txs
2023-01-07 10:19:22 +01:00
m2049r
1ddd4f30b9 use monero v0.18.1.2 (#878) 2022-12-04 21:04:15 +01:00
m2049r
1dc081834f bump version 2022-10-22 11:33:11 +02:00
m2049r
ce084927e1 fix langauge list 2022-10-22 11:32:44 +02:00
Kartal Kaan Bozdoğan
3610781f43 Display the unconfirmed amount in the chosen currency (#844)
Changed the translations accordingly
2022-10-22 10:59:25 +02:00
m2049r
ef3ddbac71 fix versions 2022-08-13 23:24:57 +02:00
42 changed files with 248 additions and 68 deletions

View File

@@ -8,8 +8,8 @@ android {
applicationId "com.m2049r.xmrwallet" applicationId "com.m2049r.xmrwallet"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 31 targetSdkVersion 31
versionCode 3001 versionCode 3100
versionName "3.0.1 'Fluorine Fermi'" versionName "3.1.0 'Fluorine Fermi'"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
externalNativeBuild { externalNativeBuild {
cmake { cmake {

View File

@@ -1237,7 +1237,7 @@ jobject newTransferList(JNIEnv *env, Monero::TransactionInfo *info) {
jobject newTransactionInfo(JNIEnv *env, Monero::TransactionInfo *info) { jobject newTransactionInfo(JNIEnv *env, Monero::TransactionInfo *info) {
jmethodID c = env->GetMethodID(class_TransactionInfo, "<init>", jmethodID c = env->GetMethodID(class_TransactionInfo, "<init>",
"(IZZJJJLjava/lang/String;JLjava/lang/String;IIJLjava/lang/String;Ljava/util/List;)V"); "(IZZJJJLjava/lang/String;JLjava/lang/String;IIJJLjava/lang/String;Ljava/util/List;)V");
jobject transfers = newTransferList(env, info); jobject transfers = newTransferList(env, info);
jstring _hash = env->NewStringUTF(info->hash().c_str()); jstring _hash = env->NewStringUTF(info->hash().c_str());
jstring _paymentId = env->NewStringUTF(info->paymentId().c_str()); jstring _paymentId = env->NewStringUTF(info->paymentId().c_str());
@@ -1258,6 +1258,7 @@ jobject newTransactionInfo(JNIEnv *env, Monero::TransactionInfo *info) {
static_cast<jint> (info->subaddrAccount()), static_cast<jint> (info->subaddrAccount()),
static_cast<jint> (subaddrIndex), static_cast<jint> (subaddrIndex),
static_cast<jlong> (info->confirmations()), static_cast<jlong> (info->confirmations()),
static_cast<jlong> (info->unlockTime()),
_label, _label,
transfers); transfers);
env->DeleteLocalRef(transfers); env->DeleteLocalRef(transfers);

View File

@@ -238,4 +238,5 @@ public class SubaddressFragment extends Fragment implements SubaddressInfoAdapte
activityCallback.showSubaddress(view, subaddress.getAddressIndex()); activityCallback.showSubaddress(view, subaddress.getAddressIndex());
return false; return false;
} }
} }

View File

@@ -46,7 +46,7 @@ import java.util.List;
import timber.log.Timber; import timber.log.Timber;
public class SubaddressInfoFragment extends Fragment public class SubaddressInfoFragment extends Fragment
implements TransactionInfoAdapter.OnInteractionListener, OnBlockUpdateListener { implements TransactionInfoAdapter.Listener, OnBlockUpdateListener {
private TransactionInfoAdapter adapter; private TransactionInfoAdapter adapter;
private Subaddress subaddress; private Subaddress subaddress;
@@ -145,6 +145,8 @@ public class SubaddressInfoFragment extends Fragment
void setTitle(String title, String subtitle); void setTitle(String title, String subtitle);
void setSubtitle(String subtitle); void setSubtitle(String subtitle);
long getDaemonHeight();
} }
@Override @Override
@@ -170,4 +172,9 @@ public class SubaddressInfoFragment extends Fragment
public void onPause() { public void onPause() {
super.onPause(); super.onPause();
} }
@Override
public long getDaemonHeight() {
return activityCallback.getDaemonHeight();
}
} }

View File

@@ -44,6 +44,8 @@ import com.m2049r.xmrwallet.data.UserNotes;
import com.m2049r.xmrwallet.model.TransactionInfo; import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Transfer; import com.m2049r.xmrwallet.model.Transfer;
import com.m2049r.xmrwallet.model.Wallet; import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.WalletService;
import com.m2049r.xmrwallet.util.Helper; import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.ThemeHelper; import com.m2049r.xmrwallet.util.ThemeHelper;
import com.m2049r.xmrwallet.widget.Toolbar; import com.m2049r.xmrwallet.widget.Toolbar;
@@ -83,6 +85,9 @@ public class TxFragment extends Fragment {
private TextView tvTxTransfers; private TextView tvTxTransfers;
private TextView etTxNotes; private TextView etTxNotes;
private View llWarning;
private TextView tvWarning;
// XMRTO stuff // XMRTO stuff
private View cvXmrTo; private View cvXmrTo;
private TextView tvTxXmrToKey; private TextView tvTxXmrToKey;
@@ -116,9 +121,11 @@ public class TxFragment extends Fragment {
tvTxFee = view.findViewById(R.id.tvTxFee); tvTxFee = view.findViewById(R.id.tvTxFee);
tvTxTransfers = view.findViewById(R.id.tvTxTransfers); tvTxTransfers = view.findViewById(R.id.tvTxTransfers);
etTxNotes = view.findViewById(R.id.etTxNotes); etTxNotes = view.findViewById(R.id.etTxNotes);
etTxNotes.setRawInputType(InputType.TYPE_CLASS_TEXT); etTxNotes.setRawInputType(InputType.TYPE_CLASS_TEXT);
llWarning = view.findViewById(R.id.llWarning);
tvWarning = view.findViewById(R.id.tvWarning);
tvTxXmrToKey.setOnClickListener(v -> { tvTxXmrToKey.setOnClickListener(v -> {
Helper.clipBoardCopy(getActivity(), getString(R.string.label_copy_xmrtokey), tvTxXmrToKey.getText().toString()); Helper.clipBoardCopy(getActivity(), getString(R.string.label_copy_xmrtokey), tvTxXmrToKey.getText().toString());
Toast.makeText(getActivity(), getString(R.string.message_copy_xmrtokey), Toast.LENGTH_SHORT).show(); Toast.makeText(getActivity(), getString(R.string.message_copy_xmrtokey), Toast.LENGTH_SHORT).show();
@@ -299,6 +306,20 @@ public class TxFragment extends Fragment {
tvTxTransfers.setText(sb.toString()); tvTxTransfers.setText(sb.toString());
tvDestination.setText(dstSb.toString()); tvDestination.setText(dstSb.toString());
showBtcInfo(); showBtcInfo();
showLock();
}
private void showLock() {
llWarning.setVisibility(View.GONE);
if (info.unlockTime == 0) return;
final long blockheight = activityCallback.getDaemonHeight();
final long blocks = info.unlockTime - blockheight;
final double unlockDays = blocks / (30. * 24);
if (unlockDays > 0) {
llWarning.setVisibility(View.VISIBLE);
tvWarning.setText(getString(R.string.tx_locked, info.unlockTime, blocks, unlockDays));
}
} }
@SuppressLint("SetTextI18n") @SuppressLint("SetTextI18n")
@@ -370,6 +391,7 @@ public class TxFragment extends Fragment {
void showSubaddress(View view, final int subaddressIndex); void showSubaddress(View view, final int subaddressIndex);
long getDaemonHeight();
} }
@Override @Override

View File

@@ -62,7 +62,7 @@ import java.util.List;
import timber.log.Timber; import timber.log.Timber;
public class WalletFragment extends Fragment public class WalletFragment extends Fragment
implements TransactionInfoAdapter.OnInteractionListener { implements TransactionInfoAdapter.Listener {
private TransactionInfoAdapter adapter; private TransactionInfoAdapter adapter;
private final NumberFormat formatter = NumberFormat.getInstance(); private final NumberFormat formatter = NumberFormat.getInstance();
@@ -118,9 +118,9 @@ public class WalletFragment extends Fragment
tvProgress = view.findViewById(R.id.tvProgress); tvProgress = view.findViewById(R.id.tvProgress);
pbProgress = view.findViewById(R.id.pbProgress); pbProgress = view.findViewById(R.id.pbProgress);
tvBalance = view.findViewById(R.id.tvBalance); tvBalance = view.findViewById(R.id.tvBalance);
showBalance(Helper.getDisplayAmount(0)); showBalance();
tvUnconfirmedAmount = view.findViewById(R.id.tvUnconfirmedAmount); tvUnconfirmedAmount = view.findViewById(R.id.tvUnconfirmedAmount);
showUnconfirmed(0); showUnconfirmed();
ivSynced = view.findViewById(R.id.ivSynced); ivSynced = view.findViewById(R.id.ivSynced);
sCurrency = view.findViewById(R.id.sCurrency); sCurrency = view.findViewById(R.id.sCurrency);
@@ -205,7 +205,18 @@ public class WalletFragment extends Fragment
super.onViewCreated(view, savedInstanceState); super.onViewCreated(view, savedInstanceState);
} }
void showBalance(String balance) { String amountToString(double amount) {
if (!Helper.BASE_CRYPTO.equals(balanceCurrency)) { // not XMR
double amountB = amount * balanceRate;
return Helper.getFormattedAmount(amountB, false);
} else { // XMR
return Helper.getFormattedAmount(amount, true);
}
}
void showBalance() {
double amountA = Helper.getDecimalAmount(unlockedBalance).doubleValue();
String balance = amountToString(amountA);
tvBalance.setText(balance); tvBalance.setText(balance);
final boolean streetMode = activityCallback.isStreetMode(); final boolean streetMode = activityCallback.isStreetMode();
if (!streetMode) { if (!streetMode) {
@@ -218,13 +229,14 @@ public class WalletFragment extends Fragment
setStreetModeBackground(streetMode); setStreetModeBackground(streetMode);
} }
void showUnconfirmed(double unconfirmedAmount) { void showUnconfirmed() {
double unconfirmedAmount = Helper.getDecimalAmount(balance - unlockedBalance).doubleValue();
if (activityCallback.isStreetMode() || unconfirmedAmount == 0) { if (activityCallback.isStreetMode() || unconfirmedAmount == 0) {
tvUnconfirmedAmount.setText(null); tvUnconfirmedAmount.setText(null);
tvUnconfirmedAmount.setVisibility(View.GONE); tvUnconfirmedAmount.setVisibility(View.GONE);
} else { } else {
String unconfirmed = Helper.getFormattedAmount(unconfirmedAmount, true); String unconfirmed = amountToString(unconfirmedAmount);
tvUnconfirmedAmount.setText(getResources().getString(R.string.xmr_unconfirmed_amount, unconfirmed)); tvUnconfirmedAmount.setText(getResources().getString(R.string.xmr_unconfirmed_amount, unconfirmed, balanceCurrency));
tvUnconfirmedAmount.setVisibility(View.VISIBLE); tvUnconfirmedAmount.setVisibility(View.VISIBLE);
} }
} }
@@ -232,15 +244,8 @@ public class WalletFragment extends Fragment
void updateBalance() { void updateBalance() {
if (isExchanging) return; // wait for exchange to finish - it will fire this itself then. if (isExchanging) return; // wait for exchange to finish - it will fire this itself then.
// at this point selection is XMR in case of error // at this point selection is XMR in case of error
String displayB; showBalance();
double amountA = Helper.getDecimalAmount(unlockedBalance).doubleValue(); showUnconfirmed();
if (!Helper.BASE_CRYPTO.equals(balanceCurrency)) { // not XMR
double amountB = amountA * balanceRate;
displayB = Helper.getFormattedAmount(amountB, false);
} else { // XMR
displayB = Helper.getFormattedAmount(amountA, true);
}
showBalance(displayB);
} }
String balanceCurrency = Helper.BASE_CRYPTO; String balanceCurrency = Helper.BASE_CRYPTO;
@@ -249,11 +254,11 @@ public class WalletFragment extends Fragment
private final ExchangeApi exchangeApi = ServiceHelper.getExchangeApi(); private final ExchangeApi exchangeApi = ServiceHelper.getExchangeApi();
void refreshBalance() { void refreshBalance() {
double unconfirmedXmr = Helper.getDecimalAmount(balance - unlockedBalance).doubleValue();
showUnconfirmed(unconfirmedXmr);
if (sCurrency.getSelectedItemPosition() == 0) { // XMR if (sCurrency.getSelectedItemPosition() == 0) { // XMR
double amountXmr = Helper.getDecimalAmount(unlockedBalance).doubleValue(); balanceCurrency = Helper.BASE_CRYPTO;
showBalance(Helper.getFormattedAmount(amountXmr, true)); balanceRate = 1.0;
showBalance();
showUnconfirmed();
} else { // not XMR } else { // not XMR
String currency = (String) sCurrency.getSelectedItem(); String currency = (String) sCurrency.getSelectedItem();
Timber.d(currency); Timber.d(currency);
@@ -298,8 +303,7 @@ public class WalletFragment extends Fragment
public void exchangeFailed() { public void exchangeFailed() {
sCurrency.setSelection(0, true); // default to XMR sCurrency.setSelection(0, true); // default to XMR
double amountXmr = Helper.getDecimalAmount(unlockedBalance).doubleValue(); showBalance();
showBalance(Helper.getFormattedAmount(amountXmr, true));
hideExchanging(); hideExchanging();
} }
@@ -446,9 +450,9 @@ public class WalletFragment extends Fragment
Wallet.ConnectionStatus daemonConnected = activityCallback.getConnectionStatus(); Wallet.ConnectionStatus daemonConnected = activityCallback.getConnectionStatus();
if (daemonConnected == Wallet.ConnectionStatus.ConnectionStatus_Connected) { if (daemonConnected == Wallet.ConnectionStatus.ConnectionStatus_Connected) {
if (!wallet.isSynchronized()) { if (!wallet.isSynchronized()) {
long daemonHeight = activityCallback.getDaemonHeight(); final long daemonHeight = getDaemonHeight();
long walletHeight = wallet.getBlockChainHeight(); final long walletHeight = wallet.getBlockChainHeight();
long n = daemonHeight - walletHeight; final long n = daemonHeight - walletHeight;
sync = getString(R.string.status_syncing) + " " + formatter.format(n) + " " + getString(R.string.status_remaining); sync = getString(R.string.status_syncing) + " " + formatter.format(n) + " " + getString(R.string.status_remaining);
if (firstBlock == 0) { if (firstBlock == 0) {
firstBlock = walletHeight; firstBlock = walletHeight;
@@ -556,4 +560,9 @@ public class WalletFragment extends Fragment
} else } else
ivStreetGunther.setImageDrawable(null); ivStreetGunther.setImageDrawable(null);
} }
@Override
public long getDaemonHeight() {
return activityCallback.getDaemonHeight();
}
} }

View File

@@ -35,6 +35,8 @@ import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.Crypto; import com.m2049r.xmrwallet.data.Crypto;
import com.m2049r.xmrwallet.data.UserNotes; import com.m2049r.xmrwallet.data.UserNotes;
import com.m2049r.xmrwallet.model.TransactionInfo; import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.WalletService;
import com.m2049r.xmrwallet.util.Helper; import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.ThemeHelper; import com.m2049r.xmrwallet.util.ThemeHelper;
@@ -61,12 +63,19 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
void onInteraction(View view, TransactionInfo item); void onInteraction(View view, TransactionInfo item);
} }
public interface DaemonHeightProvider {
long getDaemonHeight();
}
public interface Listener extends OnInteractionListener, DaemonHeightProvider {
}
private final List<TransactionInfo> infoItems; private final List<TransactionInfo> infoItems;
private final OnInteractionListener listener; private final Listener listener;
private final Context context; private final Context context;
public TransactionInfoAdapter(Context context, OnInteractionListener listener) { public TransactionInfoAdapter(Context context, Listener listener) {
this.context = context; this.context = context;
inboundColour = ThemeHelper.getThemedColor(context, R.attr.positiveColor); inboundColour = ThemeHelper.getThemedColor(context, R.attr.positiveColor);
outboundColour = ThemeHelper.getThemedColor(context, R.attr.negativeColor); outboundColour = ThemeHelper.getThemedColor(context, R.attr.negativeColor);
@@ -158,6 +167,7 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
final TextView tvDateTime; final TextView tvDateTime;
final CircularProgressIndicator pbConfirmations; final CircularProgressIndicator pbConfirmations;
final TextView tvConfirmations; final TextView tvConfirmations;
final ImageView ivLock;
TransactionInfo infoItem; TransactionInfo infoItem;
ViewHolder(View itemView) { ViewHolder(View itemView) {
@@ -170,6 +180,7 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
pbConfirmations = itemView.findViewById(R.id.pbConfirmations); pbConfirmations = itemView.findViewById(R.id.pbConfirmations);
pbConfirmations.setMax(TransactionInfo.CONFIRMATION); pbConfirmations.setMax(TransactionInfo.CONFIRMATION);
tvConfirmations = itemView.findViewById(R.id.tvConfirmations); tvConfirmations = itemView.findViewById(R.id.tvConfirmations);
ivLock = itemView.findViewById(R.id.ivLock);
} }
private String getDateTime(long time) { private String getDateTime(long time) {
@@ -180,6 +191,21 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
tvAmount.setTextColor(clr); tvAmount.setTextColor(clr);
} }
private void showLock() {
Timber.d("UNLOCK %d:%d", infoItem.unlockTime, infoItem.blockheight);
if (infoItem.unlockTime == 0) {
ivLock.setVisibility(View.GONE);
return;
}
if (getDaemonHeight() < infoItem.unlockTime) {
tvConfirmations.setVisibility(View.GONE);
ivLock.setVisibility(View.VISIBLE);
} else {
ivLock.setVisibility(View.GONE);
}
}
void bind(int position) { void bind(int position) {
infoItem = infoItems.get(position); infoItem = infoItems.get(position);
itemView.setTransitionName(context.getString(R.string.tx_item_transition_name, infoItem.hash)); itemView.setTransitionName(context.getString(R.string.tx_item_transition_name, infoItem.hash));
@@ -238,6 +264,7 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
pbConfirmations.setVisibility(View.GONE); pbConfirmations.setVisibility(View.GONE);
tvConfirmations.setVisibility(View.GONE); tvConfirmations.setVisibility(View.GONE);
} }
showLock();
String tag = null; String tag = null;
String info = ""; String info = "";
@@ -275,4 +302,8 @@ public class TransactionInfoAdapter extends RecyclerView.Adapter<TransactionInfo
} }
} }
} }
private long getDaemonHeight() {
return listener.getDaemonHeight();
}
} }

View File

@@ -46,7 +46,7 @@ public class Ledger {
public static final int SW_OK = 0x9000; public static final int SW_OK = 0x9000;
public static final int SW_INS_NOT_SUPPORTED = 0x6D00; public static final int SW_INS_NOT_SUPPORTED = 0x6D00;
public static final int OK[] = {SW_OK}; public static final int OK[] = {SW_OK};
public static final int MINIMUM_LEDGER_VERSION = (1 << 16) + (6 << 8) + (0); // 1.6.0 public static final int MINIMUM_LEDGER_VERSION = (1 << 16) + (8 << 8) + (0); // 1.6.0
public static UsbDevice findDevice(UsbManager usbManager) { public static UsbDevice findDevice(UsbManager usbManager) {
if (!ENABLED) return null; if (!ENABLED) return null;

View File

@@ -62,6 +62,7 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
public int accountIndex; public int accountIndex;
public int addressIndex; public int addressIndex;
public long confirmations; public long confirmations;
public long unlockTime;
public String subaddressLabel; public String subaddressLabel;
public List<Transfer> transfers; public List<Transfer> transfers;
@@ -82,6 +83,7 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
int accountIndex, int accountIndex,
int addressIndex, int addressIndex,
long confirmations, long confirmations,
long unlockTime,
String subaddressLabel, String subaddressLabel,
List<Transfer> transfers) { List<Transfer> transfers) {
this.direction = Direction.values()[direction]; this.direction = Direction.values()[direction];
@@ -96,6 +98,7 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
this.accountIndex = accountIndex; this.accountIndex = accountIndex;
this.addressIndex = addressIndex; this.addressIndex = addressIndex;
this.confirmations = confirmations; this.confirmations = confirmations;
this.unlockTime = unlockTime;
this.subaddressLabel = subaddressLabel; this.subaddressLabel = subaddressLabel;
this.transfers = transfers; this.transfers = transfers;
} }
@@ -129,6 +132,7 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
out.writeInt(accountIndex); out.writeInt(accountIndex);
out.writeInt(addressIndex); out.writeInt(addressIndex);
out.writeLong(confirmations); out.writeLong(confirmations);
out.writeLong(unlockTime);
out.writeString(subaddressLabel); out.writeString(subaddressLabel);
out.writeList(transfers); out.writeList(transfers);
out.writeString(txKey); out.writeString(txKey);
@@ -159,6 +163,7 @@ public class TransactionInfo implements Parcelable, Comparable<TransactionInfo>
accountIndex = in.readInt(); accountIndex = in.readInt();
addressIndex = in.readInt(); addressIndex = in.readInt();
confirmations = in.readLong(); confirmations = in.readLong();
unlockTime = in.readLong();
subaddressLabel = in.readString(); subaddressLabel = in.readString();
transfers = in.readArrayList(Transfer.class.getClassLoader()); transfers = in.readArrayList(Transfer.class.getClassLoader());
txKey = in.readString(); txKey = in.readString();

View File

@@ -35,7 +35,8 @@ public class LocaleHelper {
String[] availableLocales = context.getString(R.string.available_locales).split(","); String[] availableLocales = context.getString(R.string.available_locales).split(",");
for (String localeName : availableLocales) { for (String localeName : availableLocales) {
locales.add(Locale.forLanguageTag(localeName)); if (!localeName.startsWith("night") && !localeName.matches("v[0-9]+"))
locales.add(Locale.forLanguageTag(localeName));
} }
return locales; return locales;

View File

@@ -56,7 +56,9 @@ import timber.log.Timber;
@RequiredArgsConstructor @RequiredArgsConstructor
public class NetCipherHelper implements StatusCallback { public class NetCipherHelper implements StatusCallback {
public static final String USER_AGENT = "Monerujo/1.0"; public static final String USER_AGENT = "Monerujo/1.0";
public static final int HTTP_TIMEOUT = 1000; //ms public static final int HTTP_TIMEOUT_CONNECT = 1000; //ms
public static final int HTTP_TIMEOUT_READ = 2000; //ms
public static final int HTTP_TIMEOUT_WRITE = 1000; //ms
public static final int TOR_TIMEOUT_CONNECT = 5000; //ms public static final int TOR_TIMEOUT_CONNECT = 5000; //ms
public static final int TOR_TIMEOUT = 2000; //ms public static final int TOR_TIMEOUT = 2000; //ms
@@ -117,9 +119,9 @@ public class NetCipherHelper implements StatusCallback {
private void createClearnetClient() { private void createClearnetClient() {
try { try {
client = new OkHttpClient.Builder() client = new OkHttpClient.Builder()
.connectTimeout(HTTP_TIMEOUT, TimeUnit.MILLISECONDS) .connectTimeout(HTTP_TIMEOUT_CONNECT, TimeUnit.MILLISECONDS)
.writeTimeout(HTTP_TIMEOUT, TimeUnit.MILLISECONDS) .writeTimeout(HTTP_TIMEOUT_WRITE, TimeUnit.MILLISECONDS)
.readTimeout(HTTP_TIMEOUT, TimeUnit.MILLISECONDS) .readTimeout(HTTP_TIMEOUT_READ, TimeUnit.MILLISECONDS)
.build(); .build();
Helper.ALLOW_SHIFT = true; Helper.ALLOW_SHIFT = true;
} catch (Exception ex) { } catch (Exception ex) {

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?android:textColorSecondary"
android:pathData="M18,8h-1L17,6c0,-2.76 -2.24,-5 -5,-5S7,3.24 7,6v2L6,8c-1.1,0 -2,0.9 -2,2v10c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2L20,10c0,-1.1 -0.9,-2 -2,-2zM12,17c-1.1,0 -2,-0.9 -2,-2s0.9,-2 2,-2 2,0.9 2,2 -0.9,2 -2,2zM15.1,8L8.9,8L8.9,6c0,-1.71 1.39,-3.1 3.1,-3.1 1.71,0 3.1,1.39 3.1,3.1v2z" />
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="?attr/colorPrimaryVariant"
android:pathData="M1,21h22L12,2 1,21zM13,18h-2v-2h2v2zM13,14h-2v-4h2v4z" />
</vector>

View File

@@ -11,6 +11,30 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/llWarning"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="?attr/colorError"
android:orientation="horizontal">
<TextView
android:id="@+id/tvWarning"
style="@style/MoneroLabel.Heading"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:drawablePadding="8dp"
android:gravity="start|center_vertical"
android:padding="8dp"
android:textColor="?colorOnError"
app:drawableStartCompat="@drawable/ic_warning_24dp"
app:drawableTint="?colorOnError"
tools:text="Transaction amount locked until block 322229877 (approx. 2.4 months)" />
</LinearLayout>
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"

View File

@@ -11,10 +11,10 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:orientation="horizontal" android:orientation="horizontal"
android:paddingTop="12dp"
android:paddingBottom="12dp"
android:paddingLeft="8dp" android:paddingLeft="8dp"
android:paddingRight="8dp"> android:paddingTop="12dp"
android:paddingRight="8dp"
android:paddingBottom="12dp">
<LinearLayout <LinearLayout
android:layout_width="0dp" android:layout_width="0dp"
@@ -58,6 +58,14 @@
android:gravity="center" android:gravity="center"
android:paddingBottom="1dp" android:paddingBottom="1dp"
android:text="8" android:text="8"
android:visibility="gone" />
<ImageView
android:id="@+id/ivLock"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_gravity="center"
android:src="@drawable/ic_lock_24dp"
android:visibility="visible" /> android:visibility="visible" />
</FrameLayout> </FrameLayout>

View File

@@ -134,7 +134,7 @@
<string name="label_wallet_receive">Rebre</string> <string name="label_wallet_receive">Rebre</string>
<string name="label_wallet_send">Enviar</string> <string name="label_wallet_send">Enviar</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR sense confirmar</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s sense confirmar</string>
<string name="service_description">Servei de monerujo</string> <string name="service_description">Servei de monerujo</string>
@@ -447,4 +447,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -135,7 +135,7 @@
<string name="label_wallet_receive">Empfange</string> <string name="label_wallet_receive">Empfange</string>
<string name="label_wallet_send">Sende</string> <string name="label_wallet_send">Sende</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR unbestätigt</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s unbestätigt</string>
<string name="service_description">monerujo Service</string> <string name="service_description">monerujo Service</string>
@@ -448,4 +448,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -123,7 +123,7 @@
<string name="label_wallet_receive">Λήψη</string> <string name="label_wallet_receive">Λήψη</string>
<string name="label_wallet_send">Αποστολή</string> <string name="label_wallet_send">Αποστολή</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR μη επιβεβαιωμένα</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s μη επιβεβαιωμένα</string>
<string name="service_description">Υπηρεσία monerujo</string> <string name="service_description">Υπηρεσία monerujo</string>
@@ -449,4 +449,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -134,7 +134,7 @@
<string name="label_wallet_receive">Ricevi</string> <string name="label_wallet_receive">Ricevi</string>
<string name="label_wallet_send">Doni</string> <string name="label_wallet_send">Doni</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR nekonfirmite</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s nekonfirmite</string>
<string name="service_description">monerujo Servo</string> <string name="service_description">monerujo Servo</string>
@@ -449,4 +449,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -86,7 +86,7 @@
<string name="label_wallet_receive">Recibir</string> <string name="label_wallet_receive">Recibir</string>
<string name="label_wallet_send">Enviar</string> <string name="label_wallet_send">Enviar</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR sin confirmar</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s sin confirmar</string>
<string name="service_description">Servicio de Monerujo</string> <string name="service_description">Servicio de Monerujo</string>
@@ -440,4 +440,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -132,7 +132,7 @@
<string name="label_wallet_receive">Küsi raha</string> <string name="label_wallet_receive">Küsi raha</string>
<string name="label_wallet_send">Saada</string> <string name="label_wallet_send">Saada</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR kinnitamata</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s kinnitamata</string>
<string name="service_description">monerujo teenus</string> <string name="service_description">monerujo teenus</string>
@@ -447,4 +447,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -232,7 +232,7 @@
<string name="xmr_unconfirmed_amount"> <string name="xmr_unconfirmed_amount">
مقدار مقدار
+%1$s XMR +%1$s %2$s
تایید نشده است تایید نشده است
</string> </string>
@@ -700,4 +700,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -134,7 +134,7 @@
<string name="label_wallet_receive">Recevoir</string> <string name="label_wallet_receive">Recevoir</string>
<string name="label_wallet_send">Envoyer</string> <string name="label_wallet_send">Envoyer</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR non confirmés</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s non confirmés</string>
<string name="service_description">Service monerujo</string> <string name="service_description">Service monerujo</string>
@@ -453,4 +453,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -132,7 +132,7 @@
<string name="label_wallet_receive">Fogadás</string> <string name="label_wallet_receive">Fogadás</string>
<string name="label_wallet_send">Küldés</string> <string name="label_wallet_send">Küldés</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR függőben</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s függőben</string>
<string name="service_description">monerujo szolgáltatás</string> <string name="service_description">monerujo szolgáltatás</string>
@@ -451,4 +451,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -134,7 +134,7 @@
<string name="label_wallet_receive">Ricevi</string> <string name="label_wallet_receive">Ricevi</string>
<string name="label_wallet_send">Invia</string> <string name="label_wallet_send">Invia</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR non confermati</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s non confermati</string>
<string name="service_description">Servizio monerujo</string> <string name="service_description">Servizio monerujo</string>
@@ -452,4 +452,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -134,7 +134,7 @@
<string name="label_wallet_receive">受取り</string> <string name="label_wallet_receive">受取り</string>
<string name="label_wallet_send">送金</string> <string name="label_wallet_send">送金</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR が未承認</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s が未承認</string>
<string name="service_description">monerujo のサービス</string> <string name="service_description">monerujo のサービス</string>
@@ -452,4 +452,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -132,7 +132,7 @@
<string name="label_wallet_receive">Motta</string> <string name="label_wallet_receive">Motta</string>
<string name="label_wallet_send">Gi</string> <string name="label_wallet_send">Gi</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR ubekrefta</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s ubekrefta</string>
<string name="service_description">monerujo tjeneste</string> <string name="service_description">monerujo tjeneste</string>
@@ -449,4 +449,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -132,7 +132,7 @@
<string name="label_wallet_receive">Ontvangen</string> <string name="label_wallet_receive">Ontvangen</string>
<string name="label_wallet_send">Geven</string> <string name="label_wallet_send">Geven</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR onbevestigd</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s onbevestigd</string>
<string name="service_description">monerujo-service</string> <string name="service_description">monerujo-service</string>
@@ -449,4 +449,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -133,7 +133,7 @@
<string name="label_wallet_receive">Receber</string> <string name="label_wallet_receive">Receber</string>
<string name="label_wallet_send">Enviar</string> <string name="label_wallet_send">Enviar</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR não confirmado</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s não confirmado</string>
<string name="service_description">Serviço monerujo</string> <string name="service_description">Serviço monerujo</string>
@@ -442,4 +442,6 @@ aqui.</string>
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -130,7 +130,7 @@
<string name="label_wallet_receive">Receber</string> <string name="label_wallet_receive">Receber</string>
<string name="label_wallet_send">Enviar</string> <string name="label_wallet_send">Enviar</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR não confirmado</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s não confirmado</string>
<string name="service_description">Serviço monerujo</string> <string name="service_description">Serviço monerujo</string>
@@ -453,4 +453,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -123,7 +123,7 @@
<string name="label_wallet_receive">Primește</string> <string name="label_wallet_receive">Primește</string>
<string name="label_wallet_send">Trimite</string> <string name="label_wallet_send">Trimite</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR neconfirmat</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s neconfirmat</string>
<string name="service_description">Serviciul monerujo</string> <string name="service_description">Serviciul monerujo</string>
@@ -449,4 +449,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Failed to create QR for sharing!</string> <string name="message_qr_failed">Failed to create QR for sharing!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

View File

@@ -133,7 +133,7 @@
<string name="label_wallet_receive">Получить</string> <string name="label_wallet_receive">Получить</string>
<string name="label_wallet_send">Передать</string> <string name="label_wallet_send">Передать</string>
<string name="xmr_unconfirmed_amount">+ %1$s XMR неподтвержденно</string> <string name="xmr_unconfirmed_amount">+ %1$s %2$s неподтвержденно</string>
<string name="service_description">Служба Monerujo</string> <string name="service_description">Служба Monerujo</string>
@@ -453,4 +453,6 @@
</string-array> </string-array>
<string name="message_qr_failed">Не удалось создать QR!</string> <string name="message_qr_failed">Не удалось создать QR!</string>
<string name="tx_locked">Transaction amount locked until block %1$d (in %2$d blocks ≈ %3$,.2f days)</string>
</resources> </resources>

Some files were not shown because too many files have changed in this diff Show More