def get_payment_value(self, info: Optional['PaymentInfo'], plist):
    amount_msat = 0
    fee_msat = None
    for (chan_id, htlc, _direction, _status) in plist:
        amount_msat += (int(_direction) * htlc.amount_msat)
        if ((_direction == SENT) and info and info.amount_msat):
            fee_msat = (((fee_msat or 0) - info.amount_msat) - amount_msat)
    timestamp = min([htlc.timestamp for (chan_id, htlc, _direction, _status) in plist])
    return (amount_msat, fee_msat, timestamp)
def get_payment_value(self, info: Optional['PaymentInfo'], plist):
    amount_msat = 0
    fee_msat = None
    for (chan_id, htlc, _direction, _status) in plist:
        amount_msat += (int(_direction) * htlc.amount_msat)
        if ((_direction == SENT) and info and info.amount_msat):
            fee_msat = (((fee_msat or 0) - info.amount_msat) - amount_msat)
    timestamp = min([htlc.timestamp for (chan_id, htlc, _direction, _status) in plist])
    return (amount_msat, fee_msat, timestamp)