mirror of
https://github.com/wownero/wownerujo.git
synced 2026-11-22 00:03:58 +01:00
Upgrade to monero v0.11.0.0 (#50)
This commit is contained in:
@@ -465,7 +465,7 @@ JNIEXPORT jboolean JNICALL
|
||||
Java_com_m2049r_xmrwallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
|
||||
jobject walletInstance) {
|
||||
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, walletInstance);
|
||||
bool closeSuccess = Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(wallet);
|
||||
bool closeSuccess = Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(wallet, false);
|
||||
if (closeSuccess) {
|
||||
MyWalletListener *walletListener = getHandle<MyWalletListener>(env, walletInstance,
|
||||
"listenerHandle");
|
||||
@@ -563,8 +563,13 @@ Java_com_m2049r_xmrwallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_m2049r_xmrwallet_model_Wallet_getSecretViewKey(JNIEnv *env, jobject instance) {
|
||||
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, instance);
|
||||
//return env->NewStringUTF(wallet->secretViewKey().c_str()); // changed in head
|
||||
return env->NewStringUTF(wallet->privateViewKey().c_str());
|
||||
return env->NewStringUTF(wallet->secretViewKey().c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_m2049r_xmrwallet_model_Wallet_getSecretSpendKey(JNIEnv *env, jobject instance) {
|
||||
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, instance);
|
||||
return env->NewStringUTF(wallet->secretSpendKey().c_str());
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL
|
||||
|
||||
@@ -100,6 +100,7 @@ public class GenerateReviewFragment extends Fragment {
|
||||
String address;
|
||||
String seed;
|
||||
String viewKey;
|
||||
String spendKey;
|
||||
boolean isWatchOnly;
|
||||
Wallet.Status status;
|
||||
|
||||
@@ -129,6 +130,7 @@ public class GenerateReviewFragment extends Fragment {
|
||||
address = wallet.getAddress();
|
||||
seed = wallet.getSeed();
|
||||
viewKey = wallet.getSecretViewKey();
|
||||
spendKey = isWatchOnly ? getActivity().getString(R.string.watchonly_label) : wallet.getSecretSpendKey();
|
||||
isWatchOnly = wallet.isWatchOnly();
|
||||
if (closeWallet) wallet.close();
|
||||
return true;
|
||||
@@ -147,12 +149,7 @@ public class GenerateReviewFragment extends Fragment {
|
||||
tvWalletAddress.setText(address);
|
||||
tvWalletMnemonic.setText(seed);
|
||||
tvWalletViewKey.setText(viewKey);
|
||||
String spend = isWatchOnly ? "" : "not available - use seed for recovery";
|
||||
if (spend.length() > 0) { //TODO should be == 64, but spendkey is not in the API yet
|
||||
tvWalletSpendKey.setText(spend);
|
||||
} else {
|
||||
tvWalletSpendKey.setText(getString(R.string.generate_wallet_watchonly));
|
||||
}
|
||||
tvWalletSpendKey.setText(spendKey);
|
||||
} else {
|
||||
// TODO show proper error message
|
||||
// TODO end the fragment
|
||||
|
||||
@@ -511,7 +511,6 @@ public class LoginActivity extends AppCompatActivity
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class MyProgressDialog extends ProgressDialog {
|
||||
Activity activity;
|
||||
|
||||
|
||||
@@ -67,9 +67,10 @@ public class SendFragment extends Fragment {
|
||||
Button bReallySend;
|
||||
ProgressBar pbProgress;
|
||||
|
||||
final static int Mixins[] = {4, 6, 8, 10, 13}; // must match the layout XML
|
||||
final static int Mixins[] = {4, 7, 12, 25}; // must match the layout XML
|
||||
final static PendingTransaction.Priority Priorities[] =
|
||||
{PendingTransaction.Priority.Priority_Low,
|
||||
{PendingTransaction.Priority.Priority_Default,
|
||||
PendingTransaction.Priority.Priority_Low,
|
||||
PendingTransaction.Priority.Priority_Medium,
|
||||
PendingTransaction.Priority.Priority_High}; // must match the layout XML
|
||||
|
||||
@@ -443,6 +444,7 @@ public class SendFragment extends Fragment {
|
||||
}
|
||||
});
|
||||
builder.setMessage(errorText);
|
||||
builder.setCancelable(false);
|
||||
builder.create().show();
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ public class PendingTransaction {
|
||||
}
|
||||
|
||||
public enum Priority {
|
||||
Priority_Default(0),
|
||||
Priority_Low(1),
|
||||
Priority_Medium(2),
|
||||
Priority_High(3),
|
||||
@@ -41,6 +42,8 @@ public class PendingTransaction {
|
||||
|
||||
public static Priority fromInteger(int n) {
|
||||
switch (n) {
|
||||
case 0:
|
||||
return Priority_Default;
|
||||
case 1:
|
||||
return Priority_Low;
|
||||
case 2:
|
||||
|
||||
@@ -81,6 +81,8 @@ public class Wallet {
|
||||
|
||||
public native String getSecretViewKey();
|
||||
|
||||
public native String getSecretSpendKey();
|
||||
|
||||
public boolean store() {
|
||||
return store("");
|
||||
}
|
||||
|
||||
@@ -193,14 +193,14 @@
|
||||
<string name="big_amount">999999.999999999999</string>
|
||||
|
||||
<string-array name="mixin">
|
||||
<item>Mixin 4</item>
|
||||
<item>Mixin 6</item>
|
||||
<item>Mixin 8</item>
|
||||
<item>Mixin 10</item>
|
||||
<item>Mixin 13</item>
|
||||
<item>Ring Size 5</item>
|
||||
<item>Ring Size 8</item>
|
||||
<item>Ring Size 13</item>
|
||||
<item>Ring Size 26</item>
|
||||
</string-array>
|
||||
|
||||
<string-array name="priority">
|
||||
<item>Default Priority</item>
|
||||
<item>Low Priority</item>
|
||||
<item>Medium Priority</item>
|
||||
<item>High Priority</item>
|
||||
|
||||
Reference in New Issue
Block a user