feat: attribute typing #40

Merged
0xmuralik merged 24 commits from murali/attribute-typing into main 2022-11-15 06:21:14 +00:00
Showing only changes of commit a1f03a59bd - Show all commits

View File

@ -296,6 +296,7 @@ func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) erro
switch record.Attributes["type"] { switch record.Attributes["type"] {
case "ServiceProviderRegistration": case "ServiceProviderRegistration":
{ {
// #nosec G705
for key := range record.Attributes { for key := range record.Attributes {
if key == "x500" { if key == "x500" {
// #nosec G705 // #nosec G705
@ -315,6 +316,7 @@ func (k Keeper) ProcessAttributes(ctx sdk.Context, record types.RecordType) erro
} }
case "WebsiteRegistrationRecord": case "WebsiteRegistrationRecord":
{ {
// #nosec G705
for key := range record.Attributes { for key := range record.Attributes {
indexKey := GetAttributesIndexKey(key, record.Attributes[key]) indexKey := GetAttributesIndexKey(key, record.Attributes[key])
if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil { if err := k.SetAttributeMapping(ctx, indexKey, record.ID); err != nil {