Comparing version 0.1.1 to 0.1.2
@@ -147,3 +147,4 @@ "use strict"; | ||
delete m.payload.inputs; | ||
m.payload.outputs = m.payload.outputs.filter(o => o.address !== aa_address); | ||
m.payload.outputs = m.payload.outputs.filter(o => o.address !== aa_address && o.amount > 0); | ||
m.payload.outputs.sort((o1, o2) => o1.address < o2.address ? -1 : 1); | ||
} | ||
@@ -232,3 +233,4 @@ } | ||
} | ||
if (trigger_initial_unit !== last_trigger_unit) { | ||
const bRepeated = trigger_initial_unit === last_trigger_unit; | ||
if (!bRepeated) { | ||
removeExecutedPendingTriggers(trigger_initial_unit); | ||
@@ -239,3 +241,3 @@ last_trigger_unit = trigger_initial_unit; | ||
console.log(`repeated response to ${last_trigger_unit}`); | ||
if (updatedStateVars) { | ||
if (updatedStateVars && !bRepeated) { | ||
for (let address in updatedStateVars) { | ||
@@ -261,7 +263,11 @@ if (!stateVars[address]) | ||
} | ||
if (!objAAResponse.balances) // balances are available only in light wallets, they are added to the notifications we receive from the light vendor | ||
throw Error("no balances in AA response"); | ||
balances[aa_address] = objAAResponse.balances; | ||
if (!objAAResponse.allBalances) // balances are available only in light wallets, they are added to the notifications we receive from the light vendor | ||
throw Error("no allBalances in AA response"); | ||
if (!bRepeated) { | ||
for (let aa in objAAResponse.allBalances) | ||
balances[aa] = objAAResponse.allBalances[aa]; | ||
} | ||
// await updateBalances(objAAResponse); | ||
await replayPendingTriggers(); | ||
if (!bRepeated) | ||
await replayPendingTriggers(); | ||
unlock(); | ||
@@ -268,0 +274,0 @@ eventBus.emit('aa_response_applied-' + aa_address, objAAResponse); |
{ | ||
"name": "aabot", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"engines": { | ||
@@ -21,4 +21,3 @@ "node": ">=8" | ||
"resolutions": { | ||
"level-rocksdb": "^4.0.0" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38999
852