From 82ac55f7c7123324bb8826ccc18403d7f401f6c3 Mon Sep 17 00:00:00 2001 From: vbasiuk Date: Tue, 9 Jul 2024 13:09:23 +0300 Subject: [PATCH] StateContractAddress --- pkg/services/did.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/services/did.go b/pkg/services/did.go index a94788b..8c9ef2a 100644 --- a/pkg/services/did.go +++ b/pkg/services/did.go @@ -96,11 +96,11 @@ func (d *DidDocumentServices) GetDidDocument(ctx context.Context, did string, op addr, err := core.EthAddressFromID(userID) - blockchainID := resolver.BlockchainID() + chainIdStateAddress := resolver.BlockchainID() if err == nil { addressString := fmt.Sprintf("%x", addr) - blockchainAccountID := fmt.Sprintf("eip155:%s:0x%s", strings.Split(blockchainID, ":")[0], addressString) + blockchainAccountID := fmt.Sprintf("eip155:%s:0x%s", strings.Split(chainIdStateAddress, ":")[0], addressString) didResolution.DidDocument.VerificationMethod = append( didResolution.DidDocument.VerificationMethod, verifiable.CommonVerificationMethod{ @@ -116,10 +116,10 @@ func (d *DidDocumentServices) GetDidDocument(ctx context.Context, did string, op didResolution.DidDocument.VerificationMethod = append( didResolution.DidDocument.VerificationMethod, verifiable.CommonVerificationMethod{ - ID: getRepresentaionID(did, identityState), - Type: document.StateType, - BlockchainAccountID: blockchainID, - Controller: did, + ID: getRepresentaionID(did, identityState), + Type: document.StateType, + StateContractAddress: chainIdStateAddress, + Controller: did, IdentityState: verifiable.IdentityState{ Published: &isPublished, Info: info,