fix controller pubsub: no need for wallet ticker

pull/10/head
Edouard Paris 5 years ago
parent ee7860df38
commit 670401b5c6

@ -102,7 +102,8 @@ func (p *PubSub) Run(ctx context.Context, sub chan *events.Event) {
p.ticker(ctx, sub,
withTickerInfo(),
withTickerChannelsBalance(),
withTickerWalletBalance(),
// no need for ticker Wallet balance, transactions subscriber is enough
// withTickerWalletBalance(),
)
<-p.stop

@ -96,7 +96,11 @@ func (c *controller) Listen(ctx context.Context, g *gocui.Gui, sub chan *events.
c.logger.Debug("event received", logging.String("type", event.Type))
switch event.Type {
case events.TransactionCreated:
refresh(c.models.RefreshTransactions)
refresh(
c.models.RefreshInfo,
c.models.RefreshWalletBalance,
c.models.RefreshTransactions,
)
case events.BlockReceived:
refresh(
c.models.RefreshInfo,
@ -106,6 +110,7 @@ func (c *controller) Listen(ctx context.Context, g *gocui.Gui, sub chan *events.
refresh(
c.models.RefreshInfo,
c.models.RefreshWalletBalance,
c.models.RefreshTransactions,
)
case events.ChannelBalanceUpdated:
refresh(

Loading…
Cancel
Save