Skip to content

Commit

Permalink
Merge pull request #1 from 0xPolygonID/fixes
Browse files Browse the repository at this point in the history
few fixes
  • Loading branch information
ilya-korotya authored Dec 13, 2023
2 parents e5e221a + 544d2c5 commit 7611045
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ go 1.20

require (
github.com/ethereum/go-ethereum v1.13.1
github.com/go-chi/chi v1.5.5
github.com/go-chi/chi/v5 v5.0.10
github.com/google/uuid v1.3.0
github.com/iden3/contracts-abi/state/go/abi v1.0.1
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ github.com/fjl/memsize v0.0.0-20190710130421-bcb5799ab5e5 h1:FtmdgXiUlNeRsoNMFlK
github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI=
github.com/go-chi/chi v1.5.5 h1:vOB/HbEMt9QqBqErz07QehcOKHaWFtuj87tTDVz2qXE=
github.com/go-chi/chi v1.5.5/go.mod h1:C9JqLr3tIYjDOZpzn+BCuxY8z8vmca43EeMgyZt7irw=
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-ole/go-ole v1.2.5 h1:t4MGB5xEDZvXI+0rMjjsfBsD7yAgp/s9ZDkL1JndXwY=
Expand Down
2 changes: 1 addition & 1 deletion server/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/0xPolygonID/refresh-service/logger"
"github.com/0xPolygonID/refresh-service/service"
"github.com/go-chi/chi/middleware"
"github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/pkg/errors"
"github.com/rs/cors"
)
Expand Down
2 changes: 1 addition & 1 deletion server/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func zapContextLogger(next http.Handler) http.Handler {
"remoteAddr", r.RemoteAddr,
"responseTime", fmt.Sprintf("%d ms", time.Since(t1).Milliseconds()),
"status", ww.Status())
logger.DefaultLogger.Sync()
_ = logger.DefaultLogger.Sync()
}()

next.ServeHTTP(ww, r)
Expand Down
6 changes: 5 additions & 1 deletion service/issuer.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ func (is *IssuerService) CreateCredential(issuerDID string, credentialRequest cr
logger.DefaultLogger.Infof("use issuer node '%s' for issuer '%s'", issuerNode, issuerDID)

body := bytes.NewBuffer([]byte{})
json.NewEncoder(body).Encode(credentialRequest)
err = json.NewEncoder(body).Encode(credentialRequest)
if err != nil {
return id, errors.Wrapf(ErrCreateClaim,
"credential request serialization error")
}
resp, err := http.DefaultClient.Post(
fmt.Sprintf("%s/api/v1/identities/%s/claims", issuerNode, issuerDID),
"application/json",
Expand Down
2 changes: 1 addition & 1 deletion service/refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (rs *RefreshService) Process(issuer string,
if err != nil {
return verifiable.W3CCredential{},
errors.Wrapf(ErrCredentialNotUpdatable,
"for credential '%s' not possible to find a data provider", credential.ID, err)
"for credential '%s' not possible to find a data provider: %v", credential.ID, err)

}
updatedFields, err := flexibleHTTP.Provide(credential.CredentialSubject)
Expand Down

0 comments on commit 7611045

Please sign in to comment.