feat: add mock wallet scoring

This commit is contained in:
Sérgio Salgado 2021-09-01 20:03:05 +01:00
parent b0fa62a9f3
commit 584492cb55
6 changed files with 76 additions and 6 deletions

View file

@ -13,6 +13,7 @@ const T = require('./time')
const configManager = require('./new-config-manager')
const ticker = require('./ticker')
const wallet = require('./wallet')
const walletScoring = require('./wallet-scoring')
const exchange = require('./exchange')
const sms = require('./sms')
const email = require('./email')
@ -776,6 +777,11 @@ function plugins (settings, deviceId) {
.then(buildRates)
}
function rateWallet (address) {
return walletScoring.rateWallet(settings, address)
.then(res => res.rating)
}
return {
getRates,
buildRates,
@ -803,7 +809,8 @@ function plugins (settings, deviceId) {
getNotificationConfig,
notifyOperator,
fetchCurrentConfigVersion,
pruneMachinesHeartbeat
pruneMachinesHeartbeat,
rateWallet
}
}