Skip to content

Commit

Permalink
chore: change hw sdk to forked one (#3281)
Browse files Browse the repository at this point in the history
Co-authored-by: homura <[email protected]>
  • Loading branch information
Keith-CY and homura authored Dec 13, 2024
1 parent 56576e4 commit 3d3546f
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 49 deletions.
2 changes: 1 addition & 1 deletion packages/neuron-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"@ckb-lumos/helpers": "0.23.0",
"@ckb-lumos/lumos": "0.23.0",
"@ckb-lumos/rpc": "0.23.0",
"@magickbase/hw-app-ckb": "0.2.0-alpha.0",
"@iarna/toml": "2.2.5",
"@ledgerhq/hw-transport-node-hid": "6.27.22",
"@spore-sdk/core": "0.1.0",
Expand All @@ -59,7 +60,6 @@
"electron-updater": "6.3.0",
"electron-window-state": "5.0.3",
"elliptic": "6.6.0",
"hw-app-ckb": "0.1.2",
"i18next": "21.10.0",
"leveldown": "6.1.1",
"levelup": "4.4.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/src/services/hardware/ledger.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { DeviceInfo, ExtendedPublicKey } from './common'
import { Hardware } from './hardware'
import HID from '@ledgerhq/hw-transport-node-hid'
import LedgerCKB from 'hw-app-ckb'
import LedgerCKB from '@magickbase/hw-app-ckb'
import type { DescriptorEvent, Subscription, Observer } from '@ledgerhq/hw-transport'
import type Transport from '@ledgerhq/hw-transport'
import { Observable, timer } from 'rxjs'
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/src/types/ledger.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Until there's a @types/hw-app-ckb
// import type Transport from '@ledgerhq/hw-transport'
declare module '@ledgerhq/hw-transport-node-ble'
declare module 'hw-app-ckb' {
declare module '@magickbase/hw-app-ckb' {
export interface WalletPublicKey {
publicKey: string
lockArg: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import Ledger from '../../../src/services/hardware/ledger'

const getWalletExtendedPublicKeyMock = jest.fn()

jest.mock('hw-app-ckb', () => {
jest.mock('@magickbase/hw-app-ckb', () => {
return function () {
return {
getWalletExtendedPublicKey: getWalletExtendedPublicKeyMock,
Expand Down
2 changes: 1 addition & 1 deletion packages/neuron-wallet/tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ jest.mock('@ledgerhq/hw-transport-node-hid', () => {
return LedgerHID
})

jest.mock('hw-app-ckb', () => {
jest.mock('@magickbase/hw-app-ckb', () => {
return LedgerCkbApp
})
58 changes: 14 additions & 44 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3414,6 +3414,16 @@
yargs "17.7.2"
yargs-parser "21.1.1"

"@magickbase/[email protected]":
version "0.2.0-alpha.0"
resolved "https://registry.yarnpkg.com/@magickbase/hw-app-ckb/-/hw-app-ckb-0.2.0-alpha.0.tgz#903dea98bc349e32f39015fdebb95f8fe3436ab5"
integrity sha512-qphkM7WNQ1bLTvUS6VsJXaqyUg+kDzw+A2PAeCaQ0f3LhYqeTkg7keIGgPCUro7UTijatUxgkD903xq6VIuDlA==
dependencies:
"@ledgerhq/hw-transport" "^5.9.0"
bech32 "2.0.0"
bip32-path "0.4.2"
blake2b-wasm "2.1.0"

"@malept/cross-spawn-promise@^1.1.0":
version "1.1.1"
resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d"
Expand Down Expand Up @@ -7600,12 +7610,7 @@ [email protected]:
resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
integrity sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==

[email protected]:
version "1.1.4"
resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9"
integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ==

bech32@^2.0.0:
[email protected], bech32@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/bech32/-/bech32-2.0.0.tgz#078d3686535075c8c79709f054b1b226a133b355"
integrity sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==
Expand Down Expand Up @@ -12267,16 +12272,6 @@ [email protected]:
resolved "https://registry.yarnpkg.com/husky/-/husky-8.0.3.tgz#4936d7212e46d1dea28fef29bb3a108872cd9184"
integrity sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==

[email protected]:
version "0.1.2"
resolved "https://registry.yarnpkg.com/hw-app-ckb/-/hw-app-ckb-0.1.2.tgz#ca5b69ebcd4009af5cf0002c09e61962721d7e74"
integrity sha512-ruzlfQpo/jeByaPCNNlzGlZdfhFTeTwIWfAJDZaBjspvWLOzSi1L1gV/NsjRS+B03rI4gR5HAnQJiblrnf4d7A==
dependencies:
"@ledgerhq/hw-transport" "^5.9.0"
bech32 "1.1.4"
bip32-path "0.4.2"
blake2b-wasm "2.1.0"

[email protected]:
version "21.10.0"
resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.10.0.tgz#85429af55fdca4858345d0e16b584ec29520197d"
Expand Down Expand Up @@ -18974,16 +18969,7 @@ string-natural-compare@^3.0.1:
resolved "https://registry.yarnpkg.com/string-natural-compare/-/string-natural-compare-3.0.1.tgz#7a42d58474454963759e8e8b7ae63d71c1e7fdf4"
integrity sha512-n3sPwynL1nwKi3WJ6AIsClwBMa0zTi54fn2oLU6ndfTSIO05xaznjSf15PcBZU6FNWbmN5Q6cxT4V5hGvB4taw==

"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -19101,14 +19087,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -20858,16 +20837,7 @@ [email protected]:
"@types/trusted-types" "^2.0.2"
workbox-core "6.6.1"

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand Down

2 comments on commit 3d3546f

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 12308959849

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 12308961177

Please sign in to comment.