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

Use different security deposit for fiat-crypto and crypto-crypto trades #2742

Conversation

Projects
None yet
3 participants
@ripcurlx
Copy link
Member

commented Apr 18, 2019

Sets back security deposit for crypto-crypto trades to values before the DAO and only keeps the new ones for fiat-crypto trades.

@ripcurlx ripcurlx requested a review from ManfredKarrer as a code owner Apr 18, 2019

@ripcurlx ripcurlx changed the title Use different security deposit for fiat-crypto and crypto-crypto trades [WIP] Use different security deposit for fiat-crypto and crypto-crypto trades Apr 18, 2019

@ripcurlx

This comment has been minimized.

Copy link
Member Author

commented Apr 18, 2019

I'll change the condition to differentiate from currency code to payment account so we are more flexible in the future if we ever decide to have different deposit limits for different payment accounts.

@ripcurlx ripcurlx force-pushed the ripcurlx:set-lower-security-deposit-for-altcoins branch from ba5804b to 0a2135e Apr 18, 2019

@ripcurlx ripcurlx changed the title [WIP] Use different security deposit for fiat-crypto and crypto-crypto trades Use different security deposit for fiat-crypto and crypto-crypto trades Apr 18, 2019

@sqrrm
Copy link
Member

left a comment

I think this is mostly correct as far as I know, I'm not that familiar with the trade protocol though so I can't tell if there is some case where the deposit should be updated.

Also, see inline comments.

@ripcurlx ripcurlx force-pushed the ripcurlx:set-lower-security-deposit-for-altcoins branch from 0a2135e to 55d09a3 Apr 18, 2019

@ripcurlx

This comment has been minimized.

Copy link
Member Author

commented Apr 18, 2019

I think this is mostly correct as far as I know, I'm not that familiar with the trade protocol though so I can't tell if there is some case where the deposit should be updated.

Also, see inline comments.

Thanks for the review. I force pushed all changes.

@sqrrm

sqrrm approved these changes Apr 18, 2019

Copy link
Member

left a comment

utACK

As a reviewer I prefer when the previous commits are kept and just add a new one rather than a force push. Easier to follow which changes were made after comments were made that way.

@@ -47,6 +47,8 @@

import javax.annotation.Nullable;

import static bisq.core.btc.wallet.Restrictions.getDefaultBuyerSecurityDepositAsPercent;

This comment has been minimized.

Copy link
@sqrrm

sqrrm Apr 18, 2019

Member

More static imports, in case you meant to revert them all, otherwise it's ok, just feels a bit excessive for these kinds of use cases.

This comment has been minimized.

Copy link
@ripcurlx

ripcurlx Apr 19, 2019

Author Member

Here I left it by intent to reduce the line length for L125 & L127

import bisq.core.util.BSFormatter;

import javax.inject.Inject;

import static bisq.core.btc.wallet.Restrictions.getMaxBuyerSecurityDepositAsPercent;
import static bisq.core.btc.wallet.Restrictions.getMinBuyerSecurityDepositAsPercent;

This comment has been minimized.

Copy link
@sqrrm

sqrrm Apr 18, 2019

Member

More static imports

This comment has been minimized.

Copy link
@ripcurlx

ripcurlx Apr 19, 2019

Author Member

Here it doesn't help to make the code more readable. Commit below.

@ripcurlx

This comment has been minimized.

Copy link
Member Author

commented Apr 19, 2019

utACK

As a reviewer I prefer when the previous commits are kept and just add a new one rather than a force push. Easier to follow which changes were made after comments were made that way.

True - I wanted to reduce the amount of commits, but in a PR that gets reviewed it makes it harder to follow.

@sqrrm

sqrrm approved these changes Apr 19, 2019

Copy link
Member

left a comment

utACK

@ManfredKarrer
Copy link
Member

left a comment

utACK

@ManfredKarrer ManfredKarrer merged commit 262fa85 into bisq-network:master Apr 20, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@sqrrm sqrrm referenced this pull request May 7, 2019

Open

Cycle 1 #282

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.