@rabby-wallet/eth-hd-keyring 4.1.0 → 4.2.0-beta.1
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/dist/index.js +2 -1
- package/index.ts +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -242,7 +242,7 @@ class HdKeyring extends eth_simple_keyring_1.default {
|
|
|
242
242
|
getInfoByAddress(address) {
|
|
243
243
|
const detail = this.accountDetails[address];
|
|
244
244
|
if (detail) {
|
|
245
|
-
return detail;
|
|
245
|
+
return Object.assign(Object.assign({}, detail), { basePublicKey: this.publicKey });
|
|
246
246
|
}
|
|
247
247
|
for (const key in this.wallets) {
|
|
248
248
|
const wallet = this.wallets[key];
|
|
@@ -252,6 +252,7 @@ class HdKeyring extends eth_simple_keyring_1.default {
|
|
|
252
252
|
index: Number(key),
|
|
253
253
|
hdPathType: HD_PATH_TYPE[this.hdPath],
|
|
254
254
|
hdPath: this.hdPath,
|
|
255
|
+
basePublicKey: this.publicKey,
|
|
255
256
|
};
|
|
256
257
|
}
|
|
257
258
|
}
|
package/index.ts
CHANGED
|
@@ -49,6 +49,7 @@ interface AccountDetail {
|
|
|
49
49
|
hdPath: string;
|
|
50
50
|
hdPathType: HDPathType;
|
|
51
51
|
index: number;
|
|
52
|
+
basePublicKey?: string;
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
class HdKeyring extends SimpleKeyring {
|
|
@@ -274,7 +275,10 @@ class HdKeyring extends SimpleKeyring {
|
|
|
274
275
|
getInfoByAddress(address: string): AccountDetail | null {
|
|
275
276
|
const detail = this.accountDetails[address];
|
|
276
277
|
if (detail) {
|
|
277
|
-
return
|
|
278
|
+
return {
|
|
279
|
+
...detail,
|
|
280
|
+
basePublicKey: this.publicKey,
|
|
281
|
+
};
|
|
278
282
|
}
|
|
279
283
|
|
|
280
284
|
for (const key in this.wallets) {
|
|
@@ -287,6 +291,7 @@ class HdKeyring extends SimpleKeyring {
|
|
|
287
291
|
index: Number(key),
|
|
288
292
|
hdPathType: HD_PATH_TYPE[this.hdPath],
|
|
289
293
|
hdPath: this.hdPath,
|
|
294
|
+
basePublicKey: this.publicKey,
|
|
290
295
|
};
|
|
291
296
|
}
|
|
292
297
|
}
|