fix lamassu-cancel
This commit is contained in:
parent
8cdad0bc15
commit
b28c99aabb
3 changed files with 29 additions and 13 deletions
|
|
@ -215,8 +215,6 @@ function preProcess (oldTx, newTx, pi) {
|
||||||
|
|
||||||
return Promise.resolve(updateStatus(oldTx, newTx))
|
return Promise.resolve(updateStatus(oldTx, newTx))
|
||||||
.then(updatedTx => {
|
.then(updatedTx => {
|
||||||
if (!oldTx) return updatedTx
|
|
||||||
|
|
||||||
if (updatedTx.status !== oldTx.status) {
|
if (updatedTx.status !== oldTx.status) {
|
||||||
const isZeroConf = pi.isZeroConf(updatedTx)
|
const isZeroConf = pi.isZeroConf(updatedTx)
|
||||||
if (wasJustAuthorized(oldTx, updatedTx, isZeroConf)) pi.sell(updatedTx)
|
if (wasJustAuthorized(oldTx, updatedTx, isZeroConf)) pi.sell(updatedTx)
|
||||||
|
|
@ -351,8 +349,8 @@ function monitorUnnotified (settings) {
|
||||||
|
|
||||||
function cancel (txId) {
|
function cancel (txId) {
|
||||||
const updateRec = {
|
const updateRec = {
|
||||||
'dispense_time': 'now()^',
|
|
||||||
error: 'Operator cancel',
|
error: 'Operator cancel',
|
||||||
|
error_code: 'operatorCancel',
|
||||||
dispense: true
|
dispense: true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
8
migrations/034-add_cash_out_error_code.js
Normal file
8
migrations/034-add_cash_out_error_code.js
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
exports.up = function(next){
|
||||||
|
next();
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.down = function(next){
|
||||||
|
next();
|
||||||
|
};
|
||||||
|
|
@ -30492,8 +30492,8 @@ var _user$project$Config$updateSelectize = F3(
|
||||||
return _elm_lang$core$Native_Utils.crashCase(
|
return _elm_lang$core$Native_Utils.crashCase(
|
||||||
'Config',
|
'Config',
|
||||||
{
|
{
|
||||||
start: {line: 1329, column: 17},
|
start: {line: 1330, column: 17},
|
||||||
end: {line: 1334, column: 56}
|
end: {line: 1335, column: 56}
|
||||||
},
|
},
|
||||||
_p4)('Shouldn\'t be here');
|
_p4)('Shouldn\'t be here');
|
||||||
}
|
}
|
||||||
|
|
@ -30668,8 +30668,8 @@ var _user$project$Config$isField = function (fieldValue) {
|
||||||
return _elm_lang$core$Native_Utils.crashCase(
|
return _elm_lang$core$Native_Utils.crashCase(
|
||||||
'Config',
|
'Config',
|
||||||
{
|
{
|
||||||
start: {line: 1025, column: 5},
|
start: {line: 1026, column: 5},
|
||||||
end: {line: 1030, column: 59}
|
end: {line: 1031, column: 59}
|
||||||
},
|
},
|
||||||
_p12)('Referenced field must be boolean');
|
_p12)('Referenced field must be boolean');
|
||||||
}
|
}
|
||||||
|
|
@ -30888,18 +30888,28 @@ var _user$project$Config$checkEnabled = F3(
|
||||||
var outGroup = _p17._1;
|
var outGroup = _p17._1;
|
||||||
var enabledInstances = A2(
|
var enabledInstances = A2(
|
||||||
_elm_lang$core$Basics_ops['++'],
|
_elm_lang$core$Basics_ops['++'],
|
||||||
A3(_user$project$Config$referenceFields, fieldScope, configGroup.values, outGroup),
|
A3(
|
||||||
A4(_user$project$Config$referenceFieldInstances, configGroup, fieldScope, fieldInstances, inGroup));
|
_user$project$Config$referenceFields,
|
||||||
var _p18 = _elm_lang$core$Native_Utils.eq(fieldInstance.fieldLocator.code, 'cashOutTransactionLimit') ? A2(
|
fieldScope,
|
||||||
|
A2(_elm_lang$core$Debug$log, 'DEBUG104', configGroup.values),
|
||||||
|
A2(_elm_lang$core$Debug$log, 'DEBUG101', outGroup)),
|
||||||
|
A4(
|
||||||
|
_user$project$Config$referenceFieldInstances,
|
||||||
|
configGroup,
|
||||||
|
fieldScope,
|
||||||
|
fieldInstances,
|
||||||
|
A2(_elm_lang$core$Debug$log, 'DEBUG102', outGroup)));
|
||||||
|
var _p18 = _elm_lang$core$Native_Utils.eq(fieldInstance.fieldLocator.code, 'cashOutCommission') ? A2(
|
||||||
_elm_lang$core$Basics$always,
|
_elm_lang$core$Basics$always,
|
||||||
{ctor: '_Tuple0'},
|
{ctor: '_Tuple0'},
|
||||||
A2(
|
A2(
|
||||||
_elm_lang$core$Debug$log,
|
_elm_lang$core$Debug$log,
|
||||||
'DEBUG100',
|
'DEBUG100',
|
||||||
{
|
{
|
||||||
ctor: '_Tuple2',
|
ctor: '_Tuple3',
|
||||||
_0: A3(_user$project$Config$referenceFields, fieldScope, configGroup.values, outGroup),
|
_0: fieldInstance.fieldLocator,
|
||||||
_1: A4(_user$project$Config$referenceFieldInstances, configGroup, fieldScope, fieldInstances, inGroup)
|
_1: A3(_user$project$Config$referenceFields, fieldScope, configGroup.values, outGroup),
|
||||||
|
_2: A4(_user$project$Config$referenceFieldInstances, configGroup, fieldScope, fieldInstances, inGroup)
|
||||||
})) : {ctor: '_Tuple0'};
|
})) : {ctor: '_Tuple0'};
|
||||||
return A2(_elm_lang$core$List$any, _user$project$Config$isField, enabledInstances);
|
return A2(_elm_lang$core$List$any, _user$project$Config$isField, enabledInstances);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue