def channel_state_changed(self, chan: Channel):
    if (type(chan) is Channel):
        self.save_channel(chan)
    util.trigger_callback('channel', self.wallet, chan)
def channel_state_changed(self, chan: Channel):
    if (type(chan) is Channel):
        self.save_channel(chan)
    util.trigger_callback('channel', self.wallet, chan)