-
Notifications
You must be signed in to change notification settings - Fork 98
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
Mm2.1 refactor get trade fee #797
Conversation
* Implement the get_sender_trade_fee, get_receiver_trade_fee for UTXO
…er_trade_fee * Replace can_i_spend_other_payment implementation with get_receiver_trade_fee
…erations * Refactor max_taker_vol * Take the trade fee into account on locked_amount called * Move the check_balance_for_[maker/taker]_swap out into additional check * Add Traceable trait * Refactor get_locked_amount, get_locked_amount_by_other_swaps
* Replace TradePreimageValue::Max with TradePreimageValue::UpperBound * Fix and expand test_max_taker_vol_dynamic_trade_fee (replace into docker_tests::qrc20_tests) * Fix poisoning of docker_tests
* Replace 'trade_preimage' into lp_swap.rs * Add 'dust' field to coins config
* Replace trade fees from [Maker/Taker]SwapMut to [Maker/Taker]SwapData
* Add check_base_coin_balance_for_swap
* Separate check_coin_balance_for_swap into check_my_coin_balance_for_swap and check_other_coin_balance_for_swap * Add prepared trade_fee
…lled for QRC20 coin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! It is first review iteration :)
* Change volume within trade_preimage response from BigDecimal to MmNumber * Replace try_other with try_map within generate_transaction * Add the test_trade_preimage_fee_includes_change_output_anyway test
* Add UtxoCommonOps::preimage_trade_fee_required_to_send_outputs that encapsulate the change output fee
…onal) * Replace Address::default() with the declared fee_addr_pub_key
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review iteration number 2 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sergeyboyko0791
Approved. Thanks a lot for your work on this!
I think the changes have to be tested, because they could break the functionality of the mm2.
|
https://dexapi.cipig.net/public/error.php?uuid=753e7602-fdd0-4e5b-a9ad-893a957cb065 |
The swap started with
somehow, it shouldn't have matched. @sergeyboyko0791 Could you please check how it could happen? I've pushed the https://github.com/KomodoPlatform/atomicDEX-API/tree/mm2.1-fix-setprice-max branch with test_match_and_trade_max where I tried to recreate the problem. I hope it might help a bit. |
|
2 new KMD/BTC with |
trade_preimage
RPC call that returns the most approximated required fees that should be paid per whole swapmax_taker_vol
using newget_sender_trade_fee
,get_receiver_trade_fee
,get_fee_to_send_taker_fee