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

[WIP] Add protection tools #2787

Closed
Closed
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
c2757db
Merge branch 'fix-trade-peers-account-age' into delay-payout-if-fait-…
ManfredKarrer Apr 21, 2019
29ff2fc
Fix wrong display of ages with 1 at the end (e.g. 31 days)
ManfredKarrer Apr 22, 2019
a314416
Add min required buyers account age
ManfredKarrer Apr 22, 2019
72be262
Add warning popup to offer book
ManfredKarrer Apr 22, 2019
e74aad7
Remove rounded fiat amounts popup
ManfredKarrer Apr 22, 2019
4cae398
Add popup to offer maker
ManfredKarrer Apr 22, 2019
79ed168
Refactor
ManfredKarrer Apr 22, 2019
a1e58a4
Improve text
ManfredKarrer Apr 22, 2019
b46e98f
Handle trade period (WIP)
ManfredKarrer Apr 22, 2019
9e6989a
Add more keys
ManfredKarrer Apr 23, 2019
8eab3f3
Refactor: Move accountAgeWitness classes to new package
ManfredKarrer Apr 23, 2019
ca373ff
Refactor: Cleanup, no functionality change
ManfredKarrer Apr 23, 2019
b20a60e
Add SignedWitness domain (WIP)
ManfredKarrer Apr 23, 2019
0968861
Merge branch 'master' into delay-payout-if-fait-buyer-has-new-account
ManfredKarrer Apr 27, 2019
99c271a
Update strings
ManfredKarrer Apr 27, 2019
27d7656
Merge branch 'master' into sign-account-usage
ManfredKarrer Apr 27, 2019
ce99f56
Fix wrong imports
ManfredKarrer Apr 27, 2019
a28c728
Refactoring: Move classed to new package
ManfredKarrer Apr 27, 2019
e6d4709
Add Account score domain (WIP)
ManfredKarrer Apr 27, 2019
9c02ef8
Refactor: Move methods to domain (WIP)
ManfredKarrer Apr 27, 2019
ca6843c
Move account age related code to AccountCreationAgeService
ManfredKarrer Apr 28, 2019
eb1899f
Fix delay function, refactorings
ManfredKarrer Apr 28, 2019
765c708
Rename method
ManfredKarrer Apr 28, 2019
8d6267d
Add methods for getting the AccountScoreCategory
ManfredKarrer Apr 28, 2019
9a54dc3
Merge branch 'sign-account-usage' into add-protection-tools
ManfredKarrer Apr 28, 2019
cbdb472
Add arguments
ManfredKarrer Apr 28, 2019
f172fa6
Apply organize imports
ManfredKarrer Apr 28, 2019
e2b322f
Rename package
ManfredKarrer Apr 28, 2019
2c7b613
Handle AccountScoreCategory methods depending on signed witness state
ManfredKarrer Apr 28, 2019
60fcde6
Add verify check
ManfredKarrer Apr 28, 2019
26fb30c
Apply new delay function, add ScoreInfo class and methods
ManfredKarrer Apr 29, 2019
f9a756b
Add UI for score info
ManfredKarrer Apr 29, 2019
e6f7345
Fix deposit function
ManfredKarrer Apr 29, 2019
43b6238
Adjust create offer popup with new scoreInfo data
ManfredKarrer Apr 29, 2019
3fd133f
Add popup for taker
ManfredKarrer Apr 29, 2019
12a3d89
Change buyer sec. deposit
ManfredKarrer Apr 30, 2019
248df21
Change PERM_DELAY to 15 days, adjust tests
ManfredKarrer Apr 30, 2019
a2454ac
Add requireAuthorizedTaker to offer and preferences
ManfredKarrer Apr 30, 2019
8f519f3
Add check and popup for offers requiring authorized takers
ManfredKarrer Apr 30, 2019
c81142c
Adjust column width
ManfredKarrer Apr 30, 2019
74344a8
Show restrictions based on payment method
ManfredKarrer Apr 30, 2019
961870a
Improve restrictions settings in create offer
ripcurlx Apr 30, 2019
649c28a
Merge pull request #8 from ripcurlx/create-offer-improvements
ManfredKarrer Apr 30, 2019
a989438
Add comment
ManfredKarrer Apr 30, 2019
dbc1594
Add trade amount to SignedWitness
ManfredKarrer Apr 30, 2019
61d4d26
Rename put method to putIfAbsent to reflect behaviour better
ManfredKarrer Apr 30, 2019
e52707f
Rename put method to putIfAbsent to reflect behaviour better
ManfredKarrer Apr 30, 2019
c960520
Add more comments
ManfredKarrer Apr 30, 2019
a2d2fea
Add missing parameter
ripcurlx May 1, 2019
4ac64a1
Change icons
ripcurlx May 1, 2019
dedfd2e
Extend trade protocol to support payout delay
ManfredKarrer May 1, 2019
6cbc311
Add missing class
ManfredKarrer May 1, 2019
b176bd6
Fix fiatReceivedDate handling
ManfredKarrer May 2, 2019
997c032
Rename PeerInfoWithTagEditor to PeerInfoPopup
ManfredKarrer May 2, 2019
41b3f04
Handle delayed payout in trade protocol (WIP)
ManfredKarrer May 2, 2019
4494d07
Add verify task, improve UI
ManfredKarrer May 2, 2019
3c24644
Handle payout delay in trade process (WIP)
ManfredKarrer Jun 13, 2019
969c448
Merge pull request #9 from ripcurlx/change-icons
ManfredKarrer May 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -47,7 +47,7 @@
@Slf4j
public class AccountCreationAgeService {
public final static long PHASE_ONE_PERIOD = 30;
public final static long PERM_DELAY = 7;
public final static long PERM_DELAY = 15;
private final AccountAgeWitnessService accountAgeWitnessService;


Expand Down
4 changes: 2 additions & 2 deletions core/src/main/java/bisq/core/btc/wallet/Restrictions.java
Expand Up @@ -63,7 +63,7 @@ public static double getDefaultBuyerSecurityDepositAsPercent(boolean cryptoCurre
if (cryptoCurrencyAccount)
return 0.02; // 2% of trade amount.
else
return 0.1; // 10% of trade amount.
return 0.20; // 20% of trade amount.
}

public static double getMinBuyerSecurityDepositAsPercent(@Nullable PaymentAccount paymentAccount) {
Expand All @@ -75,7 +75,7 @@ public static double getMinBuyerSecurityDepositAsPercent(boolean cryptoCurrencyA
if (cryptoCurrencyAccount)
return 0.005; // 0.5% of trade amount.
else
return 0.05; // 5% of trade amount.
return 0.15; // 15% of trade amount.
}

public static double getMaxBuyerSecurityDepositAsPercent(@Nullable PaymentAccount paymentAccount) {
Expand Down
Expand Up @@ -42,20 +42,20 @@ public void testGetDelay() {

requiredAccountAge = 30 * DateUtils.MILLIS_PER_DAY;
buyersAccountAge = 15 * DateUtils.MILLIS_PER_DAY;
expected = 19;
expected = 23;
assertEquals(expected, AccountCreationAgeService.getDelayInDays(buyersAccountAge, requiredAccountAge));


buyersAccountAge = 60 * DateUtils.MILLIS_PER_DAY;
expected = 7;
expected = 15;
assertEquals(expected, AccountCreationAgeService.getDelayInDays(buyersAccountAge, requiredAccountAge));

buyersAccountAge = DateUtils.MILLIS_PER_DAY;
expected = 29;
expected = 30;
assertEquals(expected, AccountCreationAgeService.getDelayInDays(buyersAccountAge, requiredAccountAge));

buyersAccountAge = 2 * DateUtils.MILLIS_PER_DAY;
expected = 28;
expected = 29;
assertEquals(expected, AccountCreationAgeService.getDelayInDays(buyersAccountAge, requiredAccountAge));
}

Expand Down