Skip to content
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
38 changes: 19 additions & 19 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.62.30",
"version": "1.62.31",
"license": "MIT",
"private": true,
"browserslist": "> 0.5%, last 2 versions, not dead",
Expand All @@ -12,24 +12,24 @@
"dependencies": {
"@esm2cjs/p-queue": "^7.3.0",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/hdwallet-coinbase": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.30",
"@shapeshiftoss/hdwallet-keplr": "1.62.30",
"@shapeshiftoss/hdwallet-ledger": "1.62.30",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.30",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.30",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.30",
"@shapeshiftoss/hdwallet-native": "1.62.30",
"@shapeshiftoss/hdwallet-phantom": "1.62.30",
"@shapeshiftoss/hdwallet-portis": "1.62.30",
"@shapeshiftoss/hdwallet-trezor": "1.62.30",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.30",
"@shapeshiftoss/hdwallet-vultisig": "1.62.30",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.30",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.30",
"@shapeshiftoss/hdwallet-coinbase": "1.62.31",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.62.31",
"@shapeshiftoss/hdwallet-keplr": "1.62.31",
"@shapeshiftoss/hdwallet-ledger": "1.62.31",
"@shapeshiftoss/hdwallet-ledger-webhid": "1.62.31",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.62.31",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.31",
"@shapeshiftoss/hdwallet-native": "1.62.31",
"@shapeshiftoss/hdwallet-phantom": "1.62.31",
"@shapeshiftoss/hdwallet-portis": "1.62.31",
"@shapeshiftoss/hdwallet-trezor": "1.62.31",
"@shapeshiftoss/hdwallet-trezor-connect": "1.62.31",
"@shapeshiftoss/hdwallet-vultisig": "1.62.31",
"@shapeshiftoss/hdwallet-walletconnect": "1.62.31",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.62.31",
"bip32": "^2.0.4",
"eip-712": "^1.0.0",
"jquery": "^3.7.1",
Expand Down
22 changes: 11 additions & 11 deletions integration/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/integration",
"version": "1.62.30",
"version": "1.62.31",
"main": "index.js",
"license": "MIT",
"private": true,
Expand All @@ -12,16 +12,16 @@
"dependencies": {
"@bitcoinerlab/secp256k1": "^1.1.1",
"@bitgo/utxo-lib": "^11.18.0",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.30",
"@shapeshiftoss/hdwallet-ledger": "1.62.30",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.30",
"@shapeshiftoss/hdwallet-native": "1.62.30",
"@shapeshiftoss/hdwallet-portis": "1.62.30",
"@shapeshiftoss/hdwallet-trezor": "1.62.30",
"@shapeshiftoss/hdwallet-vultisig": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey-nodewebusb": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey-tcp": "1.62.31",
"@shapeshiftoss/hdwallet-ledger": "1.62.31",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.62.31",
"@shapeshiftoss/hdwallet-native": "1.62.31",
"@shapeshiftoss/hdwallet-portis": "1.62.31",
"@shapeshiftoss/hdwallet-trezor": "1.62.31",
"@shapeshiftoss/hdwallet-vultisig": "1.62.31",
"fast-json-stable-stringify": "^2.1.0",
"msw": "^0.27.1",
"whatwg-fetch": "^3.6.2"
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.62.30",
"version": "1.62.31",
"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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -15,7 +15,7 @@
},
"dependencies": {
"@coinbase/wallet-sdk": "^3.6.6",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-gridplus/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-gridplus",
"version": "1.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -20,7 +20,7 @@
"@ethereumjs/rlp": "5.0.2",
"@ethereumjs/tx": "5.4.0",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"bech32": "^1.1.4",
"bs58": "^5.0.0",
"bs58check": "^4.0.0",
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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.30"
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31"
}
}
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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31",
"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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,7 +14,7 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-keepkey": "1.62.30"
"@shapeshiftoss/hdwallet-keepkey": "1.62.31"
},
"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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.30"
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31"
},
"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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31",
"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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -14,8 +14,8 @@
"prepublishOnly": "yarn clean && yarn build"
},
"dependencies": {
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-keepkey": "1.62.30"
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-keepkey": "1.62.31"
},
"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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -21,7 +21,7 @@
"@keepkey/device-protocol": "7.13.4",
"@metamask/eth-sig-util": "^7.0.0",
"@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.2",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/proto-tx-builder": "0.10.0",
"bignumber.js": "^9.0.1",
"bnb-javascript-sdk-nobroadcast": "2.16.15",
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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -17,7 +17,7 @@
"@cosmjs/amino": "^0.28.13",
"@cosmjs/stargate": "^0.28.13",
"@shapeshiftoss/caip": "8.15.0",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/proto-tx-builder": "0.10.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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -18,8 +18,8 @@
"@ledgerhq/hw-app-eth": "7.0.0",
"@ledgerhq/hw-transport": "6.31.13",
"@ledgerhq/hw-transport-webhid": "6.30.6",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-ledger": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-ledger": "1.62.31",
"@types/w3c-web-hid": "^1.0.2"
}
}
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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand All @@ -20,8 +20,8 @@
"@ledgerhq/hw-app-solana": "7.6.0",
"@ledgerhq/hw-transport": "6.31.13",
"@ledgerhq/hw-transport-webusb": "6.29.13",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-ledger": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/hdwallet-ledger": "1.62.31",
"@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.62.30",
"version": "1.62.31",
"license": "MIT",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -28,7 +28,7 @@
"@ledgerhq/logs": "6.13.0",
"@mysten/ledgerjs-hw-app-sui": "^0.7.0",
"@shapeshiftoss/bitcoinjs-lib": "7.0.0-shapeshift.2",
"@shapeshiftoss/hdwallet-core": "1.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@solana/web3.js": "1.95.8",
"base64-js": "^1.5.1",
"bchaddrjs": "^0.4.4",
Expand Down
38 changes: 38 additions & 0 deletions packages/hdwallet-ledger/src/tron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,47 @@ export async function tronGetAddress(transport: LedgerTransport, msg: core.TronG
return res.payload.address;
}

/**
* Detects if a TRON transaction contains a memo in the raw_data.data field
* by checking for protobuf field 10 (wire type 2 for bytes) = 0x52
*/
function transactionHasMemo(rawDataHex: string): boolean {
try {
const buffer = Buffer.from(rawDataHex, "hex");

// Search for field 10 with wire type 2 (bytes)
// Field number 10, wire type 2 (length-delimited) = (10 << 3) | 2 = 0x52
for (let i = 0; i < buffer.length - 1; i++) {
if (buffer[i] === 0x52) {
return true;
}
}

return false;
} catch (err) {
return false;
}
}

Comment thread
gomesalexandre marked this conversation as resolved.
export async function tronSignTx(transport: LedgerTransport, msg: core.TronSignTx): Promise<core.TronSignedTx> {
const bip32path = core.addressNListToBIP32(msg.addressNList);

// Check if transaction has memo and validate Ledger app configuration
const hasMemo = transactionHasMemo(msg.rawDataHex);

if (hasMemo) {
const configRes = await transport.call("Tron", "getAppConfiguration");
handleError(configRes, transport, "Unable to get Tron app configuration from device.");

const { allowData } = configRes.payload;

if (!allowData) {
const error = new Error("Please enable Transactions Data in your Ledger TRON app settings and try again.");
(error as any).name = "LedgerTronAllowDataDisabled";
throw error;
}
}
Comment thread
coderabbitai[bot] marked this conversation as resolved.

const res = await transport.call("Tron", "signTransaction", bip32path, msg.rawDataHex, []);
handleError(res, transport, "Unable to sign Tron transaction.");

Expand Down
4 changes: 2 additions & 2 deletions packages/hdwallet-metamask-multichain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@shapeshiftoss/hdwallet-metamask-multichain",
"version": "1.62.30",
"version": "1.62.31",
"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.62.30",
"@shapeshiftoss/hdwallet-core": "1.62.31",
"@shapeshiftoss/metamask-snaps-adapter": "^1.0.12",
"@shapeshiftoss/metamask-snaps-types": "^1.0.12",
"eth-rpc-errors": "^4.0.3",
Expand Down
Loading