From f205f99d7f9d1cf11abb6737df53be3464ff999c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Wed, 23 Feb 2022 21:35:09 +0000 Subject: [PATCH] fix: sms receipt tx direction --- lib/routes/customerRoutes.js | 2 +- .../components/booleanPropertiesTable/BooleanPropertiesTable.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/routes/customerRoutes.js b/lib/routes/customerRoutes.js index b00c4d54..305a7a07 100644 --- a/lib/routes/customerRoutes.js +++ b/lib/routes/customerRoutes.js @@ -160,7 +160,7 @@ function buildSms (data, receiptOptions) { customerPhone: customer.phone, session: formattedTx.id, time: dateString, - direction: formattedTx.direction === 'cashIn' ? 'Cash-in' : 'Cash-out', + direction: formattedTx.txClass === 'cashIn' ? 'Cash-in' : 'Cash-out', fiat: `${formattedTx.fiat.toString()} ${formattedTx.fiatCode}`, crypto: `${sms.toCryptoUnits(BN(formattedTx.cryptoAtoms), formattedTx.cryptoCode)} ${formattedTx.cryptoCode}`, rate: `1 ${formattedTx.cryptoCode} = ${rate} ${formattedTx.fiatCode}`, diff --git a/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js b/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js index 5358bae2..29140c37 100644 --- a/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js +++ b/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js @@ -27,7 +27,7 @@ const BooleanCell = ({ name }) => { const BooleanPropertiesTable = memo( ({ title, disabled, data, elements, save, forcedEditing = false }) => { const initialValues = R.fromPairs( - elements.map(it => [it.name, data[it.name].toString() ?? null]) + elements.map(it => [it.name, data[it.name]?.toString() ?? null]) ) const schemaValidation = R.fromPairs(