Make sure tokens balances can be fetched
This commit is contained in:
parent
4685b9eaa9
commit
e18050b87f
|
@ -628,6 +628,13 @@ func (b *GethStatusBackend) startNode(config *params.NodeConfig) (err error) {
|
|||
}); err != nil {
|
||||
return
|
||||
}
|
||||
if config.WalletConfig.Enabled {
|
||||
walletService, err := b.statusNode.WalletService()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
walletService.SetClient(b.statusNode.RPCClient().Ethclient())
|
||||
}
|
||||
signal.SendNodeStarted()
|
||||
|
||||
b.transactor.SetNetworkID(config.NetworkID)
|
||||
|
|
|
@ -51,6 +51,11 @@ func (s *Service) GetFeed() *event.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.
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue