Make sure tokens balances can be fetched

This commit is contained in:
Roman Volosovskyi 2021-01-28 17:58:17 +02:00
parent 4685b9eaa9
commit e18050b87f
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
3 changed files with 13 additions and 1 deletions

View File

@ -1 +1 @@
0.69.2 0.69.3

View File

@ -628,6 +628,13 @@ func (b *GethStatusBackend) startNode(config *params.NodeConfig) (err error) {
}); err != nil { }); err != nil {
return return
} }
if config.WalletConfig.Enabled {
walletService, err := b.statusNode.WalletService()
if err != nil {
return err
}
walletService.SetClient(b.statusNode.RPCClient().Ethclient())
}
signal.SendNodeStarted() signal.SendNodeStarted()
b.transactor.SetNetworkID(config.NetworkID) b.transactor.SetNetworkID(config.NetworkID)

View File

@ -51,6 +51,11 @@ func (s *Service) GetFeed() *event.Feed {
return s.feed return s.feed
} }
// SetClient sets ethclient
func (s *Service) SetClient(client *ethclient.Client) {
s.client = client
}
// StartReactor separately because it requires known ethereum address, which will become available only after login. // StartReactor separately because it requires known ethereum address, which will become available only after login.
func (s *Service) StartReactor(client *ethclient.Client, accounts []common.Address, chain *big.Int, watchNewBlocks bool) error { func (s *Service) StartReactor(client *ethclient.Client, accounts []common.Address, chain *big.Int, watchNewBlocks bool) error {
reactor := NewReactor(s.db, s.feed, client, chain, watchNewBlocks) reactor := NewReactor(s.db, s.feed, client, chain, watchNewBlocks)