Skip to content

Commit

Permalink
StateContractAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Jul 9, 2024
1 parent 6b350f0 commit dcd782e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/services/did.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Check failure on line 98 in pkg/services/did.go

View workflow job for this annotation

GitHub Actions / lint

ST1003: var chainIdStateAddress should be chainIDStateAddress (stylecheck)

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{
Expand All @@ -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,
Expand Down

0 comments on commit dcd782e

Please sign in to comment.