Feat: back end support for per coin 0-conf limit
This commit is contained in:
parent
5da28bc830
commit
ac38a40b6c
9 changed files with 32 additions and 21 deletions
|
|
@ -283,12 +283,12 @@ test('calls sendRedemptionMessage if !zeroConf and rec.isRedemption', async () =
|
|||
|
||||
const loadLatest = jest.spyOn(settingsLoader, 'loadLatest')
|
||||
const getGlobalNotifications = jest.spyOn(configManager, 'getGlobalNotifications')
|
||||
const getCashOut = jest.spyOn(configManager, 'getCashOut')
|
||||
const getWalletSettings = jest.spyOn(configManager, 'getWalletSettings')
|
||||
|
||||
// sendRedemptionMessage will cause this func to be called
|
||||
jest.spyOn(smsFuncs, 'sendMessage').mockImplementation((_, rec) => rec)
|
||||
|
||||
getCashOut.mockReturnValue({ zeroConfLimit: -Infinity })
|
||||
getWalletSettings.mockReturnValue({ zeroConfLimit: -Infinity })
|
||||
loadLatest.mockReturnValue(Promise.resolve({}))
|
||||
getGlobalNotifications.mockReturnValue({ ...notifSettings, sms: { active: true, errors: true, transactions: true }, notificationCenter: { active: true } })
|
||||
|
||||
|
|
@ -309,20 +309,19 @@ test('calls sendRedemptionMessage if !zeroConf and rec.isRedemption', async () =
|
|||
test('calls sendTransactionMessage if !zeroConf and !rec.isRedemption', async () => {
|
||||
const configManager = require('../../new-config-manager')
|
||||
const settingsLoader = require('../../new-settings-loader')
|
||||
const machineLoader = require('../../machine-loader')
|
||||
|
||||
const queries = require('../queries')
|
||||
const loadLatest = jest.spyOn(settingsLoader, 'loadLatest')
|
||||
const getGlobalNotifications = jest.spyOn(configManager, 'getGlobalNotifications')
|
||||
const getCashOut = jest.spyOn(configManager, 'getCashOut')
|
||||
const getMachineName = jest.spyOn(machineLoader, 'getMachineName')
|
||||
const getWalletSettings = jest.spyOn(configManager, 'getWalletSettings')
|
||||
const getMachineName = jest.spyOn(queries, 'getMachineName')
|
||||
const buildTransactionMessage = jest.spyOn(utils, 'buildTransactionMessage')
|
||||
|
||||
// sendMessage on emailFuncs isn't called because it is disabled in getGlobalNotifications.mockReturnValue
|
||||
jest.spyOn(smsFuncs, 'sendMessage').mockImplementation((_, rec) => ({ prop: rec }))
|
||||
buildTransactionMessage.mockImplementation(() => ['mock message', false])
|
||||
|
||||
getMachineName.mockReturnValue('mockMachineName')
|
||||
getCashOut.mockReturnValue({ zeroConfLimit: -Infinity })
|
||||
getMachineName.mockResolvedValue('mockMachineName')
|
||||
getWalletSettings.mockReturnValue({ zeroConfLimit: -Infinity })
|
||||
loadLatest.mockReturnValue(Promise.resolve({}))
|
||||
getGlobalNotifications.mockReturnValue({ ...notifSettings, sms: { active: true, errors: true, transactions: true }, notificationCenter: { active: true } })
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue