rename packages

This commit is contained in:
pokkst 2022-09-17 15:14:08 -05:00
parent 05aedd6f53
commit 4747846815
No known key found for this signature in database
GPG key ID: 90C2ED85E67A50FF
68 changed files with 322 additions and 356 deletions

View file

@ -6,7 +6,7 @@ android {
buildToolsVersion '30.0.3'
ndkVersion '17.2.4988734'
defaultConfig {
applicationId "com.m2049r.xmrwallet"
applicationId "net.mynero.wallet"
minSdkVersion 21
targetSdkVersion 31
versionCode 3002
@ -112,7 +112,7 @@ android {
sourceCompatibility JavaVersion.VERSION_1_9
targetCompatibility JavaVersion.VERSION_1_9
}
namespace 'com.m2049r.xmrwallet'
namespace 'net.mynero.wallet'
buildFeatures {
viewBinding true
}

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.m2049r.xmrwallet">
package="net.mynero.wallet">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

View file

@ -55,13 +55,13 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *jvm, void *reserved) {
class_ArrayList = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("java/util/ArrayList")));
class_TransactionInfo = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("com/m2049r/xmrwallet/model/TransactionInfo")));
jenv->FindClass("net/mynero/wallet/model/TransactionInfo")));
class_Transfer = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("com/m2049r/xmrwallet/model/Transfer")));
jenv->FindClass("net/mynero/wallet/model/Transfer")));
class_WalletListener = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("com/m2049r/xmrwallet/model/WalletListener")));
jenv->FindClass("net/mynero/wallet/model/WalletListener")));
class_WalletStatus = static_cast<jclass>(jenv->NewGlobalRef(
jenv->FindClass("com/m2049r/xmrwallet/model/Wallet$Status")));
jenv->FindClass("net/mynero/wallet/model/Wallet$Status")));
return JNI_VERSION_1_6;
}
#ifdef __cplusplus
@ -255,7 +255,7 @@ extern "C"
/********** WalletManager *********/
/**********************************/
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_createWalletJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_createWalletJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring language,
jint networkType) {
@ -278,7 +278,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_createWalletJ(JNIEnv *env, jobject
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_openWalletJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_openWalletJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jint networkType) {
const char *_path = env->GetStringUTFChars(path, nullptr);
@ -297,7 +297,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_openWalletJ(JNIEnv *env, jobject i
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_recoveryWalletJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_recoveryWalletJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring mnemonic, jstring offset,
jint networkType,
@ -326,7 +326,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_recoveryWalletJ(JNIEnv *env, jobje
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_createWalletFromKeysJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_createWalletFromKeysJ(JNIEnv *env, jobject instance,
jstring path, jstring password,
jstring language,
jint networkType,
@ -366,7 +366,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_createWalletFromKeysJ(JNIEnv *env,
// virtual void setSubaddressLookahead(uint32_t major, uint32_t minor) = 0;
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_createWalletFromDeviceJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_createWalletFromDeviceJ(JNIEnv *env, jobject instance,
jstring path,
jstring password,
jint networkType,
@ -396,7 +396,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_createWalletFromDeviceJ(JNIEnv *en
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_walletExists(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_walletExists(JNIEnv *env, jobject instance,
jstring path) {
const char *_path = env->GetStringUTFChars(path, nullptr);
bool exists =
@ -406,7 +406,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_walletExists(JNIEnv *env, jobject
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_verifyWalletPassword(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_verifyWalletPassword(JNIEnv *env, jobject instance,
jstring keys_file_name,
jstring password,
jboolean watch_only) {
@ -422,7 +422,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_verifyWalletPassword(JNIEnv *env,
//virtual int queryWalletHardware(const std::string &keys_file_name, const std::string &password) const = 0;
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_queryWalletDeviceJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_queryWalletDeviceJ(JNIEnv *env, jobject instance,
jstring keys_file_name,
jstring password) {
const char *_keys_file_name = env->GetStringUTFChars(keys_file_name, nullptr);
@ -439,7 +439,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_queryWalletDeviceJ(JNIEnv *env, jo
}
JNIEXPORT jobject JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_findWallets(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_findWallets(JNIEnv *env, jobject instance,
jstring path) {
const char *_path = env->GetStringUTFChars(path, nullptr);
std::vector<std::string> walletPaths =
@ -451,7 +451,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_findWallets(JNIEnv *env, jobject i
//TODO virtual bool checkPayment(const std::string &address, const std::string &txid, const std::string &txkey, const std::string &daemon_address, uint64_t &received, uint64_t &height, std::string &error) const = 0;
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_setDaemonAddressJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_setDaemonAddressJ(JNIEnv *env, jobject instance,
jstring address) {
const char *_address = env->GetStringUTFChars(address, nullptr);
Monero::WalletManagerFactory::getWalletManager()->setDaemonAddress(std::string(_address));
@ -460,7 +460,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_setDaemonAddressJ(JNIEnv *env, job
// returns whether the daemon can be reached, and its version number
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_getDaemonVersion(JNIEnv *env,
Java_net_mynero_wallet_model_WalletManager_getDaemonVersion(JNIEnv *env,
jobject instance) {
uint32_t version;
bool isConnected =
@ -470,38 +470,38 @@ Java_com_m2049r_xmrwallet_model_WalletManager_getDaemonVersion(JNIEnv *env,
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_getBlockchainHeight(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_WalletManager_getBlockchainHeight(JNIEnv *env, jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->blockchainHeight();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_getBlockchainTargetHeight(JNIEnv *env,
Java_net_mynero_wallet_model_WalletManager_getBlockchainTargetHeight(JNIEnv *env,
jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->blockchainTargetHeight();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_getNetworkDifficulty(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_WalletManager_getNetworkDifficulty(JNIEnv *env, jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->networkDifficulty();
}
JNIEXPORT jdouble JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_getMiningHashRate(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_WalletManager_getMiningHashRate(JNIEnv *env, jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->miningHashRate();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_getBlockTarget(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_WalletManager_getBlockTarget(JNIEnv *env, jobject instance) {
return Monero::WalletManagerFactory::getWalletManager()->blockTarget();
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_isMining(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_WalletManager_isMining(JNIEnv *env, jobject instance) {
return static_cast<jboolean>(Monero::WalletManagerFactory::getWalletManager()->isMining());
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_startMining(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_startMining(JNIEnv *env, jobject instance,
jstring address,
jboolean background_mining,
jboolean ignore_battery) {
@ -515,12 +515,12 @@ Java_com_m2049r_xmrwallet_model_WalletManager_startMining(JNIEnv *env, jobject i
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_stopMining(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_WalletManager_stopMining(JNIEnv *env, jobject instance) {
return static_cast<jboolean>(Monero::WalletManagerFactory::getWalletManager()->stopMining());
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_resolveOpenAlias(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_resolveOpenAlias(JNIEnv *env, jobject instance,
jstring address,
jboolean dnssec_valid) {
const char *_address = env->GetStringUTFChars(address, nullptr);
@ -534,7 +534,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_resolveOpenAlias(JNIEnv *env, jobj
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_setProxyJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_setProxyJ(JNIEnv *env, jobject instance,
jstring address) {
const char *_address = env->GetStringUTFChars(address, nullptr);
bool rc =
@ -547,7 +547,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_setProxyJ(JNIEnv *env, jobject ins
//TODO static std::tuple<bool, std::string, std::string, std::string, std::string> checkUpdates(const std::string &software, const std::string &subdir);
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
jobject walletInstance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, walletInstance);
bool closeSuccess = Monero::WalletManagerFactory::getWalletManager()->closeWallet(wallet,
@ -572,7 +572,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_closeJ(JNIEnv *env, jobject instan
/**********************************/
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getSeed(JNIEnv *env, jobject instance, jstring seedOffset) {
Java_net_mynero_wallet_model_Wallet_getSeed(JNIEnv *env, jobject instance, jstring seedOffset) {
const char *_seedOffset = env->GetStringUTFChars(seedOffset, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
jstring seed = env->NewStringUTF(wallet->seed(std::string(_seedOffset)).c_str());
@ -581,13 +581,13 @@ Java_com_m2049r_xmrwallet_model_Wallet_getSeed(JNIEnv *env, jobject instance, js
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getSeedLanguage(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getSeedLanguage(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->getSeedLanguage().c_str());
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setSeedLanguage(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_setSeedLanguage(JNIEnv *env, jobject instance,
jstring language) {
const char *_language = env->GetStringUTFChars(language, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -596,7 +596,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_setSeedLanguage(JNIEnv *env, jobject inst
}
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getStatusJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getStatusJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->status();
}
@ -612,7 +612,7 @@ jobject newWalletStatusInstance(JNIEnv *env, int status, const std::string &erro
JNIEXPORT jobject JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_statusWithErrorString(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_statusWithErrorString(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
int status;
@ -623,7 +623,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_statusWithErrorString(JNIEnv *env, jobjec
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setPassword(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_setPassword(JNIEnv *env, jobject instance,
jstring password) {
const char *_password = env->GetStringUTFChars(password, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -633,7 +633,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_setPassword(JNIEnv *env, jobject instance
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getAddressJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getAddressJ(JNIEnv *env, jobject instance,
jint accountIndex,
jint addressIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -642,13 +642,13 @@ Java_com_m2049r_xmrwallet_model_Wallet_getAddressJ(JNIEnv *env, jobject instance
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getPath(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getPath(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->path().c_str());
}
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_nettype(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_nettype(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->nettype();
}
@ -657,7 +657,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_nettype(JNIEnv *env, jobject instance) {
//TODO virtual bool useForkRules(uint8_t version, int64_t early_blocks) const = 0;
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject instance,
jstring payment_id) {
const char *_payment_id = env->GetStringUTFChars(payment_id, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -667,19 +667,19 @@ Java_com_m2049r_xmrwallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getSecretViewKey(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getSecretViewKey(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->secretViewKey().c_str());
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getSecretSpendKey(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getSecretSpendKey(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->secretSpendKey().c_str());
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_store(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_store(JNIEnv *env, jobject instance,
jstring path) {
const char *_path = env->GetStringUTFChars(path, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -692,7 +692,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_store(JNIEnv *env, jobject instance,
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getFilename(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getFilename(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return env->NewStringUTF(wallet->filename().c_str());
}
@ -700,7 +700,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getFilename(JNIEnv *env, jobject instance
// virtual std::string keysFilename() const = 0;
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_initJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_initJ(JNIEnv *env, jobject instance,
jstring daemon_address,
jlong upper_transaction_size_limit,
jstring daemon_username, jstring daemon_password,
@ -724,14 +724,14 @@ Java_com_m2049r_xmrwallet_model_Wallet_initJ(JNIEnv *env, jobject instance,
// virtual bool createWatchOnly(const std::string &path, const std::string &password, const std::string &language) const = 0;
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setRestoreHeight(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_setRestoreHeight(JNIEnv *env, jobject instance,
jlong height) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->setRefreshFromBlockHeight((uint64_t) height);
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->getRefreshFromBlockHeight();
}
@ -740,7 +740,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getRestoreHeight(JNIEnv *env, jobject ins
// virtual bool connectToDaemon() = 0;
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getConnectionStatusJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getConnectionStatusJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->connected();
}
@ -748,7 +748,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getConnectionStatusJ(JNIEnv *env, jobject
//TODO virtual bool trustedDaemon() const = 0;
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setProxy(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_setProxy(JNIEnv *env, jobject instance,
jstring address) {
const char *_address = env->GetStringUTFChars(address, nullptr);
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -758,71 +758,71 @@ Java_com_m2049r_xmrwallet_model_Wallet_setProxy(JNIEnv *env, jobject instance,
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getBalance(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getBalance(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->balance((uint32_t) accountIndex);
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getBalanceAll(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getBalanceAll(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->balanceAll();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getUnlockedBalance(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getUnlockedBalance(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->unlockedBalance((uint32_t) accountIndex);
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getUnlockedBalanceAll(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getUnlockedBalanceAll(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->unlockedBalanceAll();
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_isWatchOnly(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_isWatchOnly(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jboolean>(wallet->watchOnly());
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getBlockChainHeight(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getBlockChainHeight(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->blockChainHeight();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getApproximateBlockChainHeight(JNIEnv *env,
Java_net_mynero_wallet_model_Wallet_getApproximateBlockChainHeight(JNIEnv *env,
jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->approximateBlockChainHeight();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getDaemonBlockChainHeight(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getDaemonBlockChainHeight(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->daemonBlockChainHeight();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getDaemonBlockChainTargetHeight(JNIEnv *env,
Java_net_mynero_wallet_model_Wallet_getDaemonBlockChainTargetHeight(JNIEnv *env,
jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->daemonBlockChainTargetHeight();
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_isSynchronizedJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_isSynchronizedJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jboolean>(wallet->synchronized());
}
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getDeviceTypeJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getDeviceTypeJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
Monero::Wallet::Device device_type = wallet->getDeviceType();
return static_cast<jint>(device_type);
@ -830,7 +830,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getDeviceTypeJ(JNIEnv *env, jobject insta
//void cn_slow_hash(const void *data, size_t length, char *hash); // from crypto/hash-ops.h
JNIEXPORT jbyteArray JNICALL
Java_com_m2049r_xmrwallet_util_KeyStoreHelper_slowHash(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_util_KeyStoreHelper_slowHash(JNIEnv *env, jclass clazz,
jbyteArray data, jint brokenVariant) {
char hash[HASH_SIZE];
jsize size = env->GetArrayLength(data);
@ -856,13 +856,13 @@ Java_com_m2049r_xmrwallet_util_KeyStoreHelper_slowHash(JNIEnv *env, jclass clazz
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getDisplayAmount(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_Wallet_getDisplayAmount(JNIEnv *env, jclass clazz,
jlong amount) {
return env->NewStringUTF(Monero::Wallet::displayAmount(amount).c_str());
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getAmountFromString(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_Wallet_getAmountFromString(JNIEnv *env, jclass clazz,
jstring amount) {
const char *_amount = env->GetStringUTFChars(amount, nullptr);
uint64_t x = Monero::Wallet::amountFromString(_amount);
@ -871,18 +871,18 @@ Java_com_m2049r_xmrwallet_model_Wallet_getAmountFromString(JNIEnv *env, jclass c
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getAmountFromDouble(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_Wallet_getAmountFromDouble(JNIEnv *env, jclass clazz,
jdouble amount) {
return Monero::Wallet::amountFromDouble(amount);
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_generatePaymentId(JNIEnv *env, jclass clazz) {
Java_net_mynero_wallet_model_Wallet_generatePaymentId(JNIEnv *env, jclass clazz) {
return env->NewStringUTF(Monero::Wallet::genPaymentId().c_str());
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_isPaymentIdValid(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_Wallet_isPaymentIdValid(JNIEnv *env, jclass clazz,
jstring payment_id) {
const char *_payment_id = env->GetStringUTFChars(payment_id, nullptr);
bool isValid = Monero::Wallet::paymentIdValid(_payment_id);
@ -891,7 +891,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_isPaymentIdValid(JNIEnv *env, jclass claz
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_isAddressValid(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_Wallet_isAddressValid(JNIEnv *env, jclass clazz,
jstring address, jint networkType) {
const char *_address = env->GetStringUTFChars(address, nullptr);
Monero::NetworkType _networkType = static_cast<Monero::NetworkType>(networkType);
@ -901,7 +901,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_isAddressValid(JNIEnv *env, jclass clazz,
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getPaymentIdFromAddress(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_Wallet_getPaymentIdFromAddress(JNIEnv *env, jclass clazz,
jstring address,
jint networkType) {
Monero::NetworkType _networkType = static_cast<Monero::NetworkType>(networkType);
@ -912,30 +912,30 @@ Java_com_m2049r_xmrwallet_model_Wallet_getPaymentIdFromAddress(JNIEnv *env, jcla
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getMaximumAllowedAmount(JNIEnv *env, jclass clazz) {
Java_net_mynero_wallet_model_Wallet_getMaximumAllowedAmount(JNIEnv *env, jclass clazz) {
return Monero::Wallet::maximumAllowedAmount();
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_startRefresh(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_startRefresh(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->startRefresh();
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_pauseRefresh(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_pauseRefresh(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->pauseRefresh();
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_refresh(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_refresh(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jboolean>(wallet->refresh());
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_refreshAsync(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_refreshAsync(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->refreshAsync();
}
@ -944,7 +944,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_refreshAsync(JNIEnv *env, jobject instanc
//virtual void rescanBlockchainAsync() = 0;
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_rescanBlockchainAsyncJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_rescanBlockchainAsyncJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->rescanBlockchainAsync();
}
@ -954,7 +954,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_rescanBlockchainAsyncJ(JNIEnv *env, jobje
//TODO virtual int autoRefreshInterval() const = 0;
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_createTransactionJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_createTransactionJ(JNIEnv *env, jobject instance,
jstring dst_addr, jstring payment_id,
jlong amount, jint mixin_count,
jint priority,
@ -977,7 +977,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_createTransactionJ(JNIEnv *env, jobject i
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_createSweepTransaction(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_createSweepTransaction(JNIEnv *env, jobject instance,
jstring dst_addr, jstring payment_id,
jint mixin_count,
jint priority,
@ -1002,7 +1002,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_createSweepTransaction(JNIEnv *env, jobje
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_createSweepUnmixableTransactionJ(JNIEnv *env,
Java_net_mynero_wallet_model_Wallet_createSweepUnmixableTransactionJ(JNIEnv *env,
jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
Monero::PendingTransaction *tx = wallet->createSweepUnmixableTransaction();
@ -1013,7 +1013,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_createSweepUnmixableTransactionJ(JNIEnv *
//virtual bool submitTransaction(const std::string &fileName) = 0;
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_disposeTransaction(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_disposeTransaction(JNIEnv *env, jobject instance,
jobject pendingTransaction) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
Monero::PendingTransaction *_pendingTransaction =
@ -1027,7 +1027,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_disposeTransaction(JNIEnv *env, jobject i
//virtual TransactionHistory * history() const = 0;
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getHistoryJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getHistoryJ(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return reinterpret_cast<jlong>(wallet->history());
}
@ -1035,7 +1035,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getHistoryJ(JNIEnv *env, jobject instance
//virtual AddressBook * addressBook() const = 0;
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setListenerJ(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_setListenerJ(JNIEnv *env, jobject instance,
jobject javaListener) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
wallet->setListener(nullptr); // clear old listener
@ -1057,19 +1057,19 @@ Java_com_m2049r_xmrwallet_model_Wallet_setListenerJ(JNIEnv *env, jobject instanc
}
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getDefaultMixin(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getDefaultMixin(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->defaultMixin();
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setDefaultMixin(JNIEnv *env, jobject instance, jint mixin) {
Java_net_mynero_wallet_model_Wallet_setDefaultMixin(JNIEnv *env, jobject instance, jint mixin) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return wallet->setDefaultMixin(mixin);
}
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setUserNote(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_setUserNote(JNIEnv *env, jobject instance,
jstring txid, jstring note) {
const char *_txid = env->GetStringUTFChars(txid, nullptr);
@ -1086,7 +1086,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_setUserNote(JNIEnv *env, jobject instance
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getUserNote(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getUserNote(JNIEnv *env, jobject instance,
jstring txid) {
const char *_txid = env->GetStringUTFChars(txid, nullptr);
@ -1100,7 +1100,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getUserNote(JNIEnv *env, jobject instance
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getTxKey(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getTxKey(JNIEnv *env, jobject instance,
jstring txid) {
const char *_txid = env->GetStringUTFChars(txid, nullptr);
@ -1115,7 +1115,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getTxKey(JNIEnv *env, jobject instance,
//virtual void addSubaddressAccount(const std::string& label) = 0;
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_addAccount(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_addAccount(JNIEnv *env, jobject instance,
jstring label) {
const char *_label = env->GetStringUTFChars(label, nullptr);
@ -1128,7 +1128,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_addAccount(JNIEnv *env, jobject instance,
//virtual std::string getSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex) const = 0;
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getSubaddressLabel(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getSubaddressLabel(JNIEnv *env, jobject instance,
jint accountIndex, jint addressIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -1141,7 +1141,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getSubaddressLabel(JNIEnv *env, jobject i
//virtual void setSubaddressLabel(uint32_t accountIndex, uint32_t addressIndex, const std::string &label) = 0;
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_setSubaddressLabel(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_setSubaddressLabel(JNIEnv *env, jobject instance,
jint accountIndex, jint addressIndex,
jstring label) {
@ -1155,14 +1155,14 @@ Java_com_m2049r_xmrwallet_model_Wallet_setSubaddressLabel(JNIEnv *env, jobject i
// virtual size_t numSubaddressAccounts() const = 0;
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getNumAccounts(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_Wallet_getNumAccounts(JNIEnv *env, jobject instance) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jint>(wallet->numSubaddressAccounts());
}
//virtual size_t numSubaddresses(uint32_t accountIndex) const = 0;
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getNumSubaddresses(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getNumSubaddresses(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
return static_cast<jint>(wallet->numSubaddresses(accountIndex));
@ -1170,7 +1170,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getNumSubaddresses(JNIEnv *env, jobject i
//virtual void addSubaddress(uint32_t accountIndex, const std::string &label) = 0;
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_addSubaddress(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_addSubaddress(JNIEnv *env, jobject instance,
jint accountIndex,
jstring label) {
@ -1181,7 +1181,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_addSubaddress(JNIEnv *env, jobject instan
}
/*JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_Wallet_getLastSubaddress(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_Wallet_getLastSubaddress(JNIEnv *env, jobject instance,
jint accountIndex) {
Monero::Wallet *wallet = getHandle<Monero::Wallet>(env, instance);
@ -1202,7 +1202,7 @@ Java_com_m2049r_xmrwallet_model_Wallet_getLastSubaddress(JNIEnv *env, jobject in
// TransactionHistory
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_TransactionHistory_getCount(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_TransactionHistory_getCount(JNIEnv *env, jobject instance) {
Monero::TransactionHistory *history = getHandle<Monero::TransactionHistory>(env,
instance);
return history->count();
@ -1288,7 +1288,7 @@ jobject cpp2java(JNIEnv *env, const std::vector<Monero::TransactionInfo *> &vect
}
JNIEXPORT jobject JNICALL
Java_com_m2049r_xmrwallet_model_TransactionHistory_refreshJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_TransactionHistory_refreshJ(JNIEnv *env, jobject instance) {
Monero::TransactionHistory *history = getHandle<Monero::TransactionHistory>(env,
instance);
history->refresh();
@ -1298,20 +1298,20 @@ Java_com_m2049r_xmrwallet_model_TransactionHistory_refreshJ(JNIEnv *env, jobject
// TransactionInfo is implemented in Java - no need here
JNIEXPORT jint JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_getStatusJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_PendingTransaction_getStatusJ(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->status();
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_getErrorString(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_PendingTransaction_getErrorString(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return env->NewStringUTF(tx->errorString().c_str());
}
// commit transaction or save to file if filename is provided.
JNIEXPORT jboolean JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_commit(JNIEnv *env, jobject instance,
Java_net_mynero_wallet_model_PendingTransaction_commit(JNIEnv *env, jobject instance,
jstring filename, jboolean overwrite) {
const char *_filename = env->GetStringUTFChars(filename, nullptr);
@ -1325,26 +1325,26 @@ Java_com_m2049r_xmrwallet_model_PendingTransaction_commit(JNIEnv *env, jobject i
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_getAmount(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_PendingTransaction_getAmount(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->amount();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_getDust(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_PendingTransaction_getDust(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->dust();
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_getFee(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_PendingTransaction_getFee(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->fee();
}
// TODO this returns a vector of strings - deal with this later - for now return first one
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_getFirstTxIdJ(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_PendingTransaction_getFirstTxIdJ(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
std::vector<std::string> txids = tx->txid();
if (!txids.empty())
@ -1354,7 +1354,7 @@ Java_com_m2049r_xmrwallet_model_PendingTransaction_getFirstTxIdJ(JNIEnv *env, jo
}
JNIEXPORT jlong JNICALL
Java_com_m2049r_xmrwallet_model_PendingTransaction_getTxCount(JNIEnv *env, jobject instance) {
Java_net_mynero_wallet_model_PendingTransaction_getTxCount(JNIEnv *env, jobject instance) {
Monero::PendingTransaction *tx = getHandle<Monero::PendingTransaction>(env, instance);
return tx->txCount();
}
@ -1367,7 +1367,7 @@ Java_com_m2049r_xmrwallet_model_PendingTransaction_getTxCount(JNIEnv *env, jobje
//static void warning(const std::string &category, const std::string &str);
//static void error(const std::string &category, const std::string &str);
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_initLogger(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_WalletManager_initLogger(JNIEnv *env, jclass clazz,
jstring argv0,
jstring default_log_base_name) {
@ -1381,7 +1381,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_initLogger(JNIEnv *env, jclass cla
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_logDebug(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_WalletManager_logDebug(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1394,7 +1394,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_logDebug(JNIEnv *env, jclass clazz
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_logInfo(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_WalletManager_logInfo(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1407,7 +1407,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_logInfo(JNIEnv *env, jclass clazz,
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_logWarning(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_WalletManager_logWarning(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1420,7 +1420,7 @@ Java_com_m2049r_xmrwallet_model_WalletManager_logWarning(JNIEnv *env, jclass cla
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_logError(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_WalletManager_logError(JNIEnv *env, jclass clazz,
jstring category, jstring message) {
const char *_category = env->GetStringUTFChars(category, nullptr);
@ -1433,13 +1433,13 @@ Java_com_m2049r_xmrwallet_model_WalletManager_logError(JNIEnv *env, jclass clazz
}
JNIEXPORT void JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_setLogLevel(JNIEnv *env, jclass clazz,
Java_net_mynero_wallet_model_WalletManager_setLogLevel(JNIEnv *env, jclass clazz,
jint level) {
Monero::WalletManagerFactory::setLogLevel(level);
}
JNIEXPORT jstring JNICALL
Java_com_m2049r_xmrwallet_model_WalletManager_moneroVersion(JNIEnv *env, jclass clazz) {
Java_net_mynero_wallet_model_WalletManager_moneroVersion(JNIEnv *env, jclass clazz) {
return env->NewStringUTF(MONERO_VERSION);
}

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet;
package net.mynero.wallet;
import android.content.Intent;
import android.net.Uri;
@ -12,20 +12,20 @@ import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.navigation.fragment.NavHostFragment;
import com.m2049r.xmrwallet.fragment.dialog.PasswordBottomSheetDialog;
import com.m2049r.xmrwallet.fragment.dialog.SendBottomSheetDialog;
import com.m2049r.xmrwallet.livedata.SingleLiveEvent;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.AddressService;
import com.m2049r.xmrwallet.service.BalanceService;
import com.m2049r.xmrwallet.service.BlockchainService;
import com.m2049r.xmrwallet.service.HistoryService;
import com.m2049r.xmrwallet.service.MoneroHandlerThread;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.service.TxService;
import com.m2049r.xmrwallet.util.Constants;
import com.m2049r.xmrwallet.util.UriData;
import net.mynero.wallet.fragment.dialog.PasswordBottomSheetDialog;
import net.mynero.wallet.fragment.dialog.SendBottomSheetDialog;
import net.mynero.wallet.livedata.SingleLiveEvent;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.service.AddressService;
import net.mynero.wallet.service.BalanceService;
import net.mynero.wallet.service.BlockchainService;
import net.mynero.wallet.service.HistoryService;
import net.mynero.wallet.service.MoneroHandlerThread;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.service.TxService;
import net.mynero.wallet.util.Constants;
import net.mynero.wallet.util.UriData;
import java.io.File;

View file

@ -1,9 +1,9 @@
package com.m2049r.xmrwallet;
package net.mynero.wallet;
import android.app.Application;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.util.NightmodeHelper;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.util.NightmodeHelper;
public class MoneroApplication extends Application {
@Override

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.adapter;
package net.mynero.wallet.adapter;
import android.view.LayoutInflater;
import android.view.View;
@ -23,12 +23,11 @@ import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.DefaultNodes;
import com.m2049r.xmrwallet.data.Node;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.util.Constants;
import net.mynero.wallet.R;
import net.mynero.wallet.data.DefaultNodes;
import net.mynero.wallet.data.Node;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.util.Constants;
import java.util.ArrayList;
import java.util.List;

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.adapter;
package net.mynero.wallet.adapter;
import static com.m2049r.xmrwallet.util.DateHelper.DATETIME_FORMATTER;
import static net.mynero.wallet.util.DateHelper.DATETIME_FORMATTER;
import android.text.Html;
import android.text.Spanned;
@ -28,11 +28,12 @@ import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.progressindicator.CircularProgressIndicator;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.UserNotes;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.ThemeHelper;
import net.mynero.wallet.R;
import net.mynero.wallet.data.UserNotes;
import net.mynero.wallet.model.TransactionInfo;
import net.mynero.wallet.util.Helper;
import net.mynero.wallet.util.ThemeHelper;
import java.util.ArrayList;
import java.util.Calendar;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.data;
package net.mynero.wallet.data;
// Nodes stolen from https://moneroworld.com/#nodes

View file

@ -14,11 +14,11 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.data;
package net.mynero.wallet.data;
import com.m2049r.xmrwallet.model.NetworkType;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.util.OnionHelper;
import net.mynero.wallet.model.NetworkType;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.util.OnionHelper;
import java.io.UnsupportedEncodingException;
import java.net.InetAddress;

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.data;
package net.mynero.wallet.data;
import com.m2049r.xmrwallet.model.PendingTransaction;
import net.mynero.wallet.model.PendingTransaction;
public class PendingTx {
final public PendingTransaction.Status status;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.data;
package net.mynero.wallet.data;
import java.util.regex.Pattern;

View file

@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.data;
package net.mynero.wallet.data;
import android.os.Parcel;
import android.os.Parcelable;
import com.m2049r.xmrwallet.model.PendingTransaction;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.util.Helper;
import net.mynero.wallet.model.PendingTransaction;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.util.Helper;
// https://stackoverflow.com/questions/2139134/how-to-send-an-object-from-one-android-activity-to-another-using-intents
public class TxData implements Parcelable {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.data;
package net.mynero.wallet.data;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.dialog;
package net.mynero.wallet.fragment.dialog;
import android.content.Context;
import android.os.Bundle;
@ -14,14 +14,13 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.util.Constants;
import com.m2049r.xmrwallet.util.Helper;
import net.mynero.wallet.R;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.util.Constants;
import net.mynero.wallet.util.Helper;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public class AddNodeBottomSheetDialog extends BottomSheetDialogFragment {
public AddNodeListener listener = null;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.dialog;
package net.mynero.wallet.fragment.dialog;
import android.os.Bundle;
import android.view.LayoutInflater;
@ -11,8 +11,8 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.util.Helper;
import net.mynero.wallet.R;
import net.mynero.wallet.util.Helper;
public class InformationBottomSheetDialog extends BottomSheetDialogFragment {
public boolean showCopyButton = false;

View file

@ -1,14 +1,10 @@
package com.m2049r.xmrwallet.fragment.dialog;
package net.mynero.wallet.fragment.dialog;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Patterns;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@ -16,21 +12,18 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.adapter.NodeSelectionAdapter;
import com.m2049r.xmrwallet.data.DefaultNodes;
import com.m2049r.xmrwallet.data.Node;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.util.Constants;
import com.m2049r.xmrwallet.util.Helper;
import net.mynero.wallet.R;
import net.mynero.wallet.adapter.NodeSelectionAdapter;
import net.mynero.wallet.data.DefaultNodes;
import net.mynero.wallet.data.Node;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.util.Constants;
import org.json.JSONArray;
import org.json.JSONException;
import java.util.ArrayList;
import java.util.Collections;
public class NodeSelectionBottomSheetDialog extends BottomSheetDialogFragment implements NodeSelectionAdapter.NodeSelectionAdapterListener {
private NodeSelectionAdapter adapter = null;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.dialog;
package net.mynero.wallet.fragment.dialog;
import android.os.Bundle;
import android.view.LayoutInflater;
@ -12,10 +12,10 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.util.Constants;
import com.m2049r.xmrwallet.util.Helper;
import net.mynero.wallet.R;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.util.Constants;
import net.mynero.wallet.util.Helper;
import java.io.File;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.dialog;
package net.mynero.wallet.fragment.dialog;
import android.graphics.Bitmap;
import android.os.Bundle;
@ -19,12 +19,12 @@ import com.google.zxing.WriterException;
import com.google.zxing.common.BitMatrix;
import com.google.zxing.qrcode.QRCodeWriter;
import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.service.AddressService;
import com.m2049r.xmrwallet.util.DayNightMode;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.NightmodeHelper;
import net.mynero.wallet.R;
import net.mynero.wallet.data.Subaddress;
import net.mynero.wallet.service.AddressService;
import net.mynero.wallet.util.DayNightMode;
import net.mynero.wallet.util.Helper;
import net.mynero.wallet.util.NightmodeHelper;
import java.util.HashMap;
import java.util.Map;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.dialog;
package net.mynero.wallet.fragment.dialog;
import android.app.Activity;
import android.content.Context;
@ -24,16 +24,14 @@ import com.google.android.material.bottomsheet.BottomSheetDialogFragment;
import com.google.zxing.client.android.Intents;
import com.journeyapps.barcodescanner.ScanContract;
import com.journeyapps.barcodescanner.ScanOptions;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.model.PendingTransaction;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.service.BalanceService;
import com.m2049r.xmrwallet.service.TxService;
import com.m2049r.xmrwallet.util.Constants;
import com.m2049r.xmrwallet.util.Helper;
import com.m2049r.xmrwallet.util.UriData;
import net.mynero.wallet.R;
import net.mynero.wallet.model.PendingTransaction;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.service.BalanceService;
import net.mynero.wallet.service.TxService;
import net.mynero.wallet.util.Helper;
import net.mynero.wallet.util.UriData;
import java.util.HashMap;
import java.util.List;
public class SendBottomSheetDialog extends BottomSheetDialogFragment {

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.home;
package net.mynero.wallet.fragment.home;
import android.os.Bundle;
import android.view.LayoutInflater;
@ -21,17 +21,17 @@ import androidx.navigation.fragment.NavHostFragment;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.m2049r.xmrwallet.MainActivity;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.adapter.TransactionInfoAdapter;
import com.m2049r.xmrwallet.fragment.dialog.ReceiveBottomSheetDialog;
import com.m2049r.xmrwallet.fragment.dialog.SendBottomSheetDialog;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.BalanceService;
import com.m2049r.xmrwallet.service.BlockchainService;
import com.m2049r.xmrwallet.service.HistoryService;
import net.mynero.wallet.MainActivity;
import net.mynero.wallet.R;
import net.mynero.wallet.adapter.TransactionInfoAdapter;
import net.mynero.wallet.fragment.dialog.ReceiveBottomSheetDialog;
import net.mynero.wallet.fragment.dialog.SendBottomSheetDialog;
import net.mynero.wallet.model.TransactionInfo;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.service.BalanceService;
import net.mynero.wallet.service.BlockchainService;
import net.mynero.wallet.service.HistoryService;
import java.util.Collections;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.home;
package net.mynero.wallet.fragment.home;
import androidx.lifecycle.ViewModel;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.onboarding;
package net.mynero.wallet.fragment.onboarding;
import android.os.Bundle;
import android.text.Editable;
@ -20,12 +20,12 @@ import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.ViewModelProvider;
import androidx.navigation.fragment.NavHostFragment;
import com.m2049r.xmrwallet.MainActivity;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.util.Constants;
import net.mynero.wallet.MainActivity;
import net.mynero.wallet.R;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.util.Constants;
import java.io.File;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.onboarding;
package net.mynero.wallet.fragment.onboarding;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.fragment.settings;
package net.mynero.wallet.fragment.settings;
import android.os.AsyncTask;
import android.os.Bundle;
@ -18,23 +18,22 @@ import androidx.annotation.Nullable;
import androidx.appcompat.widget.SwitchCompat;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.DefaultNodes;
import com.m2049r.xmrwallet.data.Node;
import com.m2049r.xmrwallet.fragment.dialog.AddNodeBottomSheetDialog;
import com.m2049r.xmrwallet.fragment.dialog.InformationBottomSheetDialog;
import com.m2049r.xmrwallet.fragment.dialog.NodeSelectionBottomSheetDialog;
import com.m2049r.xmrwallet.fragment.dialog.PasswordBottomSheetDialog;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.BlockchainService;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.util.Constants;
import com.m2049r.xmrwallet.util.DayNightMode;
import com.m2049r.xmrwallet.util.NightmodeHelper;
import net.mynero.wallet.R;
import net.mynero.wallet.data.DefaultNodes;
import net.mynero.wallet.data.Node;
import net.mynero.wallet.fragment.dialog.AddNodeBottomSheetDialog;
import net.mynero.wallet.fragment.dialog.InformationBottomSheetDialog;
import net.mynero.wallet.fragment.dialog.NodeSelectionBottomSheetDialog;
import net.mynero.wallet.fragment.dialog.PasswordBottomSheetDialog;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.service.BlockchainService;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.util.Constants;
import net.mynero.wallet.util.DayNightMode;
import net.mynero.wallet.util.NightmodeHelper;
public class SettingsFragment extends Fragment implements PasswordBottomSheetDialog.PasswordListener, NodeSelectionBottomSheetDialog.NodeSelectionDialogListener, AddNodeBottomSheetDialog.AddNodeListener {

View file

@ -1,18 +1,14 @@
package com.m2049r.xmrwallet.fragment.settings;
package net.mynero.wallet.fragment.settings;
import android.app.Activity;
import android.os.AsyncTask;
import android.util.Patterns;
import android.widget.Toast;
import androidx.lifecycle.ViewModel;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.data.DefaultNodes;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.service.TxService;
import com.m2049r.xmrwallet.util.Constants;
import net.mynero.wallet.data.DefaultNodes;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.service.PrefService;
import net.mynero.wallet.util.Constants;
public class SettingsViewModel extends ViewModel {

View file

@ -1,39 +1,24 @@
package com.m2049r.xmrwallet.fragment.transaction;
package net.mynero.wallet.fragment.transaction;
import static com.m2049r.xmrwallet.util.DateHelper.DATETIME_FORMATTER;
import static net.mynero.wallet.util.DateHelper.DATETIME_FORMATTER;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.navigation.fragment.NavHostFragment;
import com.m2049r.xmrwallet.MainActivity;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.PrefService;
import com.m2049r.xmrwallet.util.Constants;
import com.m2049r.xmrwallet.util.Helper;
import net.mynero.wallet.R;
import net.mynero.wallet.model.TransactionInfo;
import net.mynero.wallet.util.Constants;
import net.mynero.wallet.util.Helper;
import java.io.File;
import java.util.Calendar;
import java.util.Date;
import java.util.Objects;

View file

@ -1,14 +1,12 @@
package com.m2049r.xmrwallet.fragment.transaction;
package net.mynero.wallet.fragment.transaction;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Transfer;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.service.HistoryService;
import net.mynero.wallet.model.TransactionInfo;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletManager;
public class TransactionViewModel extends ViewModel {
private final MutableLiveData<TransactionInfo> _transaction = new MutableLiveData<>(null);

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.livedata;
package net.mynero.wallet.livedata;
import android.util.Log;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
public enum NetworkType {
NetworkType_Mainnet(0),

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
public class PendingTransaction {
static {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
import java.util.ArrayList;
import java.util.Iterator;

View file

@ -14,12 +14,12 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
import android.os.Parcel;
import android.os.Parcelable;
import com.m2049r.xmrwallet.data.Subaddress;
import net.mynero.wallet.data.Subaddress;
import java.util.List;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
import android.os.Parcel;
import android.os.Parcelable;

View file

@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.data.TxData;
import net.mynero.wallet.data.Subaddress;
import net.mynero.wallet.data.TxData;
import java.io.File;
import java.text.SimpleDateFormat;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
public interface WalletListener {
/**

View file

@ -14,10 +14,10 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.model;
package net.mynero.wallet.model;
import com.m2049r.xmrwallet.data.Node;
import com.m2049r.xmrwallet.util.RestoreHeight;
import net.mynero.wallet.data.Node;
import net.mynero.wallet.util.RestoreHeight;
import java.io.File;
import java.io.FilenameFilter;

View file

@ -1,9 +1,9 @@
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
import com.m2049r.xmrwallet.data.Subaddress;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import net.mynero.wallet.data.Subaddress;
import net.mynero.wallet.model.TransactionInfo;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletManager;
public class AddressService extends ServiceBase {
public static AddressService instance = null;

View file

@ -1,9 +1,9 @@
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import com.m2049r.xmrwallet.model.WalletManager;
import net.mynero.wallet.model.WalletManager;
public class BalanceService extends ServiceBase {
public static BalanceService instance = null;

View file

@ -1,10 +1,10 @@
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletManager;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletManager;
public class BlockchainService extends ServiceBase {
public static BlockchainService instance = null;

View file

@ -1,10 +1,10 @@
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import com.m2049r.xmrwallet.model.TransactionInfo;
import com.m2049r.xmrwallet.model.WalletManager;
import net.mynero.wallet.model.TransactionInfo;
import net.mynero.wallet.model.WalletManager;
import java.util.List;

View file

@ -15,18 +15,18 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
import static com.m2049r.xmrwallet.model.Wallet.SWEEP_ALL;
import static net.mynero.wallet.model.Wallet.SWEEP_ALL;
import com.m2049r.xmrwallet.data.DefaultNodes;
import com.m2049r.xmrwallet.data.Node;
import com.m2049r.xmrwallet.data.TxData;
import com.m2049r.xmrwallet.model.PendingTransaction;
import com.m2049r.xmrwallet.model.Wallet;
import com.m2049r.xmrwallet.model.WalletListener;
import com.m2049r.xmrwallet.model.WalletManager;
import com.m2049r.xmrwallet.util.Constants;
import net.mynero.wallet.data.DefaultNodes;
import net.mynero.wallet.data.Node;
import net.mynero.wallet.data.TxData;
import net.mynero.wallet.model.PendingTransaction;
import net.mynero.wallet.model.Wallet;
import net.mynero.wallet.model.WalletListener;
import net.mynero.wallet.model.WalletManager;
import net.mynero.wallet.util.Constants;
/**

View file

@ -1,9 +1,9 @@
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
import android.content.Context;
import android.content.SharedPreferences;
import com.m2049r.xmrwallet.MoneroApplication;
import net.mynero.wallet.MoneroApplication;
public class PrefService extends ServiceBase {
public static SharedPreferences instance = null;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
public class ServiceBase {
private final MoneroHandlerThread thread;

View file

@ -1,6 +1,6 @@
package com.m2049r.xmrwallet.service;
package net.mynero.wallet.service;
import com.m2049r.xmrwallet.model.PendingTransaction;
import net.mynero.wallet.model.PendingTransaction;
public class TxService extends ServiceBase {
public static TxService instance = null;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
public class Constants {
public static final String WALLET_NAME = "xmr_wallet";

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import androidx.appcompat.app.AppCompatDelegate;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import android.Manifest;
import android.app.Activity;
@ -40,8 +40,8 @@ import android.widget.Toast;
import androidx.activity.result.ActivityResultLauncher;
import androidx.core.content.ContextCompat;
import com.m2049r.xmrwallet.R;
import com.m2049r.xmrwallet.model.WalletManager;
import net.mynero.wallet.R;
import net.mynero.wallet.model.WalletManager;
import java.io.File;
import java.io.IOException;

View file

@ -15,7 +15,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import android.annotation.TargetApi;
import android.content.Context;

View file

@ -1,4 +1,4 @@
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import android.Manifest;
import android.content.Context;
@ -6,8 +6,8 @@ import android.content.pm.PackageManager;
import android.os.Environment;
import android.preference.PreferenceManager;
import com.m2049r.xmrwallet.BuildConfig;
import com.m2049r.xmrwallet.model.WalletManager;
import net.mynero.wallet.BuildConfig;
import net.mynero.wallet.model.WalletManager;
import java.io.BufferedReader;
import java.io.File;

View file

@ -14,14 +14,14 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Configuration;
import android.preference.PreferenceManager;
import com.m2049r.xmrwallet.R;
import net.mynero.wallet.R;
import java.util.ArrayList;
import java.util.Locale;

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import com.m2049r.xmrwallet.service.MoneroHandlerThread;
import net.mynero.wallet.service.MoneroHandlerThread;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.Executor;

View file

@ -14,13 +14,13 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import android.annotation.SuppressLint;
import androidx.appcompat.app.AppCompatDelegate;
import com.m2049r.xmrwallet.service.PrefService;
import net.mynero.wallet.service.PrefService;
public class NightmodeHelper {
public static DayNightMode getPreferredNightmode() {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
public class OnionHelper {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import java.text.ParseException;
import java.text.SimpleDateFormat;

View file

@ -1,7 +1,7 @@
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import com.m2049r.xmrwallet.model.NetworkType;
import com.m2049r.xmrwallet.model.WalletManager;
import net.mynero.wallet.model.NetworkType;
import net.mynero.wallet.model.WalletManager;
import okhttp3.HttpUrl;

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import android.app.Activity;
import android.content.Context;
@ -25,7 +25,7 @@ import android.util.TypedValue;
import androidx.annotation.ColorInt;
import androidx.annotation.NonNull;
import com.m2049r.xmrwallet.R;
import net.mynero.wallet.R;
public class ThemeHelper {
static public int getThemedResourceId(Context ctx, int attrId) {

View file

@ -1,6 +1,6 @@
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import com.m2049r.xmrwallet.model.Wallet;
import net.mynero.wallet.model.Wallet;
import java.util.HashMap;

View file

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
tools:context="net.mynero.wallet.MainActivity">
<androidx.fragment.app.FragmentContainerView
android:id="@+id/nav_host_fragment"

View file

@ -4,7 +4,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".fragment.home.HomeFragment">
tools:context="net.mynero.wallet.fragment.home.HomeFragment">
<ProgressBar
android:id="@+id/sync_progress_bar"

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
tools:context=".fragment.settings.SettingsFragment">
tools:context="net.mynero.wallet.fragment.settings.SettingsFragment">
<TextView
android:id="@+id/create_wallet_textview"

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
tools:context=".fragment.settings.SettingsFragment">
tools:context="net.mynero.wallet.fragment.settings.SettingsFragment">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">

View file

@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="24dp"
tools:context=".fragment.settings.SettingsFragment">
tools:context="net.mynero.wallet.fragment.settings.SettingsFragment">
<TextView
android:id="@+id/transaction_title_textview"

View file

@ -6,7 +6,7 @@
app:startDestination="@id/main_fragment">
<fragment
android:id="@+id/main_fragment"
android:name="com.m2049r.xmrwallet.fragment.home.HomeFragment"
android:name="net.mynero.wallet.fragment.home.HomeFragment"
android:label="fragment_main"
tools:layout="@layout/fragment_home">
<action
@ -22,23 +22,23 @@
app:destination="@id/transaction_fragment">
<argument
android:name="nav_arg_txinfo"
app:argType="com.m2049r.xmrwallet.model.TransactionInfo"
app:argType="net.mynero.wallet.model.TransactionInfo"
app:nullable="true"/>
</action>
</fragment>
<fragment
android:id="@+id/settings_fragment"
android:name="com.m2049r.xmrwallet.fragment.settings.SettingsFragment"
android:name="net.mynero.wallet.fragment.settings.SettingsFragment"
android:label="fragment_send_amount"
tools:layout="@layout/fragment_settings" />
<fragment
android:id="@+id/onboarding_fragment"
android:name="com.m2049r.xmrwallet.fragment.onboarding.OnboardingFragment"
android:name="net.mynero.wallet.fragment.onboarding.OnboardingFragment"
android:label="fragment_onboarding"
tools:layout="@layout/fragment_settings" />
<fragment
android:id="@+id/transaction_fragment"
android:name="com.m2049r.xmrwallet.fragment.transaction.TransactionFragment"
android:name="net.mynero.wallet.fragment.transaction.TransactionFragment"
android:label="fragment_onboarding"
tools:layout="@layout/fragment_settings" />
</navigation>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE resources [<!ENTITY nbsp "&#160;">]>
<resources xmlns:tools="http://schemas.android.com/tools" tools:locale="en">
<string name="app_name" translatable="false">monerujo</string>
<string name="app_name" translatable="false">MyNero</string>
<!--TODO deleteme-->
<!--TODO deleteme-->

View file

@ -14,12 +14,10 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import org.junit.Test;
import java.math.BigDecimal;
import static org.junit.Assert.assertTrue;
public class HelperTest {

View file

@ -14,7 +14,7 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import org.junit.Rule;
import org.junit.Test;

View file

@ -14,9 +14,9 @@
* limitations under the License.
*/
package com.m2049r.xmrwallet.util;
package net.mynero.wallet.util;
import com.m2049r.xmrwallet.data.UserNotes;
import net.mynero.wallet.data.UserNotes;
import org.junit.Test;