mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
link up transaction IDs with submarine, support pacific too
This commit is contained in:
parent
01d5bf703d
commit
97d6c2756e
@ -14,22 +14,28 @@ const VersionTableContracts = ({
|
|||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
{contracts &&
|
{contracts &&
|
||||||
Object.keys(contracts).map(key => (
|
Object.keys(contracts).map(key => {
|
||||||
|
const submarineLink = `https://submarine${
|
||||||
|
network === 'duero'
|
||||||
|
? '.duero'
|
||||||
|
: network === 'pacific'
|
||||||
|
? '.pacific'
|
||||||
|
: ''
|
||||||
|
}.dev-ocean.com/address/${contracts[key]}`
|
||||||
|
|
||||||
|
return (
|
||||||
<tr key={key}>
|
<tr key={key}>
|
||||||
<td>
|
<td>
|
||||||
<span className={styles.label}>{key}</span>
|
<span className={styles.label}>{key}</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<a
|
<a href={submarineLink}>
|
||||||
href={`https://submarine${
|
|
||||||
network === 'duero' ? '.duero' : ''
|
|
||||||
}.dev-ocean.com/address/${contracts[key]}`}
|
|
||||||
>
|
|
||||||
<code>{contracts[key]}</code>
|
<code>{contracts[key]}</code>
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))}
|
)
|
||||||
|
})}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
)
|
)
|
||||||
|
@ -16,6 +16,8 @@ interface FaucetState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default class Faucet extends PureComponent<{}, FaucetState> {
|
export default class Faucet extends PureComponent<{}, FaucetState> {
|
||||||
|
public static contextType = User
|
||||||
|
|
||||||
public state = {
|
public state = {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
success: undefined,
|
success: undefined,
|
||||||
@ -59,15 +61,31 @@ export default class Faucet extends PureComponent<{}, FaucetState> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private Success = () => (
|
private Success = () => {
|
||||||
|
const { network } = this.context
|
||||||
|
const { trxHash } = this.state
|
||||||
|
|
||||||
|
const submarineLink = `https://submarine${
|
||||||
|
network === 'Duero'
|
||||||
|
? '.duero'
|
||||||
|
: network === 'Pacific'
|
||||||
|
? '.pacific'
|
||||||
|
: ''
|
||||||
|
}.dev-ocean.com/tx/${trxHash}`
|
||||||
|
|
||||||
|
return (
|
||||||
<div className={styles.success}>
|
<div className={styles.success}>
|
||||||
<strong>{this.state.success}</strong>
|
<strong>{this.state.success}</strong>
|
||||||
<p>
|
<p>
|
||||||
<strong>Your Transaction Hash</strong>
|
<strong>Your Transaction Hash</strong>
|
||||||
<code>{this.state.trxHash}</code>
|
|
||||||
|
<a href={submarineLink}>
|
||||||
|
<code>{trxHash}</code>
|
||||||
|
</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
}
|
||||||
|
|
||||||
private Error = () => (
|
private Error = () => (
|
||||||
<div className={styles.error}>
|
<div className={styles.error}>
|
||||||
|
Loading…
Reference in New Issue
Block a user