feat: add 3rd party services splash screen feat: add sumsub as a configurable 3rd party service feat: sumsub config loader fix: small fixes feat: add external validation as a compliance trigger feat: add external validation route in l-s feat: add external validation graphql module feat: integrate sumsub SDK feat: improve sumsub form to allow adding multiple applicant levels with enhanced UX feat: added support for array fields in FormRenderer feat: allow external validation triggers to dynamically use levels setup in the services page fix: multiple small fixes feat: get external compliance customer info fix: small fixes feat: add informational card in customer profile regarding external service info feat: send external customer data for machine trigger verification feat: restrictions to the creation of custom info requests and external validation triggers fix: allow for a single applicant level to be setup fix: account instance access fix: small fixes fix: development-only log
32 lines
758 B
JavaScript
32 lines
758 B
JavaScript
const path = require('path')
|
|
const fs = require('fs')
|
|
|
|
const _ = require('lodash/fp')
|
|
|
|
const pluginCodes = {
|
|
TICKER: 'ticker',
|
|
EXCHANGE: 'exchange',
|
|
WALLET: 'wallet',
|
|
WALLET_SCORING: 'wallet-scoring',
|
|
LAYER2: 'layer2',
|
|
SMS: 'sms',
|
|
EMAIL: 'email',
|
|
ZERO_CONF: 'zero-conf',
|
|
COMPLIANCE: 'compliance'
|
|
}
|
|
|
|
module.exports = _.assign({load}, pluginCodes)
|
|
|
|
function load (type, pluginCode) {
|
|
if (!_.includes(type, _.values(pluginCodes))) {
|
|
throw new Error(`Unallowed plugin type: ${type}`)
|
|
}
|
|
|
|
if (!pluginCode) throw new Error(`No plugin defined for ${type}`)
|
|
|
|
if (pluginCode.search(/[a-z0-9-]/) === -1) {
|
|
throw new Error(`Unallowed plugin name: ${pluginCode}`)
|
|
}
|
|
|
|
return require(`./plugins/${type}/${pluginCode}/${pluginCode}`)
|
|
}
|