File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
src/modules/select/wallets Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,9 @@ async function ledgerProvider(options: {
130
130
}
131
131
132
132
const address = await getAddress ( path )
133
+
134
+ // over-ride any exsting addresses for the case of accountSelect being called
135
+ addressToPath = new Map ( )
133
136
addressToPath . set ( address , path )
134
137
customPath = true
135
138
return true
@@ -212,6 +215,10 @@ async function ledgerProvider(options: {
212
215
return addresses ( )
213
216
}
214
217
218
+ if ( dPath === '' ) {
219
+ dPath = LEDGER_LIVE_PATH
220
+ }
221
+
215
222
if ( dPath === LEDGER_LIVE_PATH ) {
216
223
const currentAccounts = addressToPath . size
217
224
const paths = [ ]
Original file line number Diff line number Diff line change @@ -14,6 +14,8 @@ import * as EthereumTx from 'ethereumjs-tx'
14
14
15
15
const { default : TrezorConnect , DEVICE_EVENT , DEVICE } = TrezorConnectLibrary
16
16
17
+ const TREZOR_DEFAULT_PATH = "m/44'/60'/0'/0"
18
+
17
19
function trezor ( options : TrezorOptions & CommonWalletOptions ) : WalletModule {
18
20
const {
19
21
rpcUrl,
@@ -142,6 +144,9 @@ async function trezorProvider(options: {
142
144
143
145
try {
144
146
const address = await getAddress ( path )
147
+
148
+ // over-ride any exsting addresses for the case of accountSelect being called
149
+ addressToPath = new Map ( )
145
150
addressToPath . set ( address , path )
146
151
customPath = true
147
152
return true
@@ -247,6 +252,10 @@ async function trezorProvider(options: {
247
252
return addresses ( )
248
253
}
249
254
255
+ if ( dPath === '' ) {
256
+ dPath = TREZOR_DEFAULT_PATH
257
+ }
258
+
250
259
if ( ! account ) {
251
260
try {
252
261
account = await getPublicKey ( )
You can’t perform that action at this time.
0 commit comments