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 get_receiver_trade_fee for cosmos #1767

Merged
merged 1 commit into from
Apr 25, 2023
Merged

fix get_receiver_trade_fee for cosmos #1767

merged 1 commit into from
Apr 25, 2023

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Apr 24, 2023

send_amount: BigDecimal parameter was initially added for calculating receiver trade fee in cosmos swaps.

As it's been explained with the comments here:
https://github.com/KomodoPlatform/atomicDEX-API/blob/547a30a79b16da38769411772d837548922ee529/mm2src/coins/tendermint/tendermint_coin.rs#L1994-L1997

We are trying to simulate create HTLC transactions with the received amount, which causes tx errors if the sender sends more amount than what cosmos address has.

Because htlc amount doesn't increase the gas fee, I decided to remove that send amount parameter and use the minimum tx amount instead.

ref txs with different amounts and close gas fees:

@onur-ozkan onur-ozkan added the bug Something isn't working label Apr 24, 2023
Signed-off-by: ozkanonur <work@onurozkan.dev>
@onur-ozkan onur-ozkan changed the title fix cosmos swap fees fix get_receiver_trade_fee for cosmos Apr 24, 2023
@onur-ozkan onur-ozkan self-assigned this Apr 24, 2023
Copy link
Member

@cipig cipig left a comment

Choose a reason for hiding this comment

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

works fine
errors from setprice are gone on the LP nodes and i can finally trade IRIS on ADEX Desktop too with the modified mm2
image

Copy link
Collaborator

@shamardy shamardy left a comment

Choose a reason for hiding this comment

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

LGTM!

@shamardy shamardy merged commit f59eb1d into dev Apr 25, 2023
@shamardy shamardy deleted the fix-cosmos-swap-fees branch April 25, 2023 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working under review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants