mirror of https://github.com/m2049r/xmrwallet.git
This reverts commit 9cbeaa7942
.
This commit is contained in:
parent
9cbeaa7942
commit
dec67e0675
|
@ -1,3 +1,2 @@
|
||||||
.gradle
|
.gradle
|
||||||
build
|
build
|
||||||
local.properties
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ target_link_libraries( monerujo
|
||||||
|
|
||||||
blockchain_db
|
blockchain_db
|
||||||
lmdb
|
lmdb
|
||||||
easylogging
|
#easylogging # not for 0.10.3.1
|
||||||
unbound
|
unbound
|
||||||
p2p
|
p2p
|
||||||
|
|
||||||
|
|
|
@ -465,7 +465,7 @@ JNIEXPORT jboolean JNICALL
|
||||||
Java_com_m2049r_xmrwallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
|
Java_com_m2049r_xmrwallet_model_WalletManager_closeJ(JNIEnv *env, jobject instance,
|
||||||
jobject walletInstance) {
|
jobject walletInstance) {
|
||||||
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, walletInstance);
|
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, walletInstance);
|
||||||
bool closeSuccess = Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(wallet, false);
|
bool closeSuccess = Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(wallet);
|
||||||
if (closeSuccess) {
|
if (closeSuccess) {
|
||||||
MyWalletListener *walletListener = getHandle<MyWalletListener>(env, walletInstance,
|
MyWalletListener *walletListener = getHandle<MyWalletListener>(env, walletInstance,
|
||||||
"listenerHandle");
|
"listenerHandle");
|
||||||
|
@ -563,13 +563,8 @@ Java_com_m2049r_xmrwallet_model_Wallet_getIntegratedAddress(JNIEnv *env, jobject
|
||||||
JNIEXPORT jstring JNICALL
|
JNIEXPORT jstring JNICALL
|
||||||
Java_com_m2049r_xmrwallet_model_Wallet_getSecretViewKey(JNIEnv *env, jobject instance) {
|
Java_com_m2049r_xmrwallet_model_Wallet_getSecretViewKey(JNIEnv *env, jobject instance) {
|
||||||
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, instance);
|
Bitmonero::Wallet *wallet = getHandle<Bitmonero::Wallet>(env, instance);
|
||||||
return env->NewStringUTF(wallet->secretViewKey().c_str());
|
//return env->NewStringUTF(wallet->secretViewKey().c_str()); // changed in head
|
||||||
}
|
return env->NewStringUTF(wallet->privateViewKey().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
|
JNIEXPORT jboolean JNICALL
|
||||||
|
|
|
@ -100,7 +100,6 @@ public class GenerateReviewFragment extends Fragment {
|
||||||
String address;
|
String address;
|
||||||
String seed;
|
String seed;
|
||||||
String viewKey;
|
String viewKey;
|
||||||
String spendKey;
|
|
||||||
boolean isWatchOnly;
|
boolean isWatchOnly;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -124,7 +123,6 @@ public class GenerateReviewFragment extends Fragment {
|
||||||
address = wallet.getAddress();
|
address = wallet.getAddress();
|
||||||
seed = wallet.getSeed();
|
seed = wallet.getSeed();
|
||||||
viewKey = wallet.getSecretViewKey();
|
viewKey = wallet.getSecretViewKey();
|
||||||
spendKey = isWatchOnly ? getActivity().getString(R.string.watchonly_label) : wallet.getSecretSpendKey();
|
|
||||||
isWatchOnly = wallet.isWatchOnly();
|
isWatchOnly = wallet.isWatchOnly();
|
||||||
if (closeWallet) wallet.close();
|
if (closeWallet) wallet.close();
|
||||||
return true;
|
return true;
|
||||||
|
@ -143,7 +141,12 @@ public class GenerateReviewFragment extends Fragment {
|
||||||
tvWalletAddress.setText(address);
|
tvWalletAddress.setText(address);
|
||||||
tvWalletMnemonic.setText(seed);
|
tvWalletMnemonic.setText(seed);
|
||||||
tvWalletViewKey.setText(viewKey);
|
tvWalletViewKey.setText(viewKey);
|
||||||
tvWalletSpendKey.setText(spendKey);
|
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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
hideProgress();
|
hideProgress();
|
||||||
}
|
}
|
||||||
|
|
|
@ -511,6 +511,7 @@ public class LoginActivity extends AppCompatActivity
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private class MyProgressDialog extends ProgressDialog {
|
private class MyProgressDialog extends ProgressDialog {
|
||||||
Activity activity;
|
Activity activity;
|
||||||
|
|
||||||
|
|
|
@ -67,10 +67,9 @@ public class SendFragment extends Fragment {
|
||||||
Button bReallySend;
|
Button bReallySend;
|
||||||
ProgressBar pbProgress;
|
ProgressBar pbProgress;
|
||||||
|
|
||||||
final static int Mixins[] = {4, 7, 12, 25}; // must match the layout XML
|
final static int Mixins[] = {4, 6, 8, 10, 13}; // must match the layout XML
|
||||||
final static PendingTransaction.Priority Priorities[] =
|
final static PendingTransaction.Priority Priorities[] =
|
||||||
{PendingTransaction.Priority.Priority_Default,
|
{PendingTransaction.Priority.Priority_Low,
|
||||||
PendingTransaction.Priority.Priority_Low,
|
|
||||||
PendingTransaction.Priority.Priority_Medium,
|
PendingTransaction.Priority.Priority_Medium,
|
||||||
PendingTransaction.Priority.Priority_High}; // must match the layout XML
|
PendingTransaction.Priority.Priority_High}; // must match the layout XML
|
||||||
|
|
||||||
|
@ -444,7 +443,6 @@ public class SendFragment extends Fragment {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
builder.setMessage(errorText);
|
builder.setMessage(errorText);
|
||||||
builder.setCancelable(false);
|
|
||||||
builder.create().show();
|
builder.create().show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,6 @@ public class PendingTransaction {
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Priority {
|
public enum Priority {
|
||||||
Priority_Default(0),
|
|
||||||
Priority_Low(1),
|
Priority_Low(1),
|
||||||
Priority_Medium(2),
|
Priority_Medium(2),
|
||||||
Priority_High(3),
|
Priority_High(3),
|
||||||
|
@ -42,8 +41,6 @@ public class PendingTransaction {
|
||||||
|
|
||||||
public static Priority fromInteger(int n) {
|
public static Priority fromInteger(int n) {
|
||||||
switch (n) {
|
switch (n) {
|
||||||
case 0:
|
|
||||||
return Priority_Default;
|
|
||||||
case 1:
|
case 1:
|
||||||
return Priority_Low;
|
return Priority_Low;
|
||||||
case 2:
|
case 2:
|
||||||
|
|
|
@ -81,8 +81,6 @@ public class Wallet {
|
||||||
|
|
||||||
public native String getSecretViewKey();
|
public native String getSecretViewKey();
|
||||||
|
|
||||||
public native String getSecretSpendKey();
|
|
||||||
|
|
||||||
public boolean store() {
|
public boolean store() {
|
||||||
return store("");
|
return store("");
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<resources>
|
||||||
|
<declare-styleable name="MyView">
|
||||||
|
<attr name="exampleString" format="string" />
|
||||||
|
<attr name="exampleDimension" format="dimension" />
|
||||||
|
<attr name="exampleColor" format="color" />
|
||||||
|
<attr name="exampleDrawable" format="color|reference" />
|
||||||
|
</declare-styleable>
|
||||||
|
</resources>
|
|
@ -190,14 +190,14 @@
|
||||||
<string name="big_amount">999999.999999999999</string>
|
<string name="big_amount">999999.999999999999</string>
|
||||||
|
|
||||||
<string-array name="mixin">
|
<string-array name="mixin">
|
||||||
<item>Ringsize 5</item>
|
<item>Mixin 4</item>
|
||||||
<item>Ringsize 8</item>
|
<item>Mixin 6</item>
|
||||||
<item>Ringsize 13</item>
|
<item>Mixin 8</item>
|
||||||
<item>Ringsize 26</item>
|
<item>Mixin 10</item>
|
||||||
|
<item>Mixin 13</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
<string-array name="priority">
|
<string-array name="priority">
|
||||||
<item>Default Priority</item>
|
|
||||||
<item>Low Priority</item>
|
<item>Low Priority</item>
|
||||||
<item>Medium Priority</item>
|
<item>Medium Priority</item>
|
||||||
<item>High Priority</item>
|
<item>High Priority</item>
|
||||||
|
|
|
@ -156,7 +156,6 @@ struct TransactionInfo
|
||||||
virtual uint64_t fee() const = 0;
|
virtual uint64_t fee() const = 0;
|
||||||
virtual uint64_t blockHeight() const = 0;
|
virtual uint64_t blockHeight() const = 0;
|
||||||
virtual uint64_t confirmations() const = 0;
|
virtual uint64_t confirmations() const = 0;
|
||||||
virtual uint64_t unlockTime() const = 0;
|
|
||||||
//! transaction_id
|
//! transaction_id
|
||||||
virtual std::string hash() const = 0;
|
virtual std::string hash() const = 0;
|
||||||
virtual std::time_t timestamp() const = 0;
|
virtual std::time_t timestamp() const = 0;
|
||||||
|
@ -313,28 +312,10 @@ struct Wallet
|
||||||
virtual std::string integratedAddress(const std::string &payment_id) const = 0;
|
virtual std::string integratedAddress(const std::string &payment_id) const = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief secretViewKey - returns secret view key
|
* \brief privateViewKey - returns private view key
|
||||||
* \return - secret view key
|
* \return - private view key
|
||||||
*/
|
*/
|
||||||
virtual std::string secretViewKey() const = 0;
|
virtual std::string privateViewKey() const = 0;
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief publicViewKey - returns public view key
|
|
||||||
* \return - public view key
|
|
||||||
*/
|
|
||||||
virtual std::string publicViewKey() const = 0;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief secretSpendKey - returns secret spend key
|
|
||||||
* \return - secret spend key
|
|
||||||
*/
|
|
||||||
virtual std::string secretSpendKey() const = 0;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief publicSpendKey - returns public spend key
|
|
||||||
* \return - public spend key
|
|
||||||
*/
|
|
||||||
virtual std::string publicSpendKey() const = 0;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief store - stores wallet to file.
|
* \brief store - stores wallet to file.
|
||||||
|
@ -380,12 +361,6 @@ struct Wallet
|
||||||
*/
|
*/
|
||||||
virtual void setRefreshFromBlockHeight(uint64_t refresh_from_block_height) = 0;
|
virtual void setRefreshFromBlockHeight(uint64_t refresh_from_block_height) = 0;
|
||||||
|
|
||||||
/*!
|
|
||||||
* \brief getRestoreHeight - get wallet creation height
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
virtual uint64_t getRefreshFromBlockHeight() const = 0;
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief setRecoveringFromSeed - set state recover form seed
|
* \brief setRecoveringFromSeed - set state recover form seed
|
||||||
*
|
*
|
||||||
|
@ -596,9 +571,6 @@ struct Wallet
|
||||||
virtual bool verifySignedMessage(const std::string &message, const std::string &addres, const std::string &signature) const = 0;
|
virtual bool verifySignedMessage(const std::string &message, const std::string &addres, const std::string &signature) const = 0;
|
||||||
|
|
||||||
virtual bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error) = 0;
|
virtual bool parse_uri(const std::string &uri, std::string &address, std::string &payment_id, uint64_t &amount, std::string &tx_description, std::string &recipient_name, std::vector<std::string> &unknown_parameters, std::string &error) = 0;
|
||||||
|
|
||||||
virtual std::string getDefaultDataDir() const = 0;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* \brief rescanSpent - Rescan spent outputs - Can only be used with trusted daemon
|
* \brief rescanSpent - Rescan spent outputs - Can only be used with trusted daemon
|
||||||
* \return true on success
|
* \return true on success
|
||||||
|
@ -663,7 +635,7 @@ struct WalletManager
|
||||||
* \param wallet previously opened / created wallet instance
|
* \param wallet previously opened / created wallet instance
|
||||||
* \return None
|
* \return None
|
||||||
*/
|
*/
|
||||||
virtual bool closeWallet(Wallet *wallet, bool store = false) = 0;
|
virtual bool closeWallet(Wallet *wallet) = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ! checks if wallet with the given name already exists
|
* ! checks if wallet with the given name already exists
|
||||||
|
@ -672,7 +644,7 @@ struct WalletManager
|
||||||
/*!
|
/*!
|
||||||
* @brief TODO: delme walletExists - check if the given filename is the wallet
|
* @brief TODO: delme walletExists - check if the given filename is the wallet
|
||||||
* @param path - filename
|
* @param path - filename
|
||||||
* @return - true if wallet exists
|
* @return
|
||||||
*/
|
*/
|
||||||
virtual bool walletExists(const std::string &path) = 0;
|
virtual bool walletExists(const std::string &path) = 0;
|
||||||
|
|
||||||
|
@ -681,9 +653,9 @@ struct WalletManager
|
||||||
* @param keys_file_name - location of keys file
|
* @param keys_file_name - location of keys file
|
||||||
* @param password - password to verify
|
* @param password - password to verify
|
||||||
* @param watch_only - verify only view keys?
|
* @param watch_only - verify only view keys?
|
||||||
* @return - true if password is correct
|
* @return
|
||||||
*/
|
*/
|
||||||
virtual bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, bool watch_only) const = 0;
|
virtual bool verifyWalletPassword(const std::string &keys_file_name, const std::string &password, const bool watch_only) = 0;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief findWallets - searches for the wallet files by given path name recursively
|
* \brief findWallets - searches for the wallet files by given path name recursively
|
||||||
|
|
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.
|
@ -0,0 +1,12 @@
|
||||||
|
## This file is automatically generated by Android Studio.
|
||||||
|
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
|
||||||
|
#
|
||||||
|
# This file must *NOT* be checked into Version Control Systems,
|
||||||
|
# as it contains information specific to your local configuration.
|
||||||
|
#
|
||||||
|
# Location of the SDK. This is only used by Gradle.
|
||||||
|
# For customization when using a Version Control System, please read the
|
||||||
|
# header note.
|
||||||
|
#Sat May 13 17:52:51 CEST 2017
|
||||||
|
ndk.dir=C\:\\Users\\Test\\AppData\\Local\\Android\\Sdk\\ndk-bundle
|
||||||
|
sdk.dir=C\:\\Users\\Test\\AppData\\Local\\Android\\Sdk
|
Loading…
Reference in New Issue