fix: virtual cassette and denomination min value
This commit is contained in:
parent
521363a296
commit
0d3eb2e392
2 changed files with 3 additions and 15 deletions
|
|
@ -126,18 +126,6 @@ function plugins (settings, deviceId) {
|
|||
]
|
||||
}
|
||||
|
||||
function getLcmOrBigx2 (n1, n2) {
|
||||
let big = Math.max(n1, n2);
|
||||
let small = Math.min(n1, n2);
|
||||
|
||||
let i = big * 2;
|
||||
while(i % small !== 0){
|
||||
i += lar;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
function buildAvailableCassettes (excludeTxId) {
|
||||
const cashOutConfig = configManager.getCashOut(deviceId, settings.config)
|
||||
|
||||
|
|
@ -145,7 +133,7 @@ function plugins (settings, deviceId) {
|
|||
|
||||
const denominations = [cashOutConfig.top, cashOutConfig.bottom]
|
||||
|
||||
const virtualCassettes = [getLcmOrBigx2(cashOutConfig.top, cashOutConfig.bottom)]
|
||||
const virtualCassettes = [Math.max(cashOutConfig.top, cashOutConfig.bottom) * 2]
|
||||
|
||||
return Promise.all([dbm.cassetteCounts(deviceId), cashOutHelper.redeemableTxs(deviceId, excludeTxId)])
|
||||
.then(([rec, _redeemableTxs]) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue