Response: {
"error": "formula
if (trigger.data.period != var['period'])
bounce('wrong period');
$transferredFromMe = trigger.data.transferredFromMe otherwise 0;
if ($transferredFromMe < 0)
bounce('bad amount spent by me: ' || $transferredFromMe);
if (trigger.data.sentByPeer){
if (trigger.data.sentByPeer.signed_message.channel != this_address)
bounce('signed for another channel');
if (trigger.data.sentByPeer.signed_message.period != var['period'])
bounce('signed for a different period of this channel');
if (!is_valid_signed_package(trigger.data.sentByPeer, $bFromB ? $addressA : $addressB))
bounce('invalid signature by peer');
$transferredFromPeer = trigger.data.sentByPeer.signed_message.amount_spent;
if ((!$transferredFromPeer AND $transferredFromPeer !=0) OR $transferredFromPeer < 0)
bounce('bad amount spent by peer: ' || $transferredFromPeer);
}
else
$transferredFromPeer = 0;
failed: booleans cannot be compared with other types"
}