@@ -9,6 +9,7 @@ import { addressToPublicKey } from 'app/lib/helpers'
99import { LedgerStep } from './types'
1010import { WalletErrors } from 'types/errors'
1111import { OasisTransaction } from 'app/lib/transaction'
12+ import { selectDerivationPathType } from './selectors'
1213
1314describe ( 'Ledger Sagas' , ( ) => {
1415 describe ( 'enumerateAccounts' , ( ) => {
@@ -24,6 +25,7 @@ describe('Ledger Sagas', () => {
2425 [ matchers . call . fn ( TransportWebUSB . create ) , { close : ( ) => { } } ] ,
2526 [ matchers . call . fn ( Ledger . enumerateAccounts ) , [ validAccount ] ] ,
2627 [ matchers . call . fn ( getBalance ) , { } ] ,
28+ [ matchers . select . selector ( selectDerivationPathType ) , DerivationPathTypeAdr8 ] ,
2729 ] )
2830 . dispatch ( ledgerActions . enumerateAccounts ( DerivationPathTypeAdr8 ) )
2931 . put ( ledgerActions . setStep ( LedgerStep . Done ) )
@@ -43,6 +45,7 @@ describe('Ledger Sagas', () => {
4345 [ matchers . call . fn ( TransportWebUSB . create ) , { close : ( ) => { } } ] ,
4446 [ matchers . call . fn ( Ledger . enumerateAccounts ) , [ validAccount ] ] ,
4547 [ matchers . call . fn ( getBalance ) , { } ] ,
48+ [ matchers . select . selector ( selectDerivationPathType ) , DerivationPathTypeAdr8 ] ,
4649 ] )
4750 . dispatch ( ledgerActions . enumerateAccounts ( DerivationPathTypeLegacy ) )
4851 . put ( ledgerActions . setStep ( LedgerStep . Done ) )
@@ -89,6 +92,7 @@ describe('Ledger Sagas', () => {
8992 [ matchers . call . fn ( TransportWebUSB . isSupported ) , true ] ,
9093 [ matchers . call . fn ( TransportWebUSB . create ) , { close : ( ) => { } } ] ,
9194 [ matchers . call . fn ( Ledger . enumerateAccounts ) , Promise . reject ( new Error ( 'Dummy error' ) ) ] ,
95+ [ matchers . select . selector ( selectDerivationPathType ) , DerivationPathTypeAdr8 ] ,
9296 ] )
9397 . dispatch ( ledgerActions . enumerateAccounts ( DerivationPathTypeAdr8 ) )
9498 . put . like ( { action : { payload : { code : WalletErrors . UnknownError , message : 'Dummy error' } } } )
0 commit comments