mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
- increased token amount given
- made clear which token is going to be requested - removed code duplication
This commit is contained in:
parent
3235dc1d5e
commit
aeb24aadda
@ -31,7 +31,7 @@ class Faucet extends PureComponent<{}, FaucetState> {
|
|||||||
const { ocean } = this.context
|
const { ocean } = this.context
|
||||||
const accounts = await ocean.accounts.list()
|
const accounts = await ocean.accounts.list()
|
||||||
const account = accounts[0]
|
const account = accounts[0]
|
||||||
await ocean.accounts.requestTokens(account, 10)
|
await ocean.accounts.requestTokens(account, 100)
|
||||||
}
|
}
|
||||||
|
|
||||||
private getEther = async (
|
private getEther = async (
|
||||||
@ -123,7 +123,7 @@ class Faucet extends PureComponent<{}, FaucetState> {
|
|||||||
disabled={!this.context.isLogged}
|
disabled={!this.context.isLogged}
|
||||||
name="FaucetTokens"
|
name="FaucetTokens"
|
||||||
>
|
>
|
||||||
Request Tokens
|
Request OCEAN Tokens
|
||||||
</Button>
|
</Button>
|
||||||
<p>You can request tokens every once in a while.</p>
|
<p>You can request tokens every once in a while.</p>
|
||||||
</>
|
</>
|
||||||
@ -151,23 +151,14 @@ class Faucet extends PureComponent<{}, FaucetState> {
|
|||||||
) : success ? (
|
) : success ? (
|
||||||
<this.Success />
|
<this.Success />
|
||||||
) : (
|
) : (
|
||||||
isLogged && <this.GetEther />
|
<>
|
||||||
|
{isLogged && <this.GetEther />}
|
||||||
|
{isLogged && showRequestTokens && (
|
||||||
|
<this.GetTokens />
|
||||||
|
)}
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{showRequestTokens ? (
|
|
||||||
<div className={styles.action}>
|
|
||||||
{isLoading ? (
|
|
||||||
<Spinner message="Getting Tokens..." />
|
|
||||||
) : error ? (
|
|
||||||
<this.Error />
|
|
||||||
) : success ? (
|
|
||||||
<this.Success />
|
|
||||||
) : (
|
|
||||||
isLogged && <this.GetTokens />
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
) : null}
|
|
||||||
</Content>
|
</Content>
|
||||||
</Route>
|
</Route>
|
||||||
)}
|
)}
|
||||||
|
Loading…
Reference in New Issue
Block a user