Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum QuoteError {
LIMIT_EXCEEDED = 'LimitExceeded',
NATIONALITY_NOT_ALLOWED = 'NationalityNotAllowed',
NAME_REQUIRED = 'NameRequired',
PAYMENT_METHOD_NOT_ALLOWED = 'PaymentMethodNotAllowed',
IBAN_CURRENCY_MISMATCH = 'IbanCurrencyMismatch',
RECOMMENDATION_REQUIRED = 'RecommendationRequired',
EMAIL_REQUIRED = 'EmailRequired',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -890,14 +890,12 @@ export class TransactionHelper implements OnModuleInit {
: QuoteError.EMAIL_REQUIRED;
}

// Credit card payments disabled
if (paymentMethodIn === FiatPaymentMethod.CARD) return QuoteError.PAYMENT_METHOD_NOT_ALLOWED;

if (isSell && ibanCountry && !to.isIbanCountryAllowed(ibanCountry)) return QuoteError.IBAN_CURRENCY_MISMATCH;

if (
nationality &&
((isBuy && !nationality.bankEnable) ||
(paymentMethodIn === FiatPaymentMethod.CARD && !nationality.checkoutEnable) ||
((isSell || isSwap) && !nationality.cryptoEnable))
)
if (nationality && ((isBuy && !nationality.bankEnable) || ((isSell || isSwap) && !nationality.cryptoEnable)))
return QuoteError.NATIONALITY_NOT_ALLOWED;

// KYC checks
Expand Down Expand Up @@ -935,15 +933,7 @@ export class TransactionHelper implements OnModuleInit {

// verification checks
if (
paymentMethodIn === FiatPaymentMethod.CARD &&
user &&
!user.userData.completeName &&
!user.userData.verifiedName
)
return QuoteError.NAME_REQUIRED;

if (
((isSell && to.name !== 'CHF') || paymentMethodIn === FiatPaymentMethod.CARD || isSwap) &&
((isSell && to.name !== 'CHF') || isSwap) &&
user &&
!user.userData.hasBankTxVerification &&
txAmountChf > Config.tradingLimits.monthlyDefaultWoKyc
Expand Down
Loading