import React from 'react'; import './wallet.scss'; import {Button, Flex, Text} from 'rimble-ui'; import {useService} from '@xstate/react'; import {Interpreter} from 'xstate'; import {track} from '../segment-analytics'; interface Props { service: Interpreter; } export const ConfirmCreateChannel = (props: Props) => { const [current, _send] = useService(props.service); const send = (event: 'USER_APPROVES' | 'USER_REJECTS') => () => { track(event); _send(event); }; const prompt = ( Do you wish to create a channel? No ); if (current?.value.toString() === 'waitForUserConfirmation') { return prompt; } else { return
; } };