-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use different security deposit for fiat-crypto and crypto-crypto trades #2742
Conversation
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. |
ba5804b
to
0a2135e
Compare
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.
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.
desktop/src/main/java/bisq/desktop/main/offer/MutableOfferDataModel.java
Outdated
Show resolved
Hide resolved
0a2135e
to
55d09a3
Compare
Thanks for the review. I force pushed all changes. |
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.
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; |
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.
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.
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.
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; |
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.
More static imports
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.
Here it doesn't help to make the code more readable. Commit below.
True - I wanted to reduce the amount of commits, but in a PR that gets reviewed it makes it harder to follow. |
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.
utACK
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.
utACK
Sets back security deposit for crypto-crypto trades to values before the DAO and only keeps the new ones for fiat-crypto trades.