import { Nothing } from 'folktale/maybe'
import React from 'react'
import { Code, H3 } from './Base'
import { Button } from './Base'
import { CheckboxButton, Input, InnerLabel } from './Base'
import { renderSignedTx, signTransaction } from '../lib/txn'
const StatelessTransaction = props => {
const { web3, gasPrice, gasLimit, nonce, chainId } = props
const { setNonce, setChainId, setGasLimit, setGasPrice } = props
const { txn, stx, createUnsignedTxn } = props
const { canSign, canGenerate, canApprove } = props
const { setUserApproval, userApproval } = props
const { canSend, handleSubmit } = props
const generateButtonColor =
Nothing.hasInstance(txn)
? 'blue'
: 'green'
const signerButtonColor =
Nothing.hasInstance(stx)
? 'blue'
: 'green'
const generateTxnButton =
const unsignedTxnDisplay = txn.matchWith({
Nothing: _ => '',
Just: tx =>
{ 'Unsigned Transaction' }
{ JSON.stringify(tx.value, null, 2) }
{ JSON.stringify(renderSignedTx(tx.value), null, 2) }