Skip to content

Commit

Permalink
Merge in master again, fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
0xMillz committed Oct 18, 2023
2 parents 33d5302 + 38eeeb7 commit c4766cf
Show file tree
Hide file tree
Showing 29 changed files with 93 additions and 85 deletions.
32 changes: 16 additions & 16 deletions examples/sandbox/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-sandbox",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"private": true,
"browserslist": "> 0.5%, last 2 versions, not dead",
Expand All @@ -11,21 +11,21 @@
},
"dependencies": {
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.52.4",
"@shapeshiftoss/hdwallet-keplr": "1.52.4",
"@shapeshiftoss/hdwallet-ledger": "1.52.4",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.52.4",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.52.4",
"@shapeshiftoss/hdwallet-metamask": "1.52.4",
"@shapeshiftoss/hdwallet-native": "1.52.4",
"@shapeshiftoss/hdwallet-portis": "1.52.4",
"@shapeshiftoss/hdwallet-tallyho": "1.52.4",
"@shapeshiftoss/hdwallet-trezor": "1.52.4",
"@shapeshiftoss/hdwallet-trezor-connect": "1.52.4",
"@shapeshiftoss/hdwallet-walletconnect": "1.52.4",
"@shapeshiftoss/hdwallet-xdefi": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.52.5",
"@shapeshiftoss/hdwallet-keplr": "1.52.5",
"@shapeshiftoss/hdwallet-ledger": "1.52.5",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.52.5",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.52.5",
"@shapeshiftoss/hdwallet-metamask": "1.52.5",
"@shapeshiftoss/hdwallet-native": "1.52.5",
"@shapeshiftoss/hdwallet-portis": "1.52.5",
"@shapeshiftoss/hdwallet-tallyho": "1.52.5",
"@shapeshiftoss/hdwallet-trezor": "1.52.5",
"@shapeshiftoss/hdwallet-trezor-connect": "1.52.5",
"@shapeshiftoss/hdwallet-walletconnect": "1.52.5",
"@shapeshiftoss/hdwallet-xdefi": "1.52.5",
"bip32": "^2.0.4",
"eip-712": "^1.0.0",
"ethereumjs-util": "^7.1.5",
Expand Down
20 changes: 10 additions & 10 deletions integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/integration",
"version": "1.52.4",
"version": "1.52.5",
"main": "index.js",
"license": "MIT",
"private": true,
Expand All @@ -10,15 +10,15 @@
"dev": "lerna run test --scope integration --parallel --include-filtered-dependencies"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.52.4",
"@shapeshiftoss/hdwallet-ledger": "1.52.4",
"@shapeshiftoss/hdwallet-native": "1.52.4",
"@shapeshiftoss/hdwallet-portis": "1.52.4",
"@shapeshiftoss/hdwallet-trezor": "1.52.4",
"@shapeshiftoss/hdwallet-xdefi": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.52.5",
"@shapeshiftoss/hdwallet-ledger": "1.52.5",
"@shapeshiftoss/hdwallet-native": "1.52.5",
"@shapeshiftoss/hdwallet-portis": "1.52.5",
"@shapeshiftoss/hdwallet-trezor": "1.52.5",
"@shapeshiftoss/hdwallet-xdefi": "1.52.5",
"fast-json-stable-stringify": "^2.1.0",
"msw": "^0.27.1",
"whatwg-fetch": "^3.6.2"
Expand Down
4 changes: 2 additions & 2 deletions integration/src/wallets/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class MockTransport extends ledger.LedgerTransport {
"Eth",
"signTransaction",
JSON.parse(
'["m/44\'/60\'/0\'/0/0","eb018501dcd650008256229412ec06288edd7ae2cc41a843fe089237fc7354f0872c68af0bb1400080018080"]'
'["m/44\'/60\'/0\'/0/0","eb018501dcd650008256229412ec06288edd7ae2cc41a843fe089237fc7354f0872c68af0bb1400080018080", null]'
),
JSON.parse(
'{"success":true,"payload":{"v":"26","r":"63db3dd3bf3e1fe7dde1969c0fc8850e34116d0b501c0483a0e08c0f77b8ce0a","s":"28297d012cccf389f6332415e96ee3fc0bbf8474d05f646e029cd281a031464b"},"coin":"Eth","method":"signTransaction"}'
Expand All @@ -106,7 +106,7 @@ export class MockTransport extends ledger.LedgerTransport {
"Eth",
"signTransaction",
JSON.parse(
'["m/44\'/60\'/0\'/0/0","f8620114149441e5560054824ea6b0732e656e3ad64e20e94e4580b844a9059cbb0000000000000000000000001d8ce9022f6284c3a5c317f8f34620107214e54500000000000000000000000000000000000000000000000000000002540be400018080"]'
'["m/44\'/60\'/0\'/0/0","f8620114149441e5560054824ea6b0732e656e3ad64e20e94e4580b844a9059cbb0000000000000000000000001d8ce9022f6284c3a5c317f8f34620107214e54500000000000000000000000000000000000000000000000000000002540be400018080", null]'
),
JSON.parse(
'{"success":true,"payload":{"v":"25","r":"1238fd332545415f09a01470350a5a20abc784dbf875cf58f7460560e66c597f","s":"10efa4dd6fdb381c317db8f815252c2ac0d2a883bd364901dee3dec5b7d3660a"},"coin":"Eth","method":"signTransaction"}'
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"lerna": "5.2.0",
"version": "1.52.4",
"version": "1.52.5",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-coinbase/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-coinbase",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@coinbase/wallet-sdk": "^3.6.6",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"eth-rpc-errors": "^4.0.3",
"lodash": "^4.17.21"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/hdwallet-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-core",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-chromeusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-chromeusb",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey": "1.52.4"
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey": "1.52.5"
}
}
4 changes: 2 additions & 2 deletions packages/hdwallet-keepkey-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-electron",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey": "1.52.5",
"uuid": "^8.3.2"
},
"peerDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-keepkey-nodehid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-nodehid",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.52.4"
"@shapeshiftoss/hdwallet-keepkey": "1.52.5"
},
"peerDependencies": {
"node-hid": "^2.1.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-nodewebusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-nodewebusb",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey": "1.52.4"
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey": "1.52.5"
},
"peerDependencies": {
"usb": "^2.3.1"
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-tcp/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-tcp",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey": "1.52.5",
"axios": "^0.21.1"
}
}
6 changes: 3 additions & 3 deletions packages/hdwallet-keepkey-webusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey-webusb",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-keepkey": "1.52.4"
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-keepkey": "1.52.5"
},
"devDependencies": {
"@types/w3c-web-usb": "^1.0.4"
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-keepkey/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keepkey",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -20,7 +20,7 @@
"@keepkey/device-protocol": "^7.12.2",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/bitcoinjs-lib": "5.2.0-shapeshift.2",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/proto-tx-builder": "^0.8.0",
"bignumber.js": "^9.0.1",
"bnb-javascript-sdk-nobroadcast": "^2.16.14",
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-keplr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-keplr",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@shapeshiftoss/caip": "8.15.0",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/proto-tx-builder": "^0.8.0",
"@shapeshiftoss/types": "3.1.3",
"base64-js": "^1.5.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-ledger-webhid/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-ledger-webhid",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -19,8 +19,8 @@
"@ledgerhq/hw-transport": "^6.7.0",
"@ledgerhq/hw-transport-webhid": "^6.7.0",
"@ledgerhq/live-common": "^21.8.2",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-ledger": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-ledger": "1.52.5",
"@types/w3c-web-hid": "^1.0.2"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions packages/hdwallet-ledger-webusb/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-ledger-webusb",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -20,8 +20,8 @@
"@ledgerhq/hw-transport-webusb": "^6.7.0",
"@ledgerhq/live-common": "^21.8.2",
"@ledgerhq/logs": "^6.10.1",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-ledger": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/hdwallet-ledger": "1.52.5",
"@types/w3c-web-usb": "^1.0.4",
"p-queue": "^7.4.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-ledger/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-ledger",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -18,7 +18,7 @@
"@ethereumjs/common": "^2.4.0",
"@ethereumjs/tx": "^3.3.0",
"@shapeshiftoss/bitcoinjs-lib": "5.2.0-shapeshift.2",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"base64-js": "^1.5.1",
"bchaddrjs": "^0.4.4",
"bitcoinjs-message": "^2.0.0",
Expand Down
12 changes: 10 additions & 2 deletions packages/hdwallet-ledger/src/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ export async function ethSignTx(transport: LedgerTransport, msg: core.ETHSignTx)

const utx = new EthereumTx(txParams);

const res = await transport.call("Eth", "signTransaction", bip32path, utx.serialize().toString("hex"));
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore transport.call is drunk, there *is* a third argument to eth.signTransaction
// see https://github.com/LedgerHQ/ledgerjs/blob/master/packages/hw-app-eth/README.md#parameters-2
const res = await transport.call("Eth", "signTransaction", bip32path, utx.serialize().toString("hex"), null);
handleError(res, transport, "Could not sign ETH tx with Ledger");

const { v, r, s } = res.payload;
Expand Down Expand Up @@ -157,7 +160,12 @@ export async function ethSignMessage(
const bip32path = core.addressNListToBIP32(msg.addressNList);

if (!isHexString(msg.message)) throw new Error("data is not an hex string");
const res = await transport.call("Eth", "signPersonalMessage", bip32path, msg.message);

// Ledger's inner implementation does a Buffer.from(messageHex, "hex").length on our message
// However, Buffer.from method with the "hex" encoding expects a valid hexadecimal string without the 0x prefix
// so we need to strip it in case it's present
const sanitizedMessageHex = msg.message.startsWith("0x") ? msg.message.slice(2) : msg.message;
const res = await transport.call("Eth", "signPersonalMessage", bip32path, sanitizedMessageHex);
handleError(res, transport, "Could not sign ETH message with Ledger");

let { v } = res.payload;
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-metamask-shapeshift-multichain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-shapeshift-multichain",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -17,7 +17,7 @@
"@metamask/detect-provider": "^1.2.0",
"@metamask/onboarding": "^1.0.1",
"@shapeshiftoss/common-api": "^9.3.0",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"@shapeshiftoss/metamask-snaps-adapter": "^1.0.8",
"@shapeshiftoss/metamask-snaps-types": "^1.0.8",
"eth-rpc-errors": "^4.0.3",
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-metamask/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-metamask",
"version": "1.52.4",
"version": "1.52.5",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -16,7 +16,7 @@
"dependencies": {
"@metamask/detect-provider": "^1.2.0",
"@metamask/onboarding": "^1.0.1",
"@shapeshiftoss/hdwallet-core": "1.52.4",
"@shapeshiftoss/hdwallet-core": "1.52.5",
"eth-rpc-errors": "^4.0.3",
"lodash": "^4.17.21"
},
Expand Down
Loading

0 comments on commit c4766cf

Please sign in to comment.