@@ -29,15 +29,6 @@ type scope struct {
29
29
Id uint32 `json:"id"`
30
30
Params json.RawMessage `json:"params,omitempty"`
31
31
Query json.RawMessage `json:"query"`
32
- // TransactionData *transactionData `json:"transactionData,omitempty"`
33
- }
34
-
35
- // TransactionData is a property of Scope, and it's required for the authRequest
36
- type transactionData struct {
37
- ChainID int `json:"chainID"`
38
- ContractAddress string `json:"contractAddress"`
39
- MethodID string `json:"methodID"`
40
- Network string `json:"network"`
41
32
}
42
33
43
34
const (
@@ -91,7 +82,7 @@ func (vs *VerificationService) CreateVerificationQuery(ctx context.Context, issu
91
82
92
83
verificationQuery .ID = queryID
93
84
94
- authRequest , err := vs .getAuthRequestOffChain (& verificationQuery , serverURL )
85
+ authRequest , err := vs .getAuthRequestOffChain (ctx , & verificationQuery , serverURL )
95
86
if err != nil {
96
87
return nil , fmt .Errorf ("failed to generate auth request: %w" , err )
97
88
}
@@ -171,7 +162,7 @@ func (s *VerificationService) key(id uuid.UUID) string {
171
162
return "issuer-node:qr-code:" + id .String ()
172
163
}
173
164
174
- func (vs * VerificationService ) getAuthRequestOffChain (req * domain.VerificationQuery , serverURL string ) (protocol.AuthorizationRequestMessage , error ) {
165
+ func (vs * VerificationService ) getAuthRequestOffChain (ctx context. Context , req * domain.VerificationQuery , serverURL string ) (protocol.AuthorizationRequestMessage , error ) {
175
166
id := uuid .NewString ()
176
167
authReq := auth .CreateAuthorizationRequest (vs .getReason (nil ), req .IssuerDID , vs .getUri (serverURL , req .IssuerDID , req .ID ))
177
168
authReq .ID = id
@@ -182,7 +173,7 @@ func (vs *VerificationService) getAuthRequestOffChain(req *domain.VerificationQu
182
173
if req .Scope .Status == pgtype .Present {
183
174
err := json .Unmarshal (req .Scope .Bytes , & scopes )
184
175
if err != nil {
185
- log .Error (context . Background () , "failed to unmarshal scope" , "error" , err )
176
+ log .Error (ctx , "failed to unmarshal scope" , "error" , err )
186
177
return protocol.AuthorizationRequestMessage {}, fmt .Errorf ("failed to unmarshal scope: %w" , err )
187
178
}
188
179
}
0 commit comments