-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(ledger): group routes with feature
- Loading branch information
1 parent
1133821
commit 6a049e7
Showing
4 changed files
with
79 additions
and
76 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/app/features/ledger/flows/jwt-signing/ledger-sign-jwt.routes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Route } from 'react-router-dom'; | ||
|
||
import { RouteUrls } from '@shared/route-urls'; | ||
import { LedgerSignJwtContainer } from './ledger-sign-jwt-container'; | ||
import { ConnectLedgerSignJwt } from './steps/connect-ledger-sign-jwt'; | ||
import { ConnectLedgerSignJwtError } from './steps/connect-ledger-sign-jwt-error'; | ||
import { ConnectLedgerSignJwtSuccess } from './steps/connect-ledger-sign-jwt-success'; | ||
import { LedgerJwtSigningRejected } from './steps/transaction-rejected'; | ||
import { SignJwtHash } from './steps/sign-jwt-hash'; | ||
import { LedgerDisconnected } from '../tx-signing/steps/ledger-disconnected'; | ||
|
||
export const ledgerJwtSigningRoutes = ( | ||
<Route element={<LedgerSignJwtContainer />}> | ||
<Route path={RouteUrls.ConnectLedger} element={<ConnectLedgerSignJwt />} /> | ||
<Route path={RouteUrls.ConnectLedgerError} element={<ConnectLedgerSignJwtError />} /> | ||
<Route path={RouteUrls.ConnectLedgerSuccess} element={<ConnectLedgerSignJwtSuccess />} /> | ||
<Route path={RouteUrls.LedgerOperationRejected} element={<LedgerJwtSigningRejected />} /> | ||
<Route path={RouteUrls.AwaitingDeviceUserAction} element={<SignJwtHash />} /> | ||
<Route path={RouteUrls.LedgerDisconnected} element={<LedgerDisconnected />} /> | ||
</Route> | ||
); |
19 changes: 19 additions & 0 deletions
19
src/app/features/ledger/flows/request-keys/ledger-request-keys.routes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Route } from 'react-router-dom'; | ||
|
||
import { RouteUrls } from '@shared/route-urls'; | ||
import { LedgerRequestKeysContainer } from './ledger-request-keys-container'; | ||
import { ConnectLedgerRequestKeys } from './steps/connect-ledger-request-keys'; | ||
import { PullingKeysFromDevice } from './steps/pulling-keys-from-device'; | ||
import { ConnectLedgerRequestKeysError } from './steps/connect-ledger-request-keys-error'; | ||
import { UnsupportedBrowserLayout } from '../../steps/unsupported-browser.layout'; | ||
import { ConnectLedgerOnboardingSuccess } from './steps/connect-ledger-request-keys-success'; | ||
|
||
export const ledgerRequestKeysRoutes = ( | ||
<Route element={<LedgerRequestKeysContainer />}> | ||
<Route path={RouteUrls.ConnectLedger} element={<ConnectLedgerRequestKeys />} /> | ||
<Route path={RouteUrls.DeviceBusy} element={<PullingKeysFromDevice />} /> | ||
<Route path={RouteUrls.ConnectLedgerError} element={<ConnectLedgerRequestKeysError />} /> | ||
<Route path={RouteUrls.LedgerUnsupportedBrowser} element={<UnsupportedBrowserLayout />} /> | ||
<Route path={RouteUrls.ConnectLedgerSuccess} element={<ConnectLedgerOnboardingSuccess />} /> | ||
</Route> | ||
); |
29 changes: 29 additions & 0 deletions
29
src/app/features/ledger/flows/tx-signing/ledger-sign-tx.routes.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Route } from 'react-router-dom'; | ||
|
||
import { RouteUrls } from '@shared/route-urls'; | ||
import { LedgerSignTxContainer } from './ledger-sign-tx-container'; | ||
import { ConnectLedgerSignTx } from './steps/connect-ledger-sign-tx'; | ||
import { VerifyingPublicKeysMatch } from './steps/verifying-public-keys-match'; | ||
import { ConnectLedgerSignTxError } from './steps/connect-ledger-sign-tx-error'; | ||
import { ConnectLedgerSignTxSuccess } from './steps/connect-ledger-sign-tx-success'; | ||
import { SignLedgerTransaction } from './steps/sign-ledger-transaction'; | ||
import { LedgerDisconnected } from './steps/ledger-disconnected'; | ||
import { LedgerTransactionRejected } from './steps/transaction-rejected'; | ||
import { LedgerPublicKeyMismatch } from './steps/public-key-mismatch'; | ||
import { UnsupportedBrowserLayout } from '../../steps/unsupported-browser.layout'; | ||
import { LedgerDeviceInvalidTx } from './steps/device-invalid-tx'; | ||
|
||
export const ledgerTxSigningRoutes = ( | ||
<Route element={<LedgerSignTxContainer />}> | ||
<Route path={RouteUrls.ConnectLedger} element={<ConnectLedgerSignTx />} /> | ||
<Route path={RouteUrls.DeviceBusy} element={<VerifyingPublicKeysMatch />} /> | ||
<Route path={RouteUrls.ConnectLedgerError} element={<ConnectLedgerSignTxError />} /> | ||
<Route path={RouteUrls.ConnectLedgerSuccess} element={<ConnectLedgerSignTxSuccess />} /> | ||
<Route path={RouteUrls.AwaitingDeviceUserAction} element={<SignLedgerTransaction />} /> | ||
<Route path={RouteUrls.LedgerDisconnected} element={<LedgerDisconnected />} /> | ||
<Route path={RouteUrls.LedgerOperationRejected} element={<LedgerTransactionRejected />} /> | ||
<Route path={RouteUrls.LedgerPublicKeyMismatch} element={<LedgerPublicKeyMismatch />} /> | ||
<Route path={RouteUrls.LedgerDeviceTxInvalid} element={<LedgerDeviceInvalidTx />} /> | ||
<Route path={RouteUrls.LedgerUnsupportedBrowser} element={<UnsupportedBrowserLayout />} /> | ||
</Route> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters