From dcd782e5cc6fa2b1ea1bbe8f6c018aa5419faf6a Mon Sep 17 00:00:00 2001 From: vbasiuk Date: Tue, 9 Jul 2024 13:09:13 +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 ab0c3e0..9f26c7c 100644 --- a/pkg/services/did.go +++ b/pkg/services/did.go @@ -95,11 +95,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{ @@ -115,10 +115,10 @@ func (d *DidDocumentServices) GetDidDocument(ctx context.Context, did string, op didResolution.DidDocument.VerificationMethod = append( didResolution.DidDocument.VerificationMethod, verifiable.CommonVerificationMethod{ - ID: fmt.Sprintf("%s#stateInfo", did), - Type: document.StateType, - Controller: did, - BlockchainAccountID: blockchainID, + ID: fmt.Sprintf("%s#stateInfo", did), + Type: document.StateType, + Controller: did, + StateContractAddress: chainIdStateAddress, IdentityState: verifiable.IdentityState{ Published: &isPublished, Info: info,