Feat: back end support for per coin 0-conf limit

This commit is contained in:
csrapr 2021-04-08 18:41:56 +01:00 committed by Josh Harvey
parent 5da28bc830
commit ac38a40b6c
9 changed files with 32 additions and 21 deletions

View file

@ -147,8 +147,8 @@ function transactionNotify (tx, rec) {
}
// alert through sms or email any transaction or high value transaction, if SMS || email alerts are enabled
const cashOutConfig = configManager.getCashOut(tx.deviceId, settings.config)
const zeroConfLimit = cashOutConfig.zeroConfLimit
const walletSettings = configManager.getWalletSettings(tx.cryptoCode, settings.config)
const zeroConfLimit = walletSettings.zeroConfLimit || 0
const zeroConf = isCashOut && tx.fiat.lte(zeroConfLimit)
const notificationsEnabled = notifSettings.sms.transactions || notifSettings.email.transactions
const customerPromise = tx.customerId ? customers.getById(tx.customerId) : Promise.resolve({})