Skip to content

Commit

Permalink
show link for DataHighway tx output since we are not listed on polkas…
Browse files Browse the repository at this point in the history
…can or subscan :(
  • Loading branch information
ltfschoen committed Jun 29, 2020
1 parent b463ec5 commit 0b5dee8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion client/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ class App extends Component {
<Row className="justify-content-md-center">
<Col xs={12} md={12}>
<Alert variant="info">
{responseMsg} {responseTx ? <a target="_new" href={responseTx}>View Transaction</a> : null}
{/* Show link to Ethereum transactions but only provide hash for DataHighway transactions */}
{responseMsg} {responseTx ? (
responseTx.includes("etherscan") ? (
<a target="_new" href={responseTx}>View Transaction</a>
) : responseTx
) : null}
</Alert>
</Col>
</Row>
Expand Down
6 changes: 3 additions & 3 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ app.get('/api/faucet/eth/ropsten',
const to = req.query.address;
const { transactionHashUrl } = await sendTransactionEth(to);
res.send({
message: 'Ropsten Ether sent',
message: 'Ropsten Ether sent with transaction',
tx: transactionHashUrl
});
} catch (error) {
Expand Down Expand Up @@ -79,7 +79,7 @@ app.get('/api/faucet/mxc/ropsten',
const to = req.query.address;
const { transactionHashUrl } = await sendTransactionMxc(to);
res.send({
message: 'Ropsten MXC ERC-20 sent',
message: 'Ropsten MXC ERC-20 sent with transaction',
tx: transactionHashUrl
});
} catch (error) {
Expand Down Expand Up @@ -116,7 +116,7 @@ app.get('/api/faucet/dhx/harbour',
const to = req.query.address;
const { transactionHashUrl } = await sendTransactionDhx(to);
res.send({
message: 'Harbour DHX sent',
message: 'Harbour DHX sent with transaction',
tx: transactionHashUrl
});
} catch (error) {
Expand Down

0 comments on commit 0b5dee8

Please sign in to comment.