Skip to content

Commit 0b5dee8

Browse files
committed
show link for DataHighway tx output since we are not listed on polkascan or subscan :(
1 parent b463ec5 commit 0b5dee8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

client/src/App.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ class App extends Component {
131131
<Row className="justify-content-md-center">
132132
<Col xs={12} md={12}>
133133
<Alert variant="info">
134-
{responseMsg} {responseTx ? <a target="_new" href={responseTx}>View Transaction</a> : null}
134+
{/* Show link to Ethereum transactions but only provide hash for DataHighway transactions */}
135+
{responseMsg} {responseTx ? (
136+
responseTx.includes("etherscan") ? (
137+
<a target="_new" href={responseTx}>View Transaction</a>
138+
) : responseTx
139+
) : null}
135140
</Alert>
136141
</Col>
137142
</Row>

server.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ app.get('/api/faucet/eth/ropsten',
4242
const to = req.query.address;
4343
const { transactionHashUrl } = await sendTransactionEth(to);
4444
res.send({
45-
message: 'Ropsten Ether sent',
45+
message: 'Ropsten Ether sent with transaction',
4646
tx: transactionHashUrl
4747
});
4848
} catch (error) {
@@ -79,7 +79,7 @@ app.get('/api/faucet/mxc/ropsten',
7979
const to = req.query.address;
8080
const { transactionHashUrl } = await sendTransactionMxc(to);
8181
res.send({
82-
message: 'Ropsten MXC ERC-20 sent',
82+
message: 'Ropsten MXC ERC-20 sent with transaction',
8383
tx: transactionHashUrl
8484
});
8585
} catch (error) {
@@ -116,7 +116,7 @@ app.get('/api/faucet/dhx/harbour',
116116
const to = req.query.address;
117117
const { transactionHashUrl } = await sendTransactionDhx(to);
118118
res.send({
119-
message: 'Harbour DHX sent',
119+
message: 'Harbour DHX sent with transaction',
120120
tx: transactionHashUrl
121121
});
122122
} catch (error) {

0 commit comments

Comments
 (0)