Skip to content

Commit

Permalink
Removed Unused ODIS Dependency (#10987)
Browse files Browse the repository at this point in the history
removed odis dependency
  • Loading branch information
soloseng authored May 3, 2024
1 parent 2d925d7 commit 3fec0b2
Show file tree
Hide file tree
Showing 3 changed files with 285 additions and 119 deletions.
46 changes: 19 additions & 27 deletions packages/protocol/lib/test-utils.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,28 @@
import { ArtifactsSingleton } from '@celo/protocol/lib/artifactsSingleton'
import { hasEntryInRegistry, usesRegistry } from '@celo/protocol/lib/registry-utils'
import { getParsedSignatureOfAddress } from '@celo/protocol/lib/signing-utils'
import { getDeployedProxiedContract } from '@celo/protocol/lib/web3-utils'
import { config } from '@celo/protocol/migrationsConfig'
import { privateKeyToAddress } from '@celo/utils/lib/address'
import { soliditySha3 } from '@celo/utils/lib/solidity'
import BigNumber from 'bignumber.js'
import chai from 'chai'
import chaiSubset from 'chai-subset'
import { ArtifactsSingleton } from '@celo/protocol/lib/artifactsSingleton';
import { hasEntryInRegistry, usesRegistry } from '@celo/protocol/lib/registry-utils';
import { getParsedSignatureOfAddress } from '@celo/protocol/lib/signing-utils';
import { getDeployedProxiedContract } from '@celo/protocol/lib/web3-utils';
import { config } from '@celo/protocol/migrationsConfig';
import { privateKeyToAddress } from '@celo/utils/lib/address';
import { soliditySha3 } from '@celo/utils/lib/solidity';
import BigNumber from 'bignumber.js';
import chai from 'chai';
import chaiSubset from 'chai-subset';
// eslint-disable-next-line: ordered-imports
import { spawn, SpawnOptions } from 'child_process'
import { keccak256 } from 'ethereum-cryptography/keccak'
import { GovernanceApproverMultiSigInstance, GovernanceInstance, LockedGoldInstance, ProxyInstance, RegistryInstance, UsingRegistryInstance } from 'types'
import Web3 from 'web3'
import { ContractPackage, MENTO_PACKAGE } from '../contractPackages'
import { spawn, SpawnOptions } from 'child_process';
import { keccak256 } from 'ethereum-cryptography/keccak';
import { GovernanceApproverMultiSigInstance, GovernanceInstance, LockedGoldInstance, ProxyInstance, RegistryInstance, UsingRegistryInstance } from 'types';
import Web3 from 'web3';
import { ContractPackage, MENTO_PACKAGE } from '../contractPackages';

/* eslint:disabled ordered-imports: 0 */
import { getIdentifierHash, IdentifierPrefix } from "@celo/odis-identifiers"
import { fromFixed } from '@celo/utils/lib/fixidity'
import { bufferToHex, toBuffer } from '@ethereumjs/util'
import { utf8ToBytes } from 'ethereum-cryptography/utils'
import { AccountsInstance } from 'types'
import { fromFixed } from '@celo/utils/lib/fixidity';
import { bufferToHex, toBuffer } from '@ethereumjs/util';
import { utf8ToBytes } from 'ethereum-cryptography/utils';
import { AccountsInstance } from 'types';


import BN = require('bn.js')
export function getOdisHash(
phoneNumber: string,
pepper?: string,
prefix = IdentifierPrefix.PHONE_NUMBER,
) {
return getIdentifierHash(Web3.utils.sha3, phoneNumber, prefix, pepper);
}

const isNumber = (x: any) =>
typeof x === 'number' || (BN as any).isBN(x) || BigNumber.isBigNumber(x)
Expand Down
1 change: 0 additions & 1 deletion packages/protocol/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@
"devDependencies": {
"@tsconfig/recommended": "^1.0.3",
"@celo/dev-utils":"^0.0.3",
"@celo/odis-identifiers": "^1.0.0",
"@celo/typechain-target-web3-v1-celo": "^1.0.0",
"@celo/typescript": "0.0.1",
"@jest/globals": "^29.5.0",
Expand Down
Loading

0 comments on commit 3fec0b2

Please sign in to comment.