1import React from 'react'
2import { Row, Col, H1, H3, P, Warning, Anchor } from '../components/Base'
3import { Button } from '../components/Base'
5import { BRIDGE_ERROR, renderTxnError } from '../lib/error'
7const Success = (props) =>
10 <H1>{ 'Your Transaction was Sent' }</H1>
14 `We sent your transaction to the chain. It can take some time to
15 execute, especially if the network is busy. If you’d like to keep
16 track of it, click the Etherscan link below.`
20 <H3>{ 'Transaction Hash' }</H3>
25 className={'mb-4 mt-1'}
28 href={`https://etherscan.io/tx/${props.hash}`}>
29 {'View on Etherscan ↗'}
34const Failure = (props) =>
44 'There was an error sending your transaction.'
47 { renderTxnError(props.web3, props.message) }
52const SentTransaction = (props) => {
53 const { web3, txnCursor, popRoute } = props
54 const { setPointCursor, pointCursor } = props
56 const w3 = web3.matchWith({
57 Nothing: _ => { throw BRIDGE_ERROR.MISSING_WEB3 },
58 Just: res => res.value
61 const result = txnCursor.matchWith({
62 Nothing: _ => { throw BRIDGE_ERROR.MISSING_TXN },
63 Just: res => res.value
66 const body = result.matchWith({
67 Error: message => <Failure web3={ w3 } message={ message.value } />,
68 Ok: txn => <Success hash={ txn.value.transactionHash } />
78 setPointCursor(pointCursor)
95export default SentTransaction
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list