fix typo
rabbitprincess committed
Mar 22, 2026 at 00:16 UTC
3f968e2a2aa2dfa976427cc9556c95a7fbb885e9
2 files changed
+5
-5
sdk/api_client.go
+2
-2
@@ -160,8 +160,8 @@ func (a *apiClient) ensureCompatible(ctx context.Context, httpClient *http.Clien
160
}
161
return fmt.Errorf("%w: %w", errRelayIncompatible, err)
162
}
163
- if strings.TrimSpace(resp.Version) != types.SDKProtocolVersion {
164
- return fmt.Errorf("%w: relay sdk version mismatch: relay=%q client=%q", errRelayIncompatible, strings.TrimSpace(resp.Version), types.SDKProtocolVersion)
163
+ if strings.TrimSpace(resp.SDKVersion) != types.SDKProtocolVersion {
164
+ return fmt.Errorf("%w: relay sdk version mismatch: relay=%q client=%q", errRelayIncompatible, strings.TrimSpace(resp.SDKVersion), types.SDKProtocolVersion)
165
}
166
return nil
167
}
sdk/sdk_test.go
+3
-3
@@ -31,7 +31,7 @@ func TestNewListenerRegistersLeaseWithMainContract(t *testing.T) {
31
writeSDKTestEnvelope(w, http.StatusOK, types.APIEnvelope[types.DomainResponse]{
32
OK: true,
33
Data: types.DomainResponse{
34
- Version: types.SDKProtocolVersion,
34
+ SDKVersion: types.SDKProtocolVersion,
35
},
36
})
37
case types.PathSDKRegister:
@@ -143,7 +143,7 @@ func TestExposeResolvesOwnerPrivateKey(t *testing.T) {
143
writeSDKTestEnvelope(w, http.StatusOK, types.APIEnvelope[types.DomainResponse]{
144
OK: true,
145
Data: types.DomainResponse{
146
- Version: types.SDKProtocolVersion,
146
+ SDKVersion: types.SDKProtocolVersion,
147
},
148
})
149
case types.PathSDKRegister:
@@ -213,7 +213,7 @@ func TestExposeGeneratesOwnerAddressWithoutPrivateKey(t *testing.T) {
213
writeSDKTestEnvelope(w, http.StatusOK, types.APIEnvelope[types.DomainResponse]{
214
OK: true,
215
Data: types.DomainResponse{
216
- Version: types.SDKProtocolVersion,
216
+ SDKVersion: types.SDKProtocolVersion,
217
},
218
})
219
case types.PathSDKRegister: