@@ -7,11 +7,10 @@ import EncryptedStorage from 'react-native-encrypted-storage';
7
7
import { ProviderMnemonicBaseOptions } from './types' ;
8
8
9
9
import { ITEM_KEYS , WalletType } from '../../constants' ;
10
- import { Multichain } from '../../services/multichain' ;
11
- import { compressPublicKey , convertHdPath } from '../../utils' ;
10
+ import { compressPublicKey } from '../../utils' ;
12
11
import { getMnemonic } from '../../utils/mnemonic/get-mnemonic' ;
13
12
import { ProviderBase } from '../base-provider' ;
14
- import { NETWORK_TYPE , ProviderBaseOptions , ProviderInterface } from '../types' ;
13
+ import { ProviderBaseOptions , ProviderInterface } from '../types' ;
15
14
16
15
export class ProviderMnemonicBase
17
16
extends ProviderBase < ProviderMnemonicBaseOptions >
@@ -119,7 +118,7 @@ export class ProviderMnemonicBase
119
118
}
120
119
121
120
async getAccountInfo ( hdPath : string ) {
122
- let resp = { publicKey : '' , address : '' , tronAddress : '' } ;
121
+ let resp = { publicKey : '' , address : '' } ;
123
122
try {
124
123
const share = await getMnemonic (
125
124
this . _options . account ,
@@ -131,13 +130,7 @@ export class ProviderMnemonicBase
131
130
}
132
131
133
132
const seed = await ProviderMnemonicBase . shareToSeed ( share ) ;
134
-
135
133
const ethPrivateKey = await derive ( seed , hdPath ) ;
136
- const tronAddress = await Multichain . generateAddress (
137
- NETWORK_TYPE . TRON ,
138
- convertHdPath ( hdPath , NETWORK_TYPE . TRON ) ,
139
- await this . getMnemonicPhrase ( ) ,
140
- ) ;
141
134
142
135
if ( ! ethPrivateKey ) {
143
136
throw new Error ( 'private_key_not_found' ) ;
@@ -148,7 +141,6 @@ export class ProviderMnemonicBase
148
141
resp = {
149
142
publicKey : compressPublicKey ( account . publicKey ) ,
150
143
address : account . address ,
151
- tronAddress,
152
144
} ;
153
145
this . emit ( 'getPublicKeyForHDPath' , true ) ;
154
146
} catch ( e ) {
0 commit comments