mirror of
https://github.com/m2049r/xmrwallet
synced 2025-09-03 08:23:04 +02:00
Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1dc081834f | ||
![]() |
ce084927e1 | ||
![]() |
3610781f43 | ||
![]() |
ef3ddbac71 | ||
![]() |
0512af1496 | ||
![]() |
bd2c49669a | ||
![]() |
ac7831d0f9 | ||
![]() |
0f0b9a38c7 | ||
![]() |
807db19603 |
@@ -121,7 +121,7 @@ set_target_properties(easylogging PROPERTIES IMPORTED_LOCATION
|
||||
|
||||
add_library(unbound STATIC IMPORTED)
|
||||
set_target_properties(unbound PROPERTIES IMPORTED_LOCATION
|
||||
${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/monero/libunbound.a)
|
||||
${EXTERNAL_LIBS_DIR}/${ANDROID_ABI}/libunbound.a)
|
||||
|
||||
add_library(epee STATIC IMPORTED)
|
||||
set_target_properties(epee PROPERTIES IMPORTED_LOCATION
|
||||
|
@@ -8,8 +8,8 @@ android {
|
||||
applicationId "com.m2049r.xmrwallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 31
|
||||
versionCode 1403
|
||||
versionName "2.4.3 'Baldaŭ'"
|
||||
versionCode 3003
|
||||
versionName "3.0.3 'Fluorine Fermi'"
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
@@ -72,7 +72,7 @@ android {
|
||||
abi {
|
||||
enable true
|
||||
reset()
|
||||
include 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
|
||||
include 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
||||
universalApk true
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -916,9 +916,9 @@ public class LoginActivity extends BaseActivity
|
||||
@Override
|
||||
public boolean createWallet(File aFile, String password) {
|
||||
NodeInfo currentNode = getNode();
|
||||
// get it from the connected node if we have one, and go back ca. 4 days
|
||||
// get it from the connected node if we have one
|
||||
final long restoreHeight =
|
||||
(currentNode != null) ? currentNode.getHeight() - 2000 : -1;
|
||||
(currentNode != null) ? currentNode.getHeight() : -1;
|
||||
Wallet newWallet = WalletManager.getInstance()
|
||||
.createWallet(aFile, password, MNEMONIC_LANGUAGE, restoreHeight);
|
||||
return checkAndCloseWallet(newWallet);
|
||||
|
@@ -118,9 +118,9 @@ public class WalletFragment extends Fragment
|
||||
tvProgress = view.findViewById(R.id.tvProgress);
|
||||
pbProgress = view.findViewById(R.id.pbProgress);
|
||||
tvBalance = view.findViewById(R.id.tvBalance);
|
||||
showBalance(Helper.getDisplayAmount(0));
|
||||
showBalance();
|
||||
tvUnconfirmedAmount = view.findViewById(R.id.tvUnconfirmedAmount);
|
||||
showUnconfirmed(0);
|
||||
showUnconfirmed();
|
||||
ivSynced = view.findViewById(R.id.ivSynced);
|
||||
|
||||
sCurrency = view.findViewById(R.id.sCurrency);
|
||||
@@ -205,7 +205,18 @@ public class WalletFragment extends Fragment
|
||||
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);
|
||||
final boolean streetMode = activityCallback.isStreetMode();
|
||||
if (!streetMode) {
|
||||
@@ -218,13 +229,14 @@ public class WalletFragment extends Fragment
|
||||
setStreetModeBackground(streetMode);
|
||||
}
|
||||
|
||||
void showUnconfirmed(double unconfirmedAmount) {
|
||||
void showUnconfirmed() {
|
||||
double unconfirmedAmount = Helper.getDecimalAmount(balance - unlockedBalance).doubleValue();
|
||||
if (activityCallback.isStreetMode() || unconfirmedAmount == 0) {
|
||||
tvUnconfirmedAmount.setText(null);
|
||||
tvUnconfirmedAmount.setVisibility(View.GONE);
|
||||
} else {
|
||||
String unconfirmed = Helper.getFormattedAmount(unconfirmedAmount, true);
|
||||
tvUnconfirmedAmount.setText(getResources().getString(R.string.xmr_unconfirmed_amount, unconfirmed));
|
||||
String unconfirmed = amountToString(unconfirmedAmount);
|
||||
tvUnconfirmedAmount.setText(getResources().getString(R.string.xmr_unconfirmed_amount, unconfirmed, balanceCurrency));
|
||||
tvUnconfirmedAmount.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
@@ -232,15 +244,8 @@ public class WalletFragment extends Fragment
|
||||
void updateBalance() {
|
||||
if (isExchanging) return; // wait for exchange to finish - it will fire this itself then.
|
||||
// at this point selection is XMR in case of error
|
||||
String displayB;
|
||||
double amountA = Helper.getDecimalAmount(unlockedBalance).doubleValue();
|
||||
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);
|
||||
showBalance();
|
||||
showUnconfirmed();
|
||||
}
|
||||
|
||||
String balanceCurrency = Helper.BASE_CRYPTO;
|
||||
@@ -249,11 +254,11 @@ public class WalletFragment extends Fragment
|
||||
private final ExchangeApi exchangeApi = ServiceHelper.getExchangeApi();
|
||||
|
||||
void refreshBalance() {
|
||||
double unconfirmedXmr = Helper.getDecimalAmount(balance - unlockedBalance).doubleValue();
|
||||
showUnconfirmed(unconfirmedXmr);
|
||||
if (sCurrency.getSelectedItemPosition() == 0) { // XMR
|
||||
double amountXmr = Helper.getDecimalAmount(unlockedBalance).doubleValue();
|
||||
showBalance(Helper.getFormattedAmount(amountXmr, true));
|
||||
balanceCurrency = Helper.BASE_CRYPTO;
|
||||
balanceRate = 1.0;
|
||||
showBalance();
|
||||
showUnconfirmed();
|
||||
} else { // not XMR
|
||||
String currency = (String) sCurrency.getSelectedItem();
|
||||
Timber.d(currency);
|
||||
@@ -298,8 +303,7 @@ public class WalletFragment extends Fragment
|
||||
|
||||
public void exchangeFailed() {
|
||||
sCurrency.setSelection(0, true); // default to XMR
|
||||
double amountXmr = Helper.getDecimalAmount(unlockedBalance).doubleValue();
|
||||
showBalance(Helper.getFormattedAmount(amountXmr, true));
|
||||
showBalance();
|
||||
hideExchanging();
|
||||
}
|
||||
|
||||
|
@@ -46,7 +46,7 @@ public class Ledger {
|
||||
public static final int SW_OK = 0x9000;
|
||||
public static final int SW_INS_NOT_SUPPORTED = 0x6D00;
|
||||
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) {
|
||||
if (!ENABLED) return null;
|
||||
|
@@ -24,6 +24,7 @@ import com.m2049r.xmrwallet.util.RestoreHeight;
|
||||
import java.io.File;
|
||||
import java.io.FilenameFilter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@@ -96,8 +97,11 @@ public class WalletManager {
|
||||
if (wallet.getStatus().isOk()) {
|
||||
// (Re-)Estimate restore height based on what we know
|
||||
final long oldHeight = wallet.getRestoreHeight();
|
||||
// Go back 4 days if we don't have a precise restore height
|
||||
Calendar restoreDate = Calendar.getInstance();
|
||||
restoreDate.add(Calendar.DAY_OF_MONTH, -4);
|
||||
final long restoreHeight =
|
||||
(height > -1) ? height : RestoreHeight.getInstance().getHeight(new Date());
|
||||
(height > -1) ? height : RestoreHeight.getInstance().getHeight(restoreDate.getTime());
|
||||
wallet.setRestoreHeight(restoreHeight);
|
||||
Timber.d("Changed Restore Height from %d to %d", oldHeight, wallet.getRestoreHeight());
|
||||
wallet.setPassword(password); // this rewrites the keys file (which contains the restore height)
|
||||
|
@@ -35,7 +35,8 @@ public class LocaleHelper {
|
||||
String[] availableLocales = context.getString(R.string.available_locales).split(",");
|
||||
|
||||
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;
|
||||
|
@@ -134,7 +134,7 @@
|
||||
<string name="label_wallet_receive">Rebre</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>
|
||||
|
||||
|
@@ -135,7 +135,7 @@
|
||||
<string name="label_wallet_receive">Empfange</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>
|
||||
|
||||
|
@@ -123,7 +123,7 @@
|
||||
<string name="label_wallet_receive">Λήψη</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>
|
||||
|
||||
|
@@ -134,7 +134,7 @@
|
||||
<string name="label_wallet_receive">Ricevi</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>
|
||||
|
||||
|
@@ -86,7 +86,7 @@
|
||||
<string name="label_wallet_receive">Recibir</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>
|
||||
|
||||
|
@@ -132,7 +132,7 @@
|
||||
<string name="label_wallet_receive">Küsi raha</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>
|
||||
|
||||
|
@@ -232,7 +232,7 @@
|
||||
|
||||
<string name="xmr_unconfirmed_amount">
|
||||
مقدار
|
||||
+%1$s XMR
|
||||
+%1$s %2$s
|
||||
تایید نشده است
|
||||
</string>
|
||||
|
||||
|
@@ -134,7 +134,7 @@
|
||||
<string name="label_wallet_receive">Recevoir</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>
|
||||
|
||||
|
@@ -132,7 +132,7 @@
|
||||
<string name="label_wallet_receive">Fogadá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>
|
||||
|
||||
|
@@ -134,7 +134,7 @@
|
||||
<string name="label_wallet_receive">Ricevi</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>
|
||||
|
||||
|
@@ -134,7 +134,7 @@
|
||||
<string name="label_wallet_receive">受取り</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>
|
||||
|
||||
|
@@ -132,7 +132,7 @@
|
||||
<string name="label_wallet_receive">Motta</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>
|
||||
|
||||
|
@@ -132,7 +132,7 @@
|
||||
<string name="label_wallet_receive">Ontvangen</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>
|
||||
|
||||
|
@@ -133,7 +133,7 @@
|
||||
<string name="label_wallet_receive">Receber</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>
|
||||
|
||||
|
@@ -130,7 +130,7 @@
|
||||
<string name="label_wallet_receive">Receber</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>
|
||||
|
||||
|
@@ -123,7 +123,7 @@
|
||||
<string name="label_wallet_receive">Primește</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>
|
||||
|
||||
|
@@ -133,7 +133,7 @@
|
||||
<string name="label_wallet_receive">Получить</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>
|
||||
|
||||
|
@@ -133,7 +133,7 @@
|
||||
<string name="label_wallet_receive">Prijať</string>
|
||||
<string name="label_wallet_send">Poslať</string>
|
||||
|
||||
<string name="xmr_unconfirmed_amount">+ %1$s XMR nepotvrdených</string>
|
||||
<string name="xmr_unconfirmed_amount">+ %1$s %2$s nepotvrdených</string>
|
||||
|
||||
<string name="service_description">monerujo Service</string>
|
||||
|
||||
|
@@ -135,7 +135,7 @@
|
||||
<string name="label_wallet_receive">Primljeno</string>
|
||||
<string name="label_wallet_send">Daj</string>
|
||||
|
||||
<string name="xmr_unconfirmed_amount">+ %1$s XMR nepotvrđeno</string>
|
||||
<string name="xmr_unconfirmed_amount">+ %1$s %2$s nepotvrđeno</string>
|
||||
|
||||
<string name="service_description">monerujo Servis</string>
|
||||
|
||||
|
@@ -131,7 +131,7 @@
|
||||
<string name="label_wallet_receive">Ta emot</string>
|
||||
<string name="label_wallet_send">Ge</string>
|
||||
|
||||
<string name="xmr_unconfirmed_amount">+ %1$s XMR obekräftade</string>
|
||||
<string name="xmr_unconfirmed_amount">+ %1$s %2$s obekräftade</string>
|
||||
|
||||
<string name="service_description">monerujo-tjänsten</string>
|
||||
|
||||
|
@@ -136,7 +136,7 @@
|
||||
<string name="label_wallet_receive">பெறு</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>
|
||||
|
||||
|
@@ -133,7 +133,7 @@
|
||||
<string name="label_wallet_receive">Отримати</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>
|
||||
|
||||
|
@@ -99,7 +99,7 @@
|
||||
<string name="label_watchonly">(只读)</string>
|
||||
<string name="label_wallet_receive">收款</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="status_synced">已同步:</string>
|
||||
<string name="status_remaining">区块剩余</string>
|
||||
|
@@ -133,7 +133,7 @@
|
||||
<string name="label_wallet_receive">接收</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>
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user