Skip to content

Commit

Permalink
fix: use npm package instead of git+https (#427)
Browse files Browse the repository at this point in the history
Fixes the @celo/celocli install bug

<!-- start pr-codex -->

---

## PR-Codex overview
This PR focuses on changing the dependency management for several
packages to use npm instead of GitHub URLs, along with updating the
versioning of the `@celo/hw-app-eth` package across various files.

### Detailed summary
- Updated dependencies in `packages/viem-account-ledger/package.json` to
use `@celo/hw-app-eth` from npm.
- Removed GitHub URL references for `@ledgerhq/hw-app-eth` in
`packages/viem-account-ledger/package.json`.
- Adjusted imports in multiple files to use `@celo/hw-app-eth` instead
of `@ledgerhq/hw-app-eth`.
- Updated `yarn.lock` to reflect changes in dependencies.

> ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your
question}`

<!-- end pr-codex -->
  • Loading branch information
nicolasbrugneaux authored Nov 13, 2024
1 parent 9df4bbf commit ee33677
Show file tree
Hide file tree
Showing 9 changed files with 270 additions and 194 deletions.
7 changes: 7 additions & 0 deletions .changeset/wild-impalas-smoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@celo/wallet-ledger': patch
'@celo/viem-account-ledger': patch
'@celo/celocli': patch
---

Change a dependency to use npm rather than github
7 changes: 2 additions & 5 deletions packages/sdk/wallets/wallet-ledger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
"dependencies": {
"@celo/base": "^7.0.0-beta.0",
"@celo/connect": "^6.0.3-beta.0",
"@celo/hw-app-eth": "^1.0.0",
"@celo/ledger-token-signer": "^0.4.0",
"@celo/utils": "^8.0.0-beta.0",
"@celo/wallet-base": "^6.0.2-beta.1",
"@celo/wallet-remote": "^6.0.2-beta.1",
"@ethereumjs/util": "8.0.5",
"@ledgerhq/errors": "^6.16.4",
"@ledgerhq/hw-app-eth": "git+https://github.com:celo-org/ledgerjs-hw-app-eth.git#commit=67c6c3e10929c06e5afd169c16fb8e52f6fda4de",
"@ledgerhq/hw-transport": "^6.30.6",
"debug": "^4.1.1",
"semver": "^7.6.0"
Expand All @@ -51,8 +51,5 @@
},
"engines": {
"node": ">=8.14.2"
},
"bundleDependencies": [
"@ledgerhq/hw-app-eth"
]
}
}
2 changes: 1 addition & 1 deletion packages/sdk/wallets/wallet-ledger/src/ledger-signer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { EIP712TypedData, structHash } from '@celo/utils/lib/sign-typed-data-uti
import { LegacyEncodedTx } from '@celo/wallet-base'
import * as ethUtil from '@ethereumjs/util'
import { TransportStatusError } from '@ledgerhq/errors'
import Ledger from '@ledgerhq/hw-app-eth'
import Ledger from '@celo/hw-app-eth'
import debugFactory from 'debug'
import { SemVer } from 'semver'
import { meetsVersionRequirements, transportErrorFriendlyMessage } from './ledger-utils'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
verifyEIP712TypedDataSigner,
} from '@celo/wallet-base'
import * as ethUtil from '@ethereumjs/util'
import Ledger from '@ledgerhq/hw-app-eth'
import Ledger from '@celo/hw-app-eth'
import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'
import { VerifyPublicKeyInput, createVerify } from 'crypto'
import { readFileSync } from 'fs'
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/wallets/wallet-ledger/src/ledger-wallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from '@celo/wallet-base'
import { RemoteWallet } from '@celo/wallet-remote'
import { TransportError, TransportStatusError } from '@ledgerhq/errors'
import Ledger from '@ledgerhq/hw-app-eth'
import Ledger from '@celo/hw-app-eth'
import debugFactory from 'debug'
import { SemVer } from 'semver'
import { LedgerSigner } from './ledger-signer'
Expand Down
2 changes: 1 addition & 1 deletion packages/viem-account-ledger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
},
"dependencies": {
"@celo/base": "^7.0.0-beta.0",
"@celo/hw-app-eth": "^1.0.0",
"@celo/ledger-token-signer": "^0.4.0",
"@ledgerhq/errors": "^6.16.4",
"@ledgerhq/hw-app-eth": "git+https://github.com:celo-org/ledgerjs-hw-app-eth.git",
"semver": "^7.6.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/viem-account-ledger/src/test-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ensureLeading0x, normalizeAddressWith0x, trimLeading0x } from '@celo/ba
import { generateTypedDataHash } from '@celo/utils/lib/sign-typed-data-utils.js'
import { getHashFromEncoded, signTransaction } from '@celo/wallet-base'
import * as ethUtil from '@ethereumjs/util'
import Eth from '@ledgerhq/hw-app-eth'
import Eth from '@celo/hw-app-eth'
import { createVerify, VerifyPublicKeyInput } from 'node:crypto'
import { readFileSync } from 'node:fs'
import { dirname, join } from 'node:path'
Expand Down
2 changes: 1 addition & 1 deletion packages/viem-account-ledger/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Eth from '@ledgerhq/hw-app-eth'
import Eth from '@celo/hw-app-eth'
import TransportNodeHid from '@ledgerhq/hw-transport-node-hid'
import { SemVer } from 'semver'
import { tokenInfoByAddressAndChainId } from './tokens.js'
Expand Down
Loading

0 comments on commit ee33677

Please sign in to comment.