From 03266a4d661f040b32b8dd82979fa9b713c30140 Mon Sep 17 00:00:00 2001 From: rkfg Date: Mon, 19 Sep 2022 11:53:59 +0300 Subject: [PATCH] Don't set channel age if ID isn't set --- ui/models/models.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/models/models.go b/ui/models/models.go index 9ada4fc..910966e 100644 --- a/ui/models/models.go +++ b/ui/models/models.go @@ -62,7 +62,9 @@ func (m *Models) RefreshChannels(ctx context.Context) error { if channel != nil && (channel.UpdatesCount < channels[i].UpdatesCount || channel.LastUpdate == nil || channel.LocalPolicy == nil || channel.RemotePolicy == nil) { - channels[i].Age = m.Info.BlockHeight - uint32(channels[i].ID>>40) + if channels[i].ID > 0 { + channels[i].Age = m.Info.BlockHeight - uint32(channels[i].ID>>40) + } err := m.network.GetChannelInfo(ctx, channels[i]) if err != nil { return err