1
0
mirror of https://github.com/oceanprotocol/commons.git synced 2023-03-15 18:03:00 +01:00
This commit is contained in:
Sebastian Gerske 2019-10-07 14:25:42 +02:00
parent 6b237e7348
commit 3235dc1d5e
2 changed files with 16 additions and 20 deletions

View File

@ -29,4 +29,5 @@ export const faucetUri =
export const verbose = true export const verbose = true
export const analyticsId = 'UA-60614729-11' export const analyticsId = 'UA-60614729-11'
export const allowPricing = process.env.REACT_APP_ALLOW_PRICING || false export const allowPricing = process.env.REACT_APP_ALLOW_PRICING || false
export const showRequestTokens = process.env.REACT_APP_SHOW_REQUEST_TOKENS_BUTTON || false export const showRequestTokens =
process.env.REACT_APP_SHOW_REQUEST_TOKENS_BUTTON || false

View File

@ -28,7 +28,6 @@ class Faucet extends PureComponent<{}, FaucetState> {
} }
private getTokens = async () => { private getTokens = async () => {
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]
@ -126,9 +125,7 @@ class Faucet extends PureComponent<{}, FaucetState> {
> >
Request Tokens Request Tokens
</Button> </Button>
<p> <p>You can request tokens every once in a while.</p>
You can request tokens every once in a while.
</p>
</> </>
) )
@ -158,21 +155,19 @@ class Faucet extends PureComponent<{}, FaucetState> {
)} )}
</div> </div>
{ {showRequestTokens ? (
showRequestTokens ? <div className={styles.action}>
<div className={styles.action}> {isLoading ? (
{isLoading ? ( <Spinner message="Getting Tokens..." />
<Spinner message="Getting Tokens..."/> ) : error ? (
) : error ? ( <this.Error />
<this.Error/> ) : success ? (
) : success ? ( <this.Success />
<this.Success/> ) : (
) : ( isLogged && <this.GetTokens />
isLogged && <this.GetTokens /> )}
)} </div>
</div> : null ) : null}
}
</Content> </Content>
</Route> </Route>
)} )}