From 41290f51fd06b9bd58fc1a108534f5cd83cdcadb Mon Sep 17 00:00:00 2001 From: m2049r Date: Mon, 1 Jun 2020 10:02:22 +0200 Subject: [PATCH] Upgrade to monero v0.16.0.0 (#662) * upgrade to monero core v0.16.0.0 * hearts for node favs --- .../xmrwallet/layout/NodeInfoAdapter.java | 4 ++-- .../main/res/drawable/ic_bookmark_24dp.xml | 9 -------- .../res/drawable/ic_bookmark_border_24dp.xml | 9 -------- .../main/res/drawable/ic_favorite_24dp.xml | 9 ++++++++ .../res/drawable/ic_favorite_border_24dp.xml | 9 ++++++++ app/src/main/res/layout/item_node.xml | 2 +- external-libs/monero/include/wallet2_api.h | 22 +++++++++++++++---- external-libs/script/monero-fetch.sh | 2 +- 8 files changed, 40 insertions(+), 26 deletions(-) delete mode 100644 app/src/main/res/drawable/ic_bookmark_24dp.xml delete mode 100644 app/src/main/res/drawable/ic_bookmark_border_24dp.xml create mode 100644 app/src/main/res/drawable/ic_favorite_24dp.xml create mode 100644 app/src/main/res/drawable/ic_favorite_border_24dp.xml diff --git a/app/src/main/java/com/m2049r/xmrwallet/layout/NodeInfoAdapter.java b/app/src/main/java/com/m2049r/xmrwallet/layout/NodeInfoAdapter.java index 25b7dacf..14d6e0b4 100644 --- a/app/src/main/java/com/m2049r/xmrwallet/layout/NodeInfoAdapter.java +++ b/app/src/main/java/com/m2049r/xmrwallet/layout/NodeInfoAdapter.java @@ -130,9 +130,9 @@ public class NodeInfoAdapter extends RecyclerView.Adapter - - diff --git a/app/src/main/res/drawable/ic_bookmark_border_24dp.xml b/app/src/main/res/drawable/ic_bookmark_border_24dp.xml deleted file mode 100644 index 1cae0eb2..00000000 --- a/app/src/main/res/drawable/ic_bookmark_border_24dp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_favorite_24dp.xml b/app/src/main/res/drawable/ic_favorite_24dp.xml new file mode 100644 index 00000000..2cc9234a --- /dev/null +++ b/app/src/main/res/drawable/ic_favorite_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/ic_favorite_border_24dp.xml b/app/src/main/res/drawable/ic_favorite_border_24dp.xml new file mode 100644 index 00000000..ae7b4362 --- /dev/null +++ b/app/src/main/res/drawable/ic_favorite_border_24dp.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/layout/item_node.xml b/app/src/main/res/layout/item_node.xml index 85c7a6c2..546acb2b 100644 --- a/app/src/main/res/layout/item_node.xml +++ b/app/src/main/res/layout/item_node.xml @@ -18,7 +18,7 @@ android:padding="12dp" android:background="?android:attr/selectableItemBackgroundBorderless" android:gravity="center" - android:src="@drawable/ic_bookmark_border_24dp" /> + android:src="@drawable/ic_favorite_border_24dp" /> onDevicePassphraseRequest(bool on_device) { - if (!on_device) throw std::runtime_error("Not supported"); + virtual optional onDevicePassphraseRequest(bool & on_device) { + on_device = true; return optional(); } @@ -879,6 +879,14 @@ struct Wallet */ virtual void disposeTransaction(PendingTransaction * t) = 0; + /*! + * \brief Estimates transaction fee. + * \param destinations Vector consisting of pairs. + * \return Estimated fee. + */ + virtual uint64_t estimateTransactionFee(const std::vector> &destinations, + PendingTransaction::Priority priority) const = 0; + /*! * \brief exportKeyImages - exports key images to file * \param filename @@ -1085,10 +1093,12 @@ struct WalletManager * \param nettype Network type * \param restoreHeight restore from start height * \param kdf_rounds Number of rounds for key derivation function + * \param seed_offset Seed offset passphrase (optional) * \return Wallet instance (Wallet::status() needs to be called to check if recovered successfully) */ virtual Wallet * recoveryWallet(const std::string &path, const std::string &password, const std::string &mnemonic, - NetworkType nettype = MAINNET, uint64_t restoreHeight = 0, uint64_t kdf_rounds = 1) = 0; + NetworkType nettype = MAINNET, uint64_t restoreHeight = 0, uint64_t kdf_rounds = 1, + const std::string &seed_offset = {}) = 0; Wallet * recoveryWallet(const std::string &path, const std::string &password, const std::string &mnemonic, bool testnet = false, uint64_t restoreHeight = 0) // deprecated { @@ -1283,7 +1293,11 @@ struct WalletManager virtual std::string resolveOpenAlias(const std::string &address, bool &dnssec_valid) const = 0; //! checks for an update and returns version, hash and url - static std::tuple checkUpdates(const std::string &software, std::string subdir); + static std::tuple checkUpdates( + const std::string &software, + std::string subdir, + const char *buildtag = nullptr, + const char *current_version = nullptr); }; diff --git a/external-libs/script/monero-fetch.sh b/external-libs/script/monero-fetch.sh index f6650393..d6c23291 100755 --- a/external-libs/script/monero-fetch.sh +++ b/external-libs/script/monero-fetch.sh @@ -7,7 +7,7 @@ source script/env.sh cd $EXTERNAL_LIBS_BUILD_ROOT url="https://github.com/m2049r/monero" -version="release-v0.15-monerujo" +version="release-v0.16.0.0-monerujo" if [ ! -d "monero" ]; then git clone ${url} -b ${version}