Add InforU SMS plugin (#1695)
Co-authored-by: Bitcoin Change <admin@bitcoinchange.co.il>
This commit is contained in:
parent
2c8ab635a7
commit
fc6f86f51d
5 changed files with 108 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import bitstamp from './bitstamp'
|
|||
import blockcypher from './blockcypher'
|
||||
import cex from './cex'
|
||||
import galoy from './galoy'
|
||||
import inforu from './inforu'
|
||||
import infura from './infura'
|
||||
import itbit from './itbit'
|
||||
import kraken from './kraken'
|
||||
|
|
@ -21,6 +22,7 @@ export default {
|
|||
[galoy.code]: galoy,
|
||||
[bitstamp.code]: bitstamp,
|
||||
[blockcypher.code]: blockcypher,
|
||||
[inforu.code]: inforu,
|
||||
[infura.code]: infura,
|
||||
[itbit.code]: itbit,
|
||||
[kraken.code]: kraken,
|
||||
|
|
|
|||
53
new-lamassu-admin/src/pages/Services/schemas/inforu.js
Normal file
53
new-lamassu-admin/src/pages/Services/schemas/inforu.js
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
import * as Yup from 'yup'
|
||||
|
||||
import SecretInputFormik from 'src/components/inputs/formik/SecretInput'
|
||||
import TextInputFormik from 'src/components/inputs/formik/TextInput'
|
||||
|
||||
import { secretTest } from './helper'
|
||||
|
||||
export default {
|
||||
code: 'inforu',
|
||||
name: 'InforU',
|
||||
title: 'InforU (SMS)',
|
||||
elements: [
|
||||
{
|
||||
code: 'username',
|
||||
display: 'InforU username',
|
||||
component: TextInputFormik,
|
||||
face: true
|
||||
},
|
||||
{
|
||||
code: 'apiKey',
|
||||
display: 'API Key',
|
||||
component: SecretInputFormik
|
||||
},
|
||||
{
|
||||
code: 'fromNumber',
|
||||
display: 'InforU sender',
|
||||
component: TextInputFormik,
|
||||
face: true
|
||||
},
|
||||
{
|
||||
code: 'toNumber',
|
||||
display: 'Notifications Number (international format)',
|
||||
component: TextInputFormik,
|
||||
face: true
|
||||
}
|
||||
],
|
||||
getValidationSchema: account => {
|
||||
return Yup.object().shape({
|
||||
username: Yup.string('The InforU username must be a string')
|
||||
.max(100, 'The InforU username is too long')
|
||||
.required('The InforU username is required'),
|
||||
apiKey: Yup.string('The API key must be a string')
|
||||
.max(200, 'The API key is too long')
|
||||
.test(secretTest(account?.apiKey, 'API key')),
|
||||
fromNumber: Yup.string('The InforU sender must be a string')
|
||||
.max(11, 'The InforU sender is too long')
|
||||
.required('The InforU sender is required'),
|
||||
toNumber: Yup.string('The notifications number must be a string')
|
||||
.max(100, 'The notifications number is too long')
|
||||
.required('The notifications number is required')
|
||||
})
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue