import React from 'react'; import {WindowContext} from './window-context'; import {Interpreter} from 'xstate'; import {useService} from '@xstate/react'; import './wallet.scss'; import {ApplicationWorkflow} from './application-workflow'; import {EnableEthereum} from './enable-ethereum-workflow'; import {Layout} from './layout'; import {ApproveBudgetAndFund} from './approve-budget-and-fund-workflow'; import {CloseLedgerAndWithdraw} from './close-ledger-and-withdraw'; interface Props { workflow: Interpreter; } export const Wallet = (props: Props) => { const [current, send] = useService(props.workflow); return ( {props.workflow.id === 'application-workflow' && ( )} {props.workflow.id === 'enable-ethereum' && ( )} {props.workflow.id === 'approve-budget-and-fund' && ( )} {props.workflow.id === 'close-and-withdraw' && ( )} ); };