@@ -27,7 +27,6 @@ import WalletRestoreOptionDialogContainer from './dialogs/WalletRestoreOptionDia
27
27
import WalletRestoreDialogContainer from './dialogs/WalletRestoreDialogContainer' ;
28
28
import type { GeneratedData as WalletRestoreDialogContainerData } from './dialogs/WalletRestoreDialogContainer' ;
29
29
import WalletRestoreOptionDialog from '../../components/wallet/add/option-dialog/WalletRestoreOptionDialog' ;
30
- import WalletRestoreDialog from '../../components/wallet/WalletRestoreDialog' ;
31
30
32
31
import WalletConnectHWOptionDialogContainer from './dialogs/WalletConnectHWOptionDialogContainer' ;
33
32
import WalletConnectHWOptionDialog from '../../components/wallet/add/option-dialog/WalletConnectHWOptionDialog' ;
@@ -36,7 +35,6 @@ import type { GeneratedData as WalletTrezorConnectDialogContainerData } from './
36
35
import WalletLedgerConnectDialogContainer from './dialogs/WalletLedgerConnectDialogContainer' ;
37
36
import type { GeneratedData as WalletLedgerConnectDialogContainerData } from './dialogs/WalletLedgerConnectDialogContainer' ;
38
37
39
- import WalletEraOptionDialogContainer from './dialogs/WalletEraOptionDialogContainer' ;
40
38
import WalletPaperDialog from '../../components/wallet/WalletPaperDialog' ;
41
39
import WalletPaperDialogContainer from './dialogs/WalletPaperDialogContainer' ;
42
40
import type { GeneratedData as WalletPaperDialogContainerData } from './dialogs/WalletPaperDialogContainer' ;
@@ -54,10 +52,7 @@ import type { $npm$ReactIntl$IntlFormat } from 'react-intl';
54
52
import { getApiForNetwork , ApiOptions } from '../../api/common/utils' ;
55
53
import { PublicDeriver } from '../../api/ada/lib/storage/models/PublicDeriver/index' ;
56
54
import type { NetworkRow } from '../../api/ada/lib/storage/database/primitives/tables' ;
57
- import {
58
- networks ,
59
- isCardanoHaskell ,
60
- } from '../../api/ada/lib/storage/database/prepackaged/networks' ;
55
+ import { networks } from '../../api/ada/lib/storage/database/prepackaged/networks' ;
61
56
import { withLayout } from '../../styles/context/layout' ;
62
57
import type { LayoutComponentMap } from '../../styles/context/layout' ;
63
58
import AddWalletPageRevamp from './AddWalletPageRevamp' ;
@@ -183,19 +178,14 @@ class AddWalletPage extends Component<AllProps> {
183
178
< WalletRestoreOptionDialogContainer
184
179
onClose = { this . onClose }
185
180
onRestore15 = { ( ) => {
186
- if ( isCardanoHaskell ( selectedNetwork ) ) {
187
- return actions . dialogs . push . trigger ( {
188
- dialog : WalletEraOptionDialogContainer ,
189
- } ) ;
190
- }
191
181
return actions . dialogs . push . trigger ( {
192
- dialog : WalletRestoreDialog ,
193
- params : { restoreType : { type : 'bip44 ' , extra : undefined , length : 15 } } ,
182
+ dialog : WalletRestoreDialogContainer ,
183
+ params : { restoreType : { type : 'cip1852 ' , extra : undefined , length : 15 } } ,
194
184
} ) ;
195
185
} }
196
186
onRestore24 = { ( ) => {
197
187
actions . dialogs . push . trigger ( {
198
- dialog : WalletRestoreDialog ,
188
+ dialog : WalletRestoreDialogContainer ,
199
189
params : { restoreType : { type : 'cip1852' , extra : undefined , length : 24 } } ,
200
190
} ) ;
201
191
} }
@@ -205,40 +195,13 @@ class AddWalletPage extends Component<AllProps> {
205
195
? undefined
206
196
: ( ) =>
207
197
actions . dialogs . push . trigger ( {
208
- dialog : WalletRestoreDialog ,
198
+ dialog : WalletRestoreDialogContainer ,
209
199
params : { restoreType : { type : 'bip44' , extra : 'paper' , length : 21 } } ,
210
200
} )
211
201
}
212
202
/>
213
203
) ;
214
- } else if ( uiDialogs . isOpen ( WalletEraOptionDialogContainer ) ) {
215
- if ( selectedNetwork === undefined ) {
216
- throw new Error ( `${ nameof ( AddWalletPage ) } no API selected` ) ;
217
- }
218
- const hardware = uiDialogs . getParam < 'trezor' | 'ledger' > ( 'hardware' ) ;
219
- const onEra = ( era : 'bip44' | 'cip1852' ) => {
220
- if ( hardware == null ) {
221
- return actions . dialogs . push . trigger ( {
222
- dialog : WalletRestoreDialog ,
223
- params : { restoreType : { type : era , extra : undefined , length : 15 } } ,
224
- } ) ;
225
- }
226
- if ( hardware === 'ledger' ) {
227
- openLedgerConnectDialog ( era ) ;
228
- }
229
- if ( hardware === 'trezor' ) {
230
- openTrezorConnectDialog ( era ) ;
231
- }
232
- } ;
233
- activeDialog = (
234
- < WalletEraOptionDialogContainer
235
- onClose = { this . onClose }
236
- onByron = { ( ) => onEra ( 'bip44' ) }
237
- onShelley = { ( ) => onEra ( 'cip1852' ) }
238
- onBack = { ( ) => actions . dialogs . pop . trigger ( ) }
239
- />
240
- ) ;
241
- } else if ( uiDialogs . isOpen ( WalletRestoreDialog ) ) {
204
+ } else if ( uiDialogs . isOpen ( WalletRestoreDialogContainer ) ) {
242
205
const mode = uiDialogs . getParam < RestoreModeType > ( 'restoreType' ) ;
243
206
if ( mode == null )
244
207
throw new Error ( `${ nameof ( AddWalletPage ) } no mode for restoration selected` ) ;
@@ -254,18 +217,8 @@ class AddWalletPage extends Component<AllProps> {
254
217
activeDialog = (
255
218
< WalletConnectHWOptionDialogContainer
256
219
onClose = { this . onClose }
257
- onTrezor = { ( ) =>
258
- actions . dialogs . push . trigger ( {
259
- dialog : WalletEraOptionDialogContainer ,
260
- params : { hardware : 'trezor' } ,
261
- } )
262
- }
263
- onLedger = { ( ) =>
264
- actions . dialogs . push . trigger ( {
265
- dialog : WalletEraOptionDialogContainer ,
266
- params : { hardware : 'ledger' } ,
267
- } )
268
- }
220
+ onTrezor = { ( ) => openTrezorConnectDialog ( 'cip1852' ) }
221
+ onLedger = { ( ) => openLedgerConnectDialog ( 'cip1852' ) }
269
222
/>
270
223
) ;
271
224
} else if ( uiDialogs . isOpen ( WalletTrezorConnectDialogContainer ) ) {
0 commit comments