Skip to content

Commit

Permalink
chore: Rename field NetworkData rhsMode to credentialStatus in API
Browse files Browse the repository at this point in the history
  • Loading branch information
x1m3 committed Nov 4, 2024
1 parent e546463 commit 195d1f9
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions api/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2213,12 +2213,12 @@ components:
type: object
required:
- name
- rhsMode
- credentialStatus
properties:
name:
type: string
example: "amoy"
rhsMode:
credentialStatus:
type: array
items:
type: string
Expand Down
4 changes: 2 additions & 2 deletions internal/api/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions internal/api/networks.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ func (s *Server) supportedNetworksData(ctx context.Context, blockchain string, n
continue
}
types := s.networkResolver.SupportedCredentialStatusTypes(rhsSettings.Mode)
rhsMode := make([]string, 0, len(types))
credentialStatusTypes := make([]string, 0, len(types))
for _, t := range types {
rhsMode = append(rhsMode, string(t))
credentialStatusTypes = append(credentialStatusTypes, string(t))
}
nd = append(nd, NetworkData{
Name: network,
RhsMode: rhsMode,
Name: network,
CredentialStatus: credentialStatusTypes,
})
}
return nd
Expand Down
4 changes: 2 additions & 2 deletions internal/api/networks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func TestServer_GetSupportedNetworks(t *testing.T) {
assert.Equal(t, "polygon", response[0].Blockchain)
assert.Equal(t, []NetworkData{
{
Name: "amoy",
RhsMode: []string{"Iden3commRevocationStatusV1.0"},
Name: "amoy",
CredentialStatus: []string{"Iden3commRevocationStatusV1.0"},
},
}, response[0].Networks)
}
Expand Down

0 comments on commit 195d1f9

Please sign in to comment.