From 3b56ec9d9edd81827d8a6afc3d0bc3245c183139 Mon Sep 17 00:00:00 2001 From: Felipe Andrade Date: Fri, 2 Jun 2023 14:11:49 -0700 Subject: [PATCH] fix targets --- proxyd/proxyd/proxyd.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/proxyd/proxyd/proxyd.go b/proxyd/proxyd/proxyd.go index 4a523f6..f1e9275 100644 --- a/proxyd/proxyd/proxyd.go +++ b/proxyd/proxyd/proxyd.go @@ -328,12 +328,13 @@ func Start(config *Config) (*Server, func(), error) { func validateReceiptsTarget(val string) (string, error) { if val == "" { - val = "debug_getRawReceipts" + val = ReceiptsTargetDebugGetRawReceipts } switch val { - case "debug_getRawReceipts", - "eth_getTransactionReceipt", - "alchemy_getTransactionReceipts": + case ReceiptsTargetDebugGetRawReceipts, + ReceiptsTargetAlchemyGetTransactionReceipts, + ReceiptsTargetEthGetTransactionReceipts, + ReceiptsTargetParityGetTransactionReceipts: return val, nil default: return "", fmt.Errorf("invalid receipts target: %s", val)