Skip to content

Commit

Permalink
Return error instead of just logging it if client fails (#1632)
Browse files Browse the repository at this point in the history
  • Loading branch information
zkokelj authored Nov 1, 2023
1 parent fb4c449 commit aae2f5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/walletextension/accountmanager/account_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ func (m *AccountManager) ProxyRequest(rpcReq *wecommon.RPCRequest, rpcResp *inte
err = m.subscriptionsManager.HandleNewSubscriptions(clients, rpcReq, rpcResp, userConn)
if err != nil {
m.logger.Error("Error subscribing to multiple clients")
return err
}
return err
return nil
}
return m.executeCall(rpcReq, rpcResp)
}
Expand Down
1 change: 1 addition & 0 deletions tools/walletextension/wallet_extension.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func (w *WalletExtension) AddAddressToUser(hexUserID string, message string, sig
encClient, err := common.CreateEncClient(w.hostAddr, addressFromMessage.Bytes(), privateKeyBytes, signature, w.Logger())
if err != nil {
w.Logger().Error(fmt.Errorf("error creating encrypted client for user: (%s), %w", hexUserID, err).Error())
return fmt.Errorf("error creating encrypted client for user: (%s), %w", hexUserID, err)
}

accManager.AddClient(addressFromMessage, encClient)
Expand Down

0 comments on commit aae2f5f

Please sign in to comment.