mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
show BPT only in debug mode
This commit is contained in:
parent
69afec8511
commit
a8d8c95acb
@ -8,6 +8,7 @@ import Token from './Token'
|
|||||||
import { Balance } from './'
|
import { Balance } from './'
|
||||||
import PriceUnit from '../../../atoms/Price/PriceUnit'
|
import PriceUnit from '../../../atoms/Price/PriceUnit'
|
||||||
import Actions from './Actions'
|
import Actions from './Actions'
|
||||||
|
import { useUserPreferences } from '../../../../providers/UserPreferences'
|
||||||
|
|
||||||
// TODO: handle and display all fees somehow
|
// TODO: handle and display all fees somehow
|
||||||
|
|
||||||
@ -22,6 +23,7 @@ export default function Add({
|
|||||||
totalPoolTokens: string
|
totalPoolTokens: string
|
||||||
totalBalance: Balance
|
totalBalance: Balance
|
||||||
}): ReactElement {
|
}): ReactElement {
|
||||||
|
const { debug } = useUserPreferences()
|
||||||
const { ocean, accountId, balance } = useOcean()
|
const { ocean, accountId, balance } = useOcean()
|
||||||
const [amount, setAmount] = useState('')
|
const [amount, setAmount] = useState('')
|
||||||
const [swapFee, setSwapFee] = useState<string>()
|
const [swapFee, setSwapFee] = useState<string>()
|
||||||
@ -89,7 +91,7 @@ export default function Add({
|
|||||||
<div className={styles.output}>
|
<div className={styles.output}>
|
||||||
<div>
|
<div>
|
||||||
<p>You will receive</p>
|
<p>You will receive</p>
|
||||||
<Token symbol="BPT" balance={newPoolTokens} />
|
{debug === true && <Token symbol="BPT" balance={newPoolTokens} />}
|
||||||
<Token symbol="% of pool" balance={newPoolShare} />
|
<Token symbol="% of pool" balance={newPoolShare} />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -12,6 +12,7 @@ import Remove from './Remove'
|
|||||||
import Tooltip from '../../../atoms/Tooltip'
|
import Tooltip from '../../../atoms/Tooltip'
|
||||||
import Conversion from '../../../atoms/Price/Conversion'
|
import Conversion from '../../../atoms/Price/Conversion'
|
||||||
import EtherscanLink from '../../../atoms/EtherscanLink'
|
import EtherscanLink from '../../../atoms/EtherscanLink'
|
||||||
|
import { useUserPreferences } from '../../../../providers/UserPreferences'
|
||||||
|
|
||||||
export interface Balance {
|
export interface Balance {
|
||||||
ocean: string
|
ocean: string
|
||||||
@ -23,6 +24,7 @@ export interface Balance {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
|
export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
|
||||||
|
const { debug } = useUserPreferences()
|
||||||
const { ocean, accountId } = useOcean()
|
const { ocean, accountId } = useOcean()
|
||||||
const { price, poolAddress } = useMetadata(ddo)
|
const { price, poolAddress } = useMetadata(ddo)
|
||||||
|
|
||||||
@ -149,7 +151,7 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
|
|||||||
</h3>
|
</h3>
|
||||||
<Token symbol="OCEAN" balance={userBalance.ocean} />
|
<Token symbol="OCEAN" balance={userBalance.ocean} />
|
||||||
<Token symbol={dtSymbol} balance={userBalance.dt} />
|
<Token symbol={dtSymbol} balance={userBalance.dt} />
|
||||||
<Token symbol="BPT" balance={poolTokens} />
|
{debug === true && <Token symbol="BPT" balance={poolTokens} />}
|
||||||
<Token symbol="% of pool" balance={poolShare} />
|
<Token symbol="% of pool" balance={poolShare} />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -157,7 +159,9 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
|
|||||||
<h3 className={styles.title}>Pool Statistics</h3>
|
<h3 className={styles.title}>Pool Statistics</h3>
|
||||||
<Token symbol="OCEAN" balance={totalBalance.ocean} />
|
<Token symbol="OCEAN" balance={totalBalance.ocean} />
|
||||||
<Token symbol={dtSymbol} balance={totalBalance.dt} />
|
<Token symbol={dtSymbol} balance={totalBalance.dt} />
|
||||||
<Token symbol="BPT" balance={totalPoolTokens} />
|
{debug === true && (
|
||||||
|
<Token symbol="BPT" balance={totalPoolTokens} />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user