Skip to content

Commit

Permalink
minor verify proof response fix
Browse files Browse the repository at this point in the history
  • Loading branch information
freigeistig committed Mar 1, 2024
1 parent cbed47d commit f728d1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,6 @@ post:
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
data:
type: object
$ref: '#/components/schemas/Claim'
'500':
description: Internal Error
content:
Expand Down
16 changes: 2 additions & 14 deletions internal/service/api/handlers/verify_proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/ethereum/go-ethereum/crypto"
"github.com/rarimo/proof-verification-relayer/internal/data"
"github.com/rarimo/proof-verification-relayer/internal/service/api/requests"
"github.com/rarimo/proof-verification-relayer/resources"
"gitlab.com/distributed_lab/ape"
"gitlab.com/distributed_lab/ape/problems"
"net/http"
Expand Down Expand Up @@ -52,7 +51,7 @@ func VerifyProof(w http.ResponseWriter, r *http.Request) {
NetworkConfig(r).LockNonce()
defer NetworkConfig(r).UnlockNonce()

tx, err := types.SignNewTx(
if _, err := types.SignNewTx(
NetworkConfig(r).PrivateKey,
types.NewCancunSigner(NetworkConfig(r).ChainID),
&types.LegacyTx{
Expand All @@ -62,8 +61,7 @@ func VerifyProof(w http.ResponseWriter, r *http.Request) {
To: &verifierAddress,
Data: dataBytes,
},
)
if err != nil {
); err != nil {
Log(r).WithError(err).Error("failed to sign new tx")
ape.RenderErr(w, problems.InternalError())
return
Expand All @@ -76,14 +74,4 @@ func VerifyProof(w http.ResponseWriter, r *http.Request) {
ape.RenderErr(w, problems.InternalError())
return
}

ape.Render(w, resources.Tx{
Key: resources.Key{
ID: tx.Hash().String(),
Type: resources.TXS,
},
Attributes: resources.TxAttributes{
TxHash: tx.Hash().String(),
},
})
}

0 comments on commit f728d1c

Please sign in to comment.