Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix test identifier backwards compatibility test #207

Merged
merged 6 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .changeset/nice-laws-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
2 changes: 2 additions & 0 deletions .changeset/tender-frogs-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
5 changes: 3 additions & 2 deletions packages/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"clean": "yarn run --top-level tsc --build . --clean",
"docs": "typedoc",
"test": "yarn jest --runInBand --testPathIgnorePatterns src/odis/identifier-backwards-compatibility.test.ts",
"test:backwards-compatibility": "yarn jest src/odis/identifier-backwards-compatibility.test.ts",
"lint": "yarn run --top-level eslint .",
"prepublish": "yarn build"
},
Expand Down Expand Up @@ -46,8 +47,8 @@
"fetch-mock": "9.11.0",
"ganache": "npm:@celo/[email protected]",
"jest": "^29.7.0",
"old-celo-base": "npm:@celo/base@5.0.0",
"old-identity-sdk": "npm:@celo/identity@1.5.2"
"old-celo-base": "npm:@celo/base@1.5.2",
"old-celo-identity": "npm:@celo/identity@5.1.0"
},
"engines": {
"node": ">=16"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { getPhoneHash } from 'old-celo-base'
import { soliditySha3 } from '@celo/utils/lib/solidity'
import { OdisUtils as OdisUtilsOld } from 'old-identity-sdk'
import { getPhoneHash } from 'old-celo-base'
import { OdisUtils as OdisUtilsOld } from 'old-celo-identity'
import { OdisUtils } from '../../lib'
import fetchMock from '../__mocks__/cross-fetch'
import { WasmBlsBlindingClient } from './bls-blinding-client'
import { AuthenticationMethod, AuthSigner, getServiceContext, OdisContextName } from './query'
import fetchMock from '../__mocks__/cross-fetch'

const { getBlindedIdentifier, getIdentifierHash, getObfuscatedIdentifier, IdentifierPrefix } =
OdisUtils.Identifier
Expand All @@ -20,8 +20,11 @@ const authSigner: AuthSigner = {
authenticationMethod: AuthenticationMethod.ENCRYPTION_KEY,
rawKey: dekPrivateKey,
}
const oldServiceContext = OdisUtilsOld.Query.getServiceContext('alfajores')
const oldServiceContext = OdisUtilsOld.Query.getServiceContext(
OdisUtilsOld.Query.OdisContextName.ALFAJORES,
)
const currentServiceContext = getServiceContext(OdisContextName.ALFAJORES)
oldServiceContext.odisUrl = currentServiceContext.odisUrl

const expectedObfuscatedIdentifier =
'0xf82c6272fd57d3e5d4e291be16b3ebac5c616084a5e6f3730c73f62efd39c6ae'
Expand Down
Loading
Loading