Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Mar 19, 2024
1 parent 3fa1306 commit 979ddc1
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions tools/walletextension/accountmanager/account_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,22 @@ func (m *AccountManager) ProxyRequest(rpcReq *wecommon.RPCRequest, rpcResp *inte
if err != nil {
return err
}
critBytes, err := json.Marshal(rpcReq.Params[1])
if err != nil {
return err
}
criteria := new(filters.FilterCriteria)
err = criteria.UnmarshalJSON(critBytes)
if err != nil {
return err
criteria := filters.FilterCriteria{}

// this stuff will be removed when the rpc is added
crit, ok := rpcReq.Params[1].(map[string]any)
if ok {
critBytes, err := json.Marshal(crit)
if err != nil {
return err
}
err = criteria.UnmarshalJSON(critBytes)
if err != nil {
return err
}
}
err = m.subscriptionsManager.HandleNewSubscriptions(clients, *criteria, rpcResp, userConn)

err = m.subscriptionsManager.HandleNewSubscriptions(clients, criteria, rpcResp, userConn)
if err != nil {
m.logger.Error("Error subscribing to multiple clients")
return err
Expand Down

0 comments on commit 979ddc1

Please sign in to comment.