diff --git a/server/server.go b/server/server.go index a2e906d1..b30ac873 100644 --- a/server/server.go +++ b/server/server.go @@ -9,6 +9,7 @@ import ( "net/http" "path" "strconv" + "strings" "time" "github.com/Layr-Labs/eigenda-proxy/commitments" @@ -260,6 +261,10 @@ func ReadCommitmentMode(r *http.Request) (commitments.CommitmentMode, error) { if key == "" { // default commit := path.Base(r.URL.Path) if len(commit) > 0 && commit != "put" { // provided commitment in request params + if !strings.HasPrefix(commit, "0x") { + commit = "0x" + commit + } + decodedCommit, err := hexutil.Decode(commit) if err != nil { return commitments.SimpleCommitmentMode, err