diff options
Diffstat (limited to 'packages/demobank-ui/src/pages/AccountPage')
-rw-r--r-- | packages/demobank-ui/src/pages/AccountPage/index.ts | 42 | ||||
-rw-r--r-- | packages/demobank-ui/src/pages/AccountPage/views.tsx | 4 |
2 files changed, 31 insertions, 15 deletions
diff --git a/packages/demobank-ui/src/pages/AccountPage/index.ts b/packages/demobank-ui/src/pages/AccountPage/index.ts index 6c67f6d90..7a85f59fe 100644 --- a/packages/demobank-ui/src/pages/AccountPage/index.ts +++ b/packages/demobank-ui/src/pages/AccountPage/index.ts @@ -33,13 +33,21 @@ export interface Props { onOperationCreated: (wopid: string) => void; onClose: () => void; tab: "charge-wallet" | "wire-transfer" | undefined; - routeClose: RouteDefinition<Record<string, never>>; - routeChargeWallet: RouteDefinition<Record<string, never>>; - routeWireTransfer: RouteDefinition<Record<string, never>>; - routePublicAccounts: RouteDefinition<Record<string, never>>; - routeCreateWireTransfer: RouteDefinition<{ destination: string }>; + routeClose: RouteDefinition; + routeChargeWallet: RouteDefinition; + routeWireTransfer: RouteDefinition<{ + account?: string; + subject?: string; + amount?: string; + }>; + routePublicAccounts: RouteDefinition; + routeCreateWireTransfer: RouteDefinition<{ + account?: string; + subject?: string; + amount?: string; + }>; routeOperationDetails: RouteDefinition<{ wopid: string }>; - routeSolveSecondFactor: RouteDefinition<Record<string, never>>; + routeSolveSecondFactor: RouteDefinition; } export type State = @@ -73,13 +81,21 @@ export namespace State { onAuthorizationRequired: () => void; onOperationCreated: (wopid: string) => void; onClose: () => void; - routeClose: RouteDefinition<Record<string, never>>; - routeChargeWallet: RouteDefinition<Record<string, never>>; - routeWireTransfer: RouteDefinition<Record<string, never>>; - routePublicAccounts: RouteDefinition<Record<string, never>>; - routeCreateWireTransfer: RouteDefinition<{ destination: string }>; + routeClose: RouteDefinition; + routeChargeWallet: RouteDefinition; + routePublicAccounts: RouteDefinition; + routeWireTransfer: RouteDefinition<{ + account?: string, + subject?: string, + amount?: string, + }>; + routeCreateWireTransfer: RouteDefinition<{ + account?: string, + subject?: string, + amount?: string, + }>; routeOperationDetails: RouteDefinition<{ wopid: string }>; - routeSolveSecondFactor: RouteDefinition<Record<string, never>>; + routeSolveSecondFactor: RouteDefinition; } export interface InvalidIban { @@ -90,7 +106,7 @@ export namespace State { export interface UserNotFound { status: "login"; reason: "not-found" | "forbidden"; - routeRegister?: RouteDefinition<Record<string, never>>; + routeRegister?: RouteDefinition; } } diff --git a/packages/demobank-ui/src/pages/AccountPage/views.tsx b/packages/demobank-ui/src/pages/AccountPage/views.tsx index 4f411940f..cb98c5f2a 100644 --- a/packages/demobank-ui/src/pages/AccountPage/views.tsx +++ b/packages/demobank-ui/src/pages/AccountPage/views.tsx @@ -33,7 +33,7 @@ export function InvalidIbanView({ error }: State.InvalidIban) { const IS_PUBLIC_ACCOUNT_ENABLED = false; function ShowDemoInfo({ routePublicAccounts }: { - routePublicAccounts: RouteDefinition<Record<string, never>>; + routePublicAccounts: RouteDefinition; }): VNode { const { i18n } = useTranslationContext(); const [settings, updateSettings] = usePreferences(); @@ -63,7 +63,7 @@ function ShowDemoInfo({ routePublicAccounts }: { } function ShowPedingOperation({ routeSolveSecondFactor }: { - routeSolveSecondFactor: RouteDefinition<Record<string, never>>; + routeSolveSecondFactor: RouteDefinition; }): VNode { const { i18n } = useTranslationContext(); const [bankState, updateBankState] = useBankState(); |