@@ -106,9 +106,9 @@ const cidGravityMinerCheckLabel = "cidg-miner-status-check"
106
106
const agentName = "curio"
107
107
108
108
var commonHeaders = http.Header {
109
- "X-Agent" : []string {"curio-market- storage-filter " },
110
- "X-Agent -Version" : []string {"1.0" },
111
- "Content-Type" : []string {"application/json" },
109
+ "X-CIDgravity- Agent" : []string {"CIDgravity- storage-Connector " },
110
+ "X-CIDgravity -Version" : []string {"1.0" },
111
+ "Content-Type" : []string {"application/json" },
112
112
}
113
113
114
114
func (m * MK12 ) cidGravityCheck (ctx context.Context , deal * ProviderDealState ) (bool , string , error ) {
@@ -130,6 +130,9 @@ func (m *MK12) cidGravityCheck(ctx context.Context, deal *ProviderDealState) (bo
130
130
}
131
131
if lableStr == cidGravityMinerCheckLabel {
132
132
req , err = http .NewRequest ("POST" , cidGravityMinerCheckUrl , bytes .NewBuffer (data ))
133
+ if err != nil {
134
+ return false , "" , xerrors .Errorf ("Error creating request: %v" , err )
135
+ }
133
136
}
134
137
} else {
135
138
req , err = http .NewRequest ("POST" , cidGravityDealCheckUrl , bytes .NewBuffer (data ))
@@ -140,6 +143,8 @@ func (m *MK12) cidGravityCheck(ctx context.Context, deal *ProviderDealState) (bo
140
143
141
144
// Add necessary headers
142
145
req .Header = commonHeaders
146
+ req .Header .Set ("X-API-KEY" , m .cfg .Market .StorageMarketConfig .MK12 .CIDGravityToken )
147
+ req .Header .Set ("X-Address-ID" , deal .ClientDealProposal .Proposal .Provider .String ())
143
148
req .Header .Set ("Authorization" , m .cfg .Market .StorageMarketConfig .MK12 .CIDGravityToken )
144
149
145
150
// Execute the request
0 commit comments