diff --git a/frontend/service.go b/frontend/service.go index 0c9cc088..0b6e0952 100644 --- a/frontend/service.go +++ b/frontend/service.go @@ -288,6 +288,11 @@ func (s *lwdStreamer) SendTransaction(ctx context.Context, rawtx *walletrpc.RawT // Result: // "hex" (string) The transaction hash in hex + // Verify rawtx + if rawtx == nil || rawtx.Data == nil { + return nil, errors.New("Bad transaction data") + } + // Construct raw JSON-RPC params params := make([]json.RawMessage, 1) txJSON, err := json.Marshal(hex.EncodeToString(rawtx.Data))