Skip to content

Commit

Permalink
Simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
marcopeereboom committed Feb 27, 2024
1 parent 1eed5b4 commit 53dd680
Showing 1 changed file with 10 additions and 16 deletions.
26 changes: 10 additions & 16 deletions service/bss/bss.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,27 +228,21 @@ func (s *Server) handlePopPayoutsRequest(ctx context.Context, msg *bssapi.PopPay
log.Tracef("handlePopPayoutsRequest")
defer log.Tracef("handlePopPayoutsRequest exit")

// XXX FIXME
popTxsForL2BlockRequest := bfgapi.PopTxsForL2BlockRequest{
popTxsForL2BlockRes, err := s.callBFG(ctx, bfgapi.PopTxsForL2BlockRequest{
L2Block: msg.L2BlockForPayout,
}

popTxsForL2BlockRes, err := s.callBFG(ctx, &popTxsForL2BlockRequest)
})
if err != nil {
e := protocol.NewInternalErrorf("pop tx for l2: block %v", err)
return &bssapi.PopPayoutsResponse{
Error: protocol.Errorf("%v", err),
}, err
}

popPayouts := ConvertPopTxsToPopPayouts(
(popTxsForL2BlockRes.(*bfgapi.PopTxsForL2BlockResponse)).PopTxs,
)

popPayoutsResponse := bssapi.PopPayoutsResponse{
PopPayouts: popPayouts,
Error: e.WireError(),
}, e
}

return &popPayoutsResponse, nil
return &bssapi.PopPayoutsResponse{
PopPayouts: ConvertPopTxsToPopPayouts(
(popTxsForL2BlockRes.(*bfgapi.PopTxsForL2BlockResponse)).PopTxs,
),
}, nil
}

func (s *Server) handleL2KeytoneRequest(ctx context.Context, msg *bssapi.L2KeystoneRequest) (*bssapi.L2KeystoneResponse, error) {
Expand Down

0 comments on commit 53dd680

Please sign in to comment.