forked from comit-network/xmr-btc-swap
-
Notifications
You must be signed in to change notification settings - Fork 29
feat: show list of subaddresses #685
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rafael-xmr
wants to merge
12
commits into
eigenwallet:master
Choose a base branch
from
rafael-xmr:feat-subaddress-list
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d893570
feat: show list of subaddresses
rafael-xmr 14e8ce2
fix: address comments
rafael-xmr f66f839
feat(monero): show received address onto in tx history, show current …
rafael-xmr bc47191
Merge remote-tracking branch 'origin/master' into feat-subaddress-list
rafael-xmr 98599df
feat(monero): fix subaddress patch & cleanup SubaddressesModal.tsx
rafael-xmr 498b0fe
feat(monero-tests): add subaddresses test
rafael-xmr bc395d5
feat: add assert_ne to subaddress indices
rafael-xmr 4885931
refactor(monero-sys): address comments, document strict
rafael-xmr 0a1e480
refactor(src-gui): address comments, move to async fns, move dispatch…
rafael-xmr c1e2720
feat(src-gui): add and use onComplete callback instead to clear on er…
rafael-xmr 9cdc68c
refactor(monero-sys): address comments
rafael-xmr 3848add
refactor(monero-sys): variable names
rafael-xmr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
monero-sys/patches/eigenwallet_0004_wallet_impl_balance_per_subaddress.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| diff --git a/src/wallet/api/wallet.h b/src/wallet/api/wallet.h | ||
| index b7f77a186..0a8cfb0b8 100644 | ||
| --- a/src/wallet/api/wallet.h | ||
| +++ b/src/wallet/api/wallet.h | ||
| @@ -238,6 +238,9 @@ public: | ||
| virtual uint64_t getBytesReceived() override; | ||
| virtual uint64_t getBytesSent() override; | ||
|
|
||
| + std::map<uint32_t, uint64_t> balancePerSubaddress(uint32_t accountIndex, bool strict) const; | ||
| + std::map<uint32_t, uint64_t> unlockedBalancePerSubaddress(uint32_t accountIndex, bool strict) const; | ||
| + | ||
| std::string getMultisigSeed(const std::string &seed_offset) const override; | ||
| std::pair<std::uint32_t, std::uint32_t> getSubaddressIndex(const std::string &address) const override; | ||
| void freeze(const std::string &key_image) override; | ||
| diff --git a/src/wallet/api/wallet.cpp b/src/wallet/api/wallet.cpp | ||
| index 96393eaaa..3dd62e7d2 100644 | ||
| --- a/src/wallet/api/wallet.cpp | ||
| +++ b/src/wallet/api/wallet.cpp | ||
| @@ -1102,6 +1106,20 @@ uint64_t WalletImpl::unlockedBalance(uint32_t accountIndex) const | ||
| return m_wallet->unlocked_balance(accountIndex, false); | ||
| } | ||
|
|
||
| +std::map<uint32_t, uint64_t> WalletImpl::balancePerSubaddress(uint32_t accountIndex, bool strict) const | ||
| +{ | ||
| + return m_wallet->balance_per_subaddress(accountIndex, strict); | ||
| +} | ||
| + | ||
| +std::map<uint32_t, uint64_t> WalletImpl::unlockedBalancePerSubaddress(uint32_t accountIndex, bool strict) const | ||
| +{ | ||
| + auto full = m_wallet->unlocked_balance_per_subaddress(accountIndex, strict); | ||
| + std::map<uint32_t, uint64_t> result; | ||
| + for (const auto &p : full) | ||
| + result[p.first] = p.second.first; // extract the unlocked amount only | ||
| + return result; | ||
| +} | ||
| + | ||
| uint64_t WalletImpl::blockChainHeight() const | ||
| { | ||
| if(m_wallet->light_wallet()) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.