refactor: rename cashInFee to fixedFee

This commit is contained in:
siiky 2022-10-10 16:05:23 +01:00 committed by Rafael
parent 35b1a69434
commit 8fc3d7d819
2 changed files with 14 additions and 2 deletions

View file

@ -23,7 +23,7 @@ const typeDef = gql`
errorCode: String
operatorCompleted: Boolean
sendPending: Boolean
cashInFee: String
fixedFee: String
minimumTx: Float
customerId: ID
isAnonymous: Boolean

View file

@ -50,7 +50,19 @@ function batch (
excludeTestingCustomers = false,
simplified
) {
const packager = _.flow(_.flatten, _.orderBy(_.property('created'), ['desc']), _.map(camelize), addProfits, addNames)
const packager = _.flow(
_.flatten,
_.orderBy(_.property('created'), ['desc']),
_.map(_.flow(
camelize,
_.mapKeys(k =>
k == 'cashInFee' ? 'fixedFee' :
k
)
)),
addProfits,
addNames
)
const cashInSql = `SELECT 'cashIn' AS tx_class, txs.*,
c.phone AS customer_phone,