@shapeshiftoss/hdwallet-gridplus 1.62.11 → 1.62.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapeshiftoss/hdwallet-gridplus",
3
- "version": "1.62.11",
3
+ "version": "1.62.13",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -20,7 +20,7 @@
20
20
  "@ethereumjs/rlp": "5.0.2",
21
21
  "@ethereumjs/tx": "5.4.0",
22
22
  "@metamask/eth-sig-util": "^7.0.0",
23
- "@shapeshiftoss/hdwallet-core": "1.62.11",
23
+ "@shapeshiftoss/hdwallet-core": "1.62.13",
24
24
  "bech32": "^1.1.4",
25
25
  "bs58": "^5.0.0",
26
26
  "crypto-js": "^4.2.0",
@@ -35,5 +35,5 @@
35
35
  "@ethereumjs/common",
36
36
  "@ethereumjs/tx"
37
37
  ],
38
- "gitHead": "a1a7c01b7cb28b407b429cc3612887bd6e31559a"
38
+ "gitHead": "52b8dc9f44d92d7d39808ef91af320f4ef387adc"
39
39
  }
package/src/solana.ts CHANGED
@@ -4,6 +4,8 @@ import bs58 from "bs58";
4
4
  import { Client, Constants } from "gridplus-sdk";
5
5
 
6
6
  export async function solanaGetAddress(client: Client, msg: core.SolanaGetAddress): Promise<string | null> {
7
+ if (msg.pubKey) return msg.pubKey;
8
+
7
9
  const startPath = core.ed25519Path(msg.addressNList);
8
10
 
9
11
  const pubkey = (await client.getAddresses({ startPath, n: 1, flag: Constants.GET_ADDR_FLAGS.ED25519_PUB }))[0];
@@ -15,7 +17,7 @@ export async function solanaGetAddress(client: Client, msg: core.SolanaGetAddres
15
17
  }
16
18
 
17
19
  export async function solanaSignTx(client: Client, msg: core.SolanaSignTx): Promise<core.SolanaSignedTx | null> {
18
- const address = await solanaGetAddress(client, { addressNList: msg.addressNList });
20
+ const address = await solanaGetAddress(client, { addressNList: msg.addressNList, pubKey: msg.pubKey });
19
21
  if (!address) throw new Error("Failed to get Solana address");
20
22
 
21
23
  const transaction = core.solanaBuildTransaction(msg, address);