mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Do single trade currency check in api generated payment acct
This commit is contained in:
parent
e00cc86fea
commit
19e9c78f51
1 changed files with 5 additions and 2 deletions
|
@ -138,9 +138,12 @@ class CorePaymentAccountsService {
|
|||
}
|
||||
|
||||
private void verifyPaymentAccountHasRequiredFields(PaymentAccount paymentAccount) {
|
||||
// Do checks here to make sure required fields are populated.
|
||||
if (paymentAccount.isTransferwiseAccount() && paymentAccount.getTradeCurrencies().isEmpty())
|
||||
if (paymentAccount.canSupportMultipleCurrencies() && paymentAccount.getTradeCurrencies().isEmpty())
|
||||
throw new IllegalArgumentException(format("no trade currencies defined for %s payment account",
|
||||
paymentAccount.getPaymentMethod().getDisplayString().toLowerCase()));
|
||||
|
||||
if (!paymentAccount.canSupportMultipleCurrencies() && paymentAccount.getSingleTradeCurrency() == null)
|
||||
throw new IllegalArgumentException(format("no trade currency defined for %s payment account",
|
||||
paymentAccount.getPaymentMethod().getDisplayString().toLowerCase()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue