Skip to content

Commit

Permalink
chore: error check (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
matjaz authored Sep 2, 2024
1 parent dd3d66e commit c652e9b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions wails/wails_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,9 @@ func (app *WailsApp) WailsRequestRouter(route string, method string, body string
case "/api/wallet/sign-message":
signMessageRequest := &api.SignMessageRequest{}
err := json.Unmarshal([]byte(body), signMessageRequest)
if err != nil {
return WailsRequestRouterResponse{Body: nil, Error: err.Error()}
}
signMessageResponse, err := app.api.SignMessage(ctx, signMessageRequest.Message)
if err != nil {
return WailsRequestRouterResponse{Body: nil, Error: err.Error()}
Expand All @@ -469,6 +472,9 @@ func (app *WailsApp) WailsRequestRouter(route string, method string, body string
case "/api/lsp-orders":
newInstantChannelRequest := &api.LSPOrderRequest{}
err := json.Unmarshal([]byte(body), newInstantChannelRequest)
if err != nil {
return WailsRequestRouterResponse{Body: nil, Error: err.Error()}
}
newInstantChannelResponse, err := app.api.RequestLSPOrder(ctx, newInstantChannelRequest)
if err != nil {
return WailsRequestRouterResponse{Body: nil, Error: err.Error()}
Expand Down

0 comments on commit c652e9b

Please sign in to comment.