Skip to content

Commit

Permalink
fix: update blockchainAccountId to the new CAIP10 format (#153)
Browse files Browse the repository at this point in the history
* use CAIP10 format for `blockchainAccountId`.
* update tests to expect the new format.

fixes #152

BREAKING CHANGE: Apps have to update their processing of `blockchainAccountId` to use the [new CAIP10 format](https://github.com/ChainAgnostic/CAIPs/blob/master/CAIPs/caip-10.md)
  • Loading branch information
About7Sharks authored and mirceanis committed Jun 5, 2022
1 parent 2a66a2b commit 9c3f401
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 69 deletions.
16 changes: 8 additions & 8 deletions src/__tests__/networks.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ describe('ethrResolver (alt-chains)', () => {
id: 'did:ethr:0x26bf14321004e770e7a8b080b7a526d8eed8b388#controller',
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: 'did:ethr:0x26bf14321004e770e7a8b080b7a526d8eed8b388',
blockchainAccountId: '0x26bF14321004e770E7A8b080b7a526d8eed8b388@eip155:1',
blockchainAccountId: 'eip155:1:0x26bF14321004e770E7A8b080b7a526d8eed8b388',
},
],
authentication: ['did:ethr:0x26bf14321004e770e7a8b080b7a526d8eed8b388#controller'],
Expand Down Expand Up @@ -62,7 +62,7 @@ describe('ethrResolver (alt-chains)', () => {
id: `${did}#controller`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: did,
blockchainAccountId: `${checksumAddr}@eip155:3`,
blockchainAccountId: `eip155:3:${checksumAddr}`,
},
],
authentication: [`${did}#controller`],
Expand Down Expand Up @@ -92,7 +92,7 @@ describe('ethrResolver (alt-chains)', () => {
id: `${did}#controller`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: did,
blockchainAccountId: `${checksumAddr}@eip155:4`,
blockchainAccountId: `eip155:4:${checksumAddr}`,
},
],
authentication: [`${did}#controller`],
Expand Down Expand Up @@ -122,7 +122,7 @@ describe('ethrResolver (alt-chains)', () => {
id: `${did}#controller`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: did,
blockchainAccountId: `${checksumAddr}@eip155:42`,
blockchainAccountId: `eip155:42:${checksumAddr}`,
},
],
authentication: [`${did}#controller`],
Expand Down Expand Up @@ -150,7 +150,7 @@ describe('ethrResolver (alt-chains)', () => {
id: `${did}#controller`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: did,
blockchainAccountId: `${checksumAddr}@eip155:30`,
blockchainAccountId: `eip155:30:${checksumAddr}`,
},
],
authentication: [`${did}#controller`],
Expand Down Expand Up @@ -178,7 +178,7 @@ describe('ethrResolver (alt-chains)', () => {
id: `${did}#controller`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: did,
blockchainAccountId: `${checksumAddr}@eip155:31`,
blockchainAccountId: `eip155:31:${checksumAddr}`,
},
],
authentication: [`${did}#controller`],
Expand Down Expand Up @@ -206,7 +206,7 @@ describe('ethrResolver (alt-chains)', () => {
id: `${did}#controller`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: did,
blockchainAccountId: '0xF3beAC30C498D9E26865F34fCAa57dBB935b0D74@eip155:30',
blockchainAccountId: 'eip155:30:0xF3beAC30C498D9E26865F34fCAa57dBB935b0D74',
},
{
id: `${did}#controllerKey`,
Expand Down Expand Up @@ -252,7 +252,7 @@ describe('ethrResolver (alt-chains)', () => {
id: `${did}#controller`,
type: 'EcdsaSecp256k1RecoveryMethod2020',
controller: did,
blockchainAccountId: '0x7a988202a04f00436f73972DF4dEfD80c3A6BD13@eip155:1313161554',
blockchainAccountId: 'eip155:1313161554:0x7a988202a04f00436f73972DF4dEfD80c3A6BD13',
},
{
id: `${did}#controllerKey`,
Expand Down
Loading

0 comments on commit 9c3f401

Please sign in to comment.