Skip to content

Commit 49e2df3

Browse files
author
iGroza
committed
feat: implement getAccountInfo for Tron mnemonic
1 parent 3a6118c commit 49e2df3

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@haqq/rn-wallet-providers",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"description": "React Native providers for Haqq wallet",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",

src/providers/mnemonic/tron-provider.ts

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ export class ProviderMnemonicTron
1515
extends ProviderMnemonicBase
1616
implements ProviderInterface
1717
{
18+
async getAccountInfo(hdPath: string) {
19+
const info = await super.getAccountInfo(hdPath.replace("44'", "195'"));
20+
return {
21+
...info,
22+
address: tron.utils.address.fromHex(info.address),
23+
};
24+
}
25+
1826
async signTransaction(
1927
hdPath: string,
2028
transaction: TransactionRequest,

0 commit comments

Comments
 (0)