mirror of https://github.com/m2049r/xmrwallet.git
Bugfix: crashing on android 5 & 6 (new wallet, receive, ...) (#83)
* getAddress() mess fixed * v0.8.0.3
This commit is contained in:
parent
cc46dc06c4
commit
793d984200
|
@ -8,8 +8,8 @@ android {
|
|||
applicationId "com.m2049r.xmrwallet"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 25
|
||||
versionCode 15
|
||||
versionName "0.8.0.2"
|
||||
versionCode 16
|
||||
versionName "0.8.0.3"
|
||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||
externalNativeBuild {
|
||||
cmake {
|
||||
|
|
|
@ -531,8 +531,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) {
|
||||
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, instance);
|
||||
const char *address = wallet->address().c_str();
|
||||
return env->NewStringUTF(address);
|
||||
return env->NewStringUTF(wallet->address().c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
|
|
|
@ -36,7 +36,6 @@ public class Wallet {
|
|||
|
||||
Wallet(long handle) {
|
||||
this.handle = handle;
|
||||
getAddress(); // cache address for later
|
||||
}
|
||||
|
||||
public enum Status {
|
||||
|
@ -73,10 +72,6 @@ public class Wallet {
|
|||
if (address == null) {
|
||||
address = getAddressJ();
|
||||
}
|
||||
if (!Wallet.isAddressValid(address, WalletManager.getInstance().isTestNet())) {
|
||||
// just die!
|
||||
throw new IllegalStateException("Wallet returned invalid address: " + address);
|
||||
}
|
||||
return address;
|
||||
}
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue