Skip to content
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

fix(hd-wallet): use CoinBalanceMap for UTXO and QTUM #2259

Merged
merged 7 commits into from
Nov 4, 2024

Conversation

shamardy
Copy link
Collaborator

@shamardy shamardy commented Oct 31, 2024

This is to return the same type/json across all coins for GUI since EVM uses CoinBalanceMap, the balance for UTXO will show as

"balance":{
   "KMD":{
      "spendable":"0",
      "unspendable":"0"
   }
}

instead of

"balance":{
   "spendable":"0",
   "unspendable":"0"
}

To Test:
Already tested by @CharlVS

@shamardy shamardy added the in progress Changes will be made from the author label Oct 31, 2024
@shamardy shamardy changed the title fix(hd-wallet): Use CoinBalanceMap for UTXO and QTUM fix(hd-wallet): use CoinBalanceMap for UTXO and QTUM Oct 31, 2024
@shamardy shamardy marked this pull request as ready for review October 31, 2024 15:55
@shamardy shamardy added under review and removed in progress Changes will be made from the author labels Oct 31, 2024
borngraced
borngraced previously approved these changes Nov 1, 2024
Copy link
Member

@borngraced borngraced left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! just a note if you like it

mm2src/coins/utxo/utxo_tests.rs Outdated Show resolved Hide resolved
@shamardy
Copy link
Collaborator Author

shamardy commented Nov 1, 2024

@CharlVS requested your review on this, if this works as expected in GUI please approve it :)

Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some comments inline, lgtm otherwise :)

mm2src/coins/rpc_command/account_balance.rs Show resolved Hide resolved
mm2src/coins/utxo/utxo_common.rs Outdated Show resolved Hide resolved
mariocynicys
mariocynicys previously approved these changes Nov 4, 2024
Copy link
Collaborator

@mariocynicys mariocynicys left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

mm2src/coins/utxo/utxo_standard.rs Outdated Show resolved Hide resolved
Copy link
Member

@CharlVS CharlVS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've confirmed it's working in the GUI SDK. Thanks for taking care of it so quickly.

@shamardy shamardy merged commit 295a848 into dev Nov 4, 2024
22 of 26 checks passed
@shamardy shamardy deleted the utxo-hd-balance-map branch November 4, 2024 18:58
dimxy added a commit that referenced this pull request Nov 5, 2024
* dev:
  fix(hd-wallet): use `CoinBalanceMap` for UTXO and QTUM (#2259)
  fix(tests): add more sepolia endpoints in tests (#2262)
dimxy added a commit that referenced this pull request Nov 7, 2024
* dev:
  fix(nft): add token_id field to the tx history primary key, fix balance (#2209)
  feat(cosmos): support IBC types in tx history implementation (#2245)
  fix(hd-wallet): use `CoinBalanceMap` for UTXO and QTUM (#2259)
  fix(tests): add more sepolia endpoints in tests (#2262)
  fix(legacy-swap): check for confirmations on recover taker (#2242)
  fix(legacy-swap): remove the need for takers to confirm their payment (#2249)
  refactor(P2P): types and modules (#2256)
  fix(evm): correctly display eth addr in iguana v2 activation result (#2254)
  feat(utxo): prioritize electrum connections (#1966)
  refactor(SwapOps): make all methods async (#2251)
  refactor(SwapOps): make `send_maker_payment` async (#2250)
  remove old p2p implementation (#2248)
dimxy added a commit that referenced this pull request Nov 11, 2024
* dev:
  fix(foot-shooting): remove leftover code that panics via RPC (#2270)
  refactor(MarketCoinOps): make `wait_for_htlc_tx_spend` async (#2265)
  feat(eth-swap): maker tpu v2 implementation (#2211)
  fix(nft): add token_id field to the tx history primary key, fix balance (#2209)
  feat(cosmos): support IBC types in tx history implementation (#2245)
  fix(hd-wallet): use `CoinBalanceMap` for UTXO and QTUM (#2259)
  fix(tests): add more sepolia endpoints in tests (#2262)
  fix(legacy-swap): check for confirmations on recover taker (#2242)
  fix(legacy-swap): remove the need for takers to confirm their payment (#2249)
  refactor(P2P): types and modules (#2256)
  fix(evm): correctly display eth addr in iguana v2 activation result (#2254)
  feat(utxo): prioritize electrum connections (#1966)
  refactor(SwapOps): make all methods async (#2251)
  refactor(SwapOps): make `send_maker_payment` async (#2250)
  remove old p2p implementation (#2248)
  feat(cosmos-offline-tests): prepare IBC channels inside the container  (#2246)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants