Skip to content

Commit cee66b1

Browse files
committed
rpc: adds QueryRfqForwards endpoint
with pagination and filters.
1 parent cc8311e commit cee66b1

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

rpcserver.go

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8765,22 +8765,15 @@ func (r *rpcServer) QueryRfqForwards(ctx context.Context,
87658765
return nil, fmt.Errorf("error counting forwards: %w", err)
87668766
}
87678767

8768-
// Get total asset volume for the filtered results.
8769-
totalVolume, err := r.cfg.RfqManager.SumAssetVolume(ctx, params)
8770-
if err != nil {
8771-
return nil, fmt.Errorf("error summing asset volume: %w", err)
8772-
}
8773-
87748768
// Convert the forwards to RPC format.
87758769
rpcForwards := make([]*rfqrpc.RfqForward, len(forwards))
87768770
for i, fwd := range forwards {
87778771
rpcForwards[i] = marshalRfqForward(fwd)
87788772
}
87798773

87808774
return &rfqrpc.QueryRfqForwardsResponse{
8781-
Forwards: rpcForwards,
8782-
TotalCount: totalCount,
8783-
TotalAssetVolume: totalVolume,
8775+
Forwards: rpcForwards,
8776+
TotalCount: totalCount,
87848777
}, nil
87858778
}
87868779

0 commit comments

Comments
 (0)