feat: add cash-out fixed fee to Server-Machine GraphQL API
This commit is contained in:
parent
83595efd8e
commit
35b1a69434
3 changed files with 4 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ const staticConfig = ({ currentConfigVersion, deviceId, deviceName, pq, settings
|
||||||
'cashInCommission',
|
'cashInCommission',
|
||||||
'cashInFee',
|
'cashInFee',
|
||||||
'cashOutCommission',
|
'cashOutCommission',
|
||||||
|
'cashOutFee',
|
||||||
'cryptoCode',
|
'cryptoCode',
|
||||||
'cryptoCodeDisplay',
|
'cryptoCodeDisplay',
|
||||||
'cryptoNetwork',
|
'cryptoNetwork',
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ type Coin {
|
||||||
display: String!
|
display: String!
|
||||||
minimumTx: String!
|
minimumTx: String!
|
||||||
cashInFee: String!
|
cashInFee: String!
|
||||||
|
cashOutFee: String!
|
||||||
cashInCommission: String!
|
cashInCommission: String!
|
||||||
cashOutCommission: String!
|
cashOutCommission: String!
|
||||||
cryptoNetwork: String!
|
cryptoNetwork: String!
|
||||||
|
|
|
||||||
|
|
@ -249,6 +249,7 @@ function plugins (settings, deviceId) {
|
||||||
const commissions = configManager.getCommissions(cryptoCode, deviceId, settings.config)
|
const commissions = configManager.getCommissions(cryptoCode, deviceId, settings.config)
|
||||||
const minimumTx = new BN(commissions.minimumTx)
|
const minimumTx = new BN(commissions.minimumTx)
|
||||||
const cashInFee = new BN(commissions.fixedFee)
|
const cashInFee = new BN(commissions.fixedFee)
|
||||||
|
const cashOutFee = new BN(commissions.cashOutFixedFee)
|
||||||
const cashInCommission = new BN(commissions.cashIn)
|
const cashInCommission = new BN(commissions.cashIn)
|
||||||
const cashOutCommission = _.isNumber(commissions.cashOut) ? new BN(commissions.cashOut) : null
|
const cashOutCommission = _.isNumber(commissions.cashOut) ? new BN(commissions.cashOut) : null
|
||||||
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
|
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
|
||||||
|
|
@ -261,6 +262,7 @@ function plugins (settings, deviceId) {
|
||||||
isCashInOnly: Boolean(cryptoRec.isCashinOnly),
|
isCashInOnly: Boolean(cryptoRec.isCashinOnly),
|
||||||
minimumTx: BN.max(minimumTx, cashInFee),
|
minimumTx: BN.max(minimumTx, cashInFee),
|
||||||
cashInFee,
|
cashInFee,
|
||||||
|
cashOutFee,
|
||||||
cashInCommission,
|
cashInCommission,
|
||||||
cashOutCommission,
|
cashOutCommission,
|
||||||
cryptoNetwork,
|
cryptoNetwork,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue