From 29c6f586c1515fa148551fd89ad29bb5fce7f24e Mon Sep 17 00:00:00 2001 From: woodser Date: Tue, 2 Jul 2019 08:30:53 -0400 Subject: [PATCH] implement getLanguages() --- src/wallet/MoneroWallet.cpp | 6 ++++++ src/wallet/MoneroWallet.h | 12 ++++++------ todo.txt | 1 + 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/wallet/MoneroWallet.cpp b/src/wallet/MoneroWallet.cpp index 9bbbf04..4cc7e03 100644 --- a/src/wallet/MoneroWallet.cpp +++ b/src/wallet/MoneroWallet.cpp @@ -517,6 +517,12 @@ namespace monero { return wallet2->get_seed_language(); } + vector MoneroWallet::getLanguages() const { + vector languages; + crypto::ElectrumWords::get_language_list(languages, true); + return languages; + } + // get primary address (default impl?) string MoneroWallet::getAddress(uint32_t accountIdx, uint32_t subaddressIdx) const { diff --git a/src/wallet/MoneroWallet.h b/src/wallet/MoneroWallet.h index 6848f46..b020f1a 100644 --- a/src/wallet/MoneroWallet.h +++ b/src/wallet/MoneroWallet.h @@ -213,12 +213,12 @@ namespace monero { */ string getLanguage() const; - // /** - // * Get a list of available languages for the wallet's seed. - // * - // * @return the available languages for the wallet's seed - // */ - // virtual string[] getLanguages() const; + /** + * Get a list of available languages for the wallet's seed. + * + * @return the available languages for the wallet's seed + */ + vector getLanguages() const; /** * Get the wallet's primary address. diff --git a/todo.txt b/todo.txt index d68fba0..7c440ef 100644 --- a/todo.txt +++ b/todo.txt @@ -1,3 +1,4 @@ +wallet2 does not automatically save unlike rpc; where to invoke save and how to separate for tests? throw MoneroErrors instead of runtime_errors toPropertyTree() should take node as parameter; optimize memory elsewhere cannot reconcile integrals on getTransfers() test, need to add reconcile debug info including vals and pass error message