diff --git a/.github/workflows/pr-any.yml b/.github/workflows/pr-any.yml index 525a0d30..b4c33f92 100644 --- a/.github/workflows/pr-any.yml +++ b/.github/workflows/pr-any.yml @@ -45,7 +45,7 @@ jobs: # with: # args: yarn e2e - name: Upload artifact - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: build path: | diff --git a/package.json b/package.json index cc86607f..880cbc5a 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "@polkadot/dev": "^0.79.3", "@polkadot/dev-test": "^0.79.3", "@polkadot/types": "^12.3.1", - "@polymeshassociation/polymesh-sdk": "^24.6.0", + "@polymeshassociation/polymesh-sdk": "^26.0.0-beta.2", "@semantic-release/changelog": "^6.0.3", "@semantic-release/exec": "^6.0.3", "@semantic-release/git": "^10.0.1", diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index b79d3855..75df4cd7 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -217,11 +217,23 @@ const initApiPromise = (network: NetworkName, networkUrl: string) => did = isMsPrimaryKey ? msLinkedKeyInfoObj.asPrimaryKey.toString() - : msLinkedKeyInfoObj.asSecondaryKey[0].toString(); + : ( + // This check is required for backwards compatibility with Polymesh v6 + // TODO: remove after v7 update + msLinkedKeyInfoObj.asSecondaryKey.length === 32 + ? msLinkedKeyInfoObj.asSecondaryKey.toString() + : msLinkedKeyInfoObj.asSecondaryKey[0].toString() + ); } else { did = isPrimary ? linkedKeyInfoObj.asPrimaryKey.toString() - : linkedKeyInfoObj.asSecondaryKey[0].toString(); + : ( + // This check is required for backwards compatibility with Polymesh v6 + // TODO: remove after v7 update + linkedKeyInfoObj.asSecondaryKey.length === 32 + ? linkedKeyInfoObj.asSecondaryKey.toString() + : linkedKeyInfoObj.asSecondaryKey[0].toString() + ); } // Initialize identity state for network:did pair diff --git a/yarn.lock b/yarn.lock index b71d0276..b91e7e53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2268,9 +2268,9 @@ __metadata: languageName: unknown linkType: soft -"@polymeshassociation/polymesh-sdk@npm:^24.6.0": - version: 24.6.0 - resolution: "@polymeshassociation/polymesh-sdk@npm:24.6.0" +"@polymeshassociation/polymesh-sdk@npm:^26.0.0-beta.2": + version: 26.0.0-beta.2 + resolution: "@polymeshassociation/polymesh-sdk@npm:26.0.0-beta.2" dependencies: "@apollo/client": "npm:^3.8.1" "@polkadot/api": "npm:11.2.1" @@ -2288,7 +2288,7 @@ __metadata: patch-package: "npm:^8.0.0" semver: "npm:^7.5.4" websocket: "npm:^1.0.34" - checksum: 10c0/6c604be2cf0cc465613225e511b84b886b17087a966ae6166fe84022029bb6ada10c1d9b7c31efa3036e1a0d1d5615e547d38a94c2d2aea998462880df7812d8 + checksum: 10c0/4d4065328aeefa4b947fde8e8d037024b7af38283a5117651c043c3ef509a34520b52ee91487157b8a17a87a18a58e011f85ab39a03e1512afb40ed0d5947c6a languageName: node linkType: hard @@ -14811,7 +14811,7 @@ __metadata: "@polkadot/dev": "npm:^0.79.3" "@polkadot/dev-test": "npm:^0.79.3" "@polkadot/types": "npm:^12.3.1" - "@polymeshassociation/polymesh-sdk": "npm:^24.6.0" + "@polymeshassociation/polymesh-sdk": "npm:^26.0.0-beta.2" "@semantic-release/changelog": "npm:^6.0.3" "@semantic-release/exec": "npm:^6.0.3" "@semantic-release/git": "npm:^10.0.1"