File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
src/modules/select/wallets Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,5 @@ module.exports = {
5
5
printWidth : 80 ,
6
6
tabWidth : 2 ,
7
7
arrowParens : 'avoid' ,
8
- svelteSortOrder : 'options-scripts-styles-markup' ,
9
- plugins : [ 'prettier-plugin-svelte' ]
8
+ svelteSortOrder : 'options-scripts-styles-markup'
10
9
}
Original file line number Diff line number Diff line change @@ -89,7 +89,6 @@ async function ledgerProvider(options: LedgerProviderOptions) {
89
89
const { Transaction } = await import ( '@ethereumjs/tx' )
90
90
const { default : Common } = await import ( '@ethereumjs/common' )
91
91
const ethUtil = await import ( 'ethereumjs-util' )
92
- const buffer = await import ( 'buffer' )
93
92
const { TypedDataUtils } = await import ( 'eth-sig-util' )
94
93
95
94
const domainHash = ( message : any ) => {
@@ -232,17 +231,19 @@ async function ledgerProvider(options: LedgerProviderOptions) {
232
231
}
233
232
234
233
// Get the Transport class
235
- const Transport =
236
- LedgerTransport || ( await supportsWebUSB ( ) )
234
+ let Transport = LedgerTransport
235
+ if ( ! Transport ) {
236
+ Transport = ( await supportsWebUSB ( ) )
237
237
? ( await import ( '@ledgerhq/hw-transport-webusb' ) ) . default
238
238
: ( await import ( '@ledgerhq/hw-transport-u2f' ) ) . default
239
-
239
+ }
240
240
transport = await Transport . create ( )
241
241
242
242
eth = new Eth ( transport )
243
243
244
244
Transport . listen ( observer )
245
245
} catch ( error ) {
246
+ console . error ( error )
246
247
throw new Error ( 'Error connecting to Ledger wallet' )
247
248
}
248
249
}
@@ -300,6 +301,7 @@ async function ledgerProvider(options: LedgerProviderOptions) {
300
301
301
302
return account
302
303
} catch ( error ) {
304
+ console . error ( { error } )
303
305
throw new Error ( 'There was a problem accessing your Ledger accounts.' )
304
306
}
305
307
}
You can’t perform that action at this time.
0 commit comments