Merge remote-tracking branch 'origin/release-9.0' into chore/merge-9-into-10-20240206
This commit is contained in:
commit
35e40f4528
52 changed files with 4794 additions and 6007 deletions
|
|
@ -203,7 +203,7 @@ function plugins (settings, deviceId) {
|
|||
it => cashOutConfig[`recycler${it}`],
|
||||
_.range(1, numberOfRecyclers+1)
|
||||
)
|
||||
|
||||
|
||||
if (counts.length !== denominations.length)
|
||||
throw new Error('Denominations and respective counts do not match!')
|
||||
|
||||
|
|
@ -771,7 +771,7 @@ function plugins (settings, deviceId) {
|
|||
fiatCode
|
||||
}
|
||||
: null
|
||||
|
||||
|
||||
const recycler1Alert = device.numberOfRecyclers >= 1 && isUnitLow(device.cashUnits.recycler1, getCashUnitCapacity(device.model, 'recycler'), notifications.fillingPercentageRecycler1)
|
||||
? {
|
||||
code: 'LOW_RECYCLER_STACKER',
|
||||
|
|
@ -917,7 +917,7 @@ function plugins (settings, deviceId) {
|
|||
}
|
||||
|
||||
function getPhoneCode (phone) {
|
||||
const code = settings.config.notifications_thirdParty_sms === 'mock-sms'
|
||||
const code = settings.config.notifications_thirdParty_sms === 'mock-sms'
|
||||
? '123'
|
||||
: randomCode()
|
||||
|
||||
|
|
@ -933,6 +933,23 @@ function plugins (settings, deviceId) {
|
|||
})
|
||||
}
|
||||
|
||||
function getEmailCode (toEmail) {
|
||||
const code = settings.config.notifications_thirdParty_email === 'mock-email'
|
||||
? '123'
|
||||
: randomCode()
|
||||
|
||||
const rec = {
|
||||
email: {
|
||||
toEmail,
|
||||
subject: 'Your cryptomat code',
|
||||
body: `Your cryptomat code: ${code}`
|
||||
}
|
||||
}
|
||||
|
||||
return email.sendCustomerMessage(settings, rec)
|
||||
.then(() => code)
|
||||
}
|
||||
|
||||
function sweepHdRow (row) {
|
||||
const txId = row.id
|
||||
const cryptoCode = row.crypto_code
|
||||
|
|
@ -999,6 +1016,10 @@ function plugins (settings, deviceId) {
|
|||
return walletScoring.isWalletScoringEnabled(settings, tx.cryptoCode)
|
||||
}
|
||||
|
||||
function probeLN (cryptoCode, address) {
|
||||
return wallet.probeLN(settings, cryptoCode, address)
|
||||
}
|
||||
|
||||
return {
|
||||
getRates,
|
||||
recordPing,
|
||||
|
|
@ -1012,6 +1033,7 @@ function plugins (settings, deviceId) {
|
|||
isZeroConf,
|
||||
getStatus,
|
||||
getPhoneCode,
|
||||
getEmailCode,
|
||||
executeTrades,
|
||||
pong,
|
||||
clearOldLogs,
|
||||
|
|
@ -1031,6 +1053,7 @@ function plugins (settings, deviceId) {
|
|||
getTransactionHash,
|
||||
getInputAddresses,
|
||||
isWalletScoringEnabled,
|
||||
probeLN,
|
||||
buildAvailableUnits
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue