diff --git a/core/capabilities/webapi/trigger.go b/core/capabilities/webapi/trigger.go index 5dbb38500e4..870b1883d2d 100644 --- a/core/capabilities/webapi/trigger.go +++ b/core/capabilities/webapi/trigger.go @@ -241,7 +241,7 @@ func (h *triggerConnectorHandler) UnregisterTrigger(ctx context.Context, req cap func (h *triggerConnectorHandler) Start(ctx context.Context) error { return h.StartOnce("GatewayConnectorServiceWrapper", func() error { - return h.connector.AddHandler([]string{"web_trigger"}, h) + return h.connector.AddHandler([]string{"web_api_trigger"}, h) }) } func (h *triggerConnectorHandler) Close() error { diff --git a/core/scripts/gateway/web_api_trigger/invoke_trigger.go b/core/scripts/gateway/web_api_trigger/invoke_trigger.go index 00bc08b3489..610abc65e86 100644 --- a/core/scripts/gateway/web_api_trigger/invoke_trigger.go +++ b/core/scripts/gateway/web_api_trigger/invoke_trigger.go @@ -9,6 +9,8 @@ import ( "io" "net/http" "os" + "strconv" + "time" "github.com/ethereum/go-ethereum/crypto" "github.com/joho/godotenv" @@ -53,7 +55,7 @@ func main() { gatewayURL := flag.String("gateway_url", "http://localhost:5002", "Gateway URL") privateKey := flag.String("private_key", "65456ffb8af4a2b93959256a8e04f6f2fe0943579fb3c9c3350593aabb89023f", "Private key to sign the message with") messageID := flag.String("id", "12345", "Request ID") - methodName := flag.String("method", "web_trigger", "Method name") + methodName := flag.String("method", "web_api_trigger", "Method name") donID := flag.String("don_id", "workflow_don_1", "DON ID") flag.Parse() @@ -78,7 +80,7 @@ func main() { payload := `{ "trigger_id": "web-trigger@1.0.0", "trigger_event_id": "action_1234567890", - "timestamp": 1234567890, + "timestamp": ` + strconv.Itoa(int(time.Now().Unix())) + `, "topics": ["daily_price_update"], "params": { "bid": "101",