atomicDEX-API icon indicating copy to clipboard operation
atomicDEX-API copied to clipboard

fix(p2pk): show P2PK balance

Open mariocynicys opened this issue 1 year ago • 7 comments

This makes it so we don't auto-convert P2PK addresses to P2PKH addresses, thus we can query them for balances if they have any.

Also refactors utxo::output_script() to auto detect the address type without the need for a keys::Type flag.

Fixes #720

mariocynicys avatar Jan 18 '24 16:01 mariocynicys

Missing unit tests for the balance addition. Verified it's working as expected with manual tests though.

mariocynicys avatar Jan 23 '24 15:01 mariocynicys

@mariocynicys can you please fix failing docker tests compilation by running this command cargo test --test 'docker_tests_main' --features run-docker-tests and checking the errors. You can wait for https://github.com/KomodoPlatform/komodo-defi-framework/pull/1960 to be merged first but don't forget to check these errors after that.

shamardy avatar Feb 02 '24 02:02 shamardy

@mariocynicys As discussed, we should also implement P2PK outputs spending in this PR. You should wait for the merge of the conflicting PR first for this too.

shamardy avatar Feb 02 '24 09:02 shamardy

The changes made up till now (showing p2pk balance) are reviewable. p2pk spending isn't added yet.

update: removed the under review status so the CI doesn't complain, still reviewable though.

mariocynicys avatar Feb 12 '24 14:02 mariocynicys

@mariocynicys please fix conflicts in this PR so that we can review it.

shamardy avatar May 06 '24 14:05 shamardy

@shamardy, sorry, missed the last suggestions. Done now.

There seems to be some of this pattern in this test file though. Let me try to handle these as well in this PR.

mariocynicys avatar May 08 '24 10:05 mariocynicys

@smk762 if you have time, can you please check if your comment here https://github.com/KomodoPlatform/komodo-defi-framework/issues/720#issuecomment-1527182643 is resolved? If I merged it before that, you can check this in dev :)

shamardy avatar May 08 '24 11:05 shamardy