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'
6import { NETWORK_NAMES } from '../lib/network'
8const Success = (props) => {
11 props.networkType === NETWORK_NAMES.ROPSTEN ||
12 props.networkType === NETWORK_NAMES.MAINNET
15 props.networkType === NETWORK_NAMES.ROPSTEN
16 ? "ropsten.etherscan.io"
21 ? "If you’d like to keep track of it, click the Etherscan link below."
28 className={'mb-4 mt-1'}
31 href={`https://${esdomain}/tx/${props.hash}`}>
32 {'View on Etherscan ↗'}
38 <H1>{ 'Your Transaction was Sent' }</H1>
42 `We sent your transaction to the chain. It can take some time to
43 execute, especially if the network is busy. ${esmessage}`
47 <H3>{ 'Transaction Hash' }</H3>
59const Failure = (props) =>
69 'There was an error sending your transaction.'
72 { renderTxnError(props.web3, props.message) }
77const SentTransaction = (props) => {
78 const { web3, txnHashCursor, networkType, popRoute } = props
79 const { setPointCursor, pointCursor } = props
81 const w3 = web3.matchWith({
82 Nothing: _ => { throw BRIDGE_ERROR.MISSING_WEB3 },
83 Just: res => res.value
86 const result = txnHashCursor.matchWith({
87 Nothing: _ => { throw BRIDGE_ERROR.MISSING_TXN },
88 Just: res => res.value
91 const body = result.matchWith({
92 Error: message => <Failure web3={ w3 } message={ message.value } />,
96 networkType={ networkType }
107 setPointCursor(pointCursor)
124export 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