mirror of
https://github.com/oceanprotocol/market.git
synced 2024-11-15 01:34:57 +01:00
add cleanup
This commit is contained in:
parent
77d305ae2e
commit
ef8814b622
@ -17,13 +17,11 @@ function calculatePercent(percent: number, num: number) {
|
|||||||
|
|
||||||
export default function Add({
|
export default function Add({
|
||||||
setShowAdd,
|
setShowAdd,
|
||||||
dtSymbol,
|
|
||||||
poolAddress,
|
poolAddress,
|
||||||
totalPoolTokens,
|
totalPoolTokens,
|
||||||
totalBalance
|
totalBalance
|
||||||
}: {
|
}: {
|
||||||
setShowAdd: (show: boolean) => void
|
setShowAdd: (show: boolean) => void
|
||||||
dtSymbol: string
|
|
||||||
poolAddress: string
|
poolAddress: string
|
||||||
totalPoolTokens: string
|
totalPoolTokens: string
|
||||||
totalBalance: Balance
|
totalBalance: Balance
|
||||||
@ -31,7 +29,6 @@ export default function Add({
|
|||||||
const { ocean, accountId, balance } = useOcean()
|
const { ocean, accountId, balance } = useOcean()
|
||||||
const [amount, setAmount] = useState<string>()
|
const [amount, setAmount] = useState<string>()
|
||||||
const [isLoading, setIsLoading] = useState<boolean>()
|
const [isLoading, setIsLoading] = useState<boolean>()
|
||||||
const [newDtAmount, setNewDtAmount] = useState<string>()
|
|
||||||
|
|
||||||
const newPoolTokens =
|
const newPoolTokens =
|
||||||
totalBalance &&
|
totalBalance &&
|
||||||
@ -85,7 +82,6 @@ export default function Add({
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<p>You will receive:</p>
|
<p>You will receive:</p>
|
||||||
<Token symbol={dtSymbol} balance={newDtAmount} />
|
|
||||||
<Token symbol="BPT" balance={newPoolTokens} />
|
<Token symbol="BPT" balance={newPoolTokens} />
|
||||||
<Token symbol="% of pool" balance={newPoolShare} />
|
<Token symbol="% of pool" balance={newPoolShare} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -96,7 +96,6 @@ export default function Pool({ ddo }: { ddo: DDO }): ReactElement {
|
|||||||
) : showAdd ? (
|
) : showAdd ? (
|
||||||
<Add
|
<Add
|
||||||
setShowAdd={setShowAdd}
|
setShowAdd={setShowAdd}
|
||||||
dtSymbol={dtSymbol}
|
|
||||||
poolAddress={poolAddress}
|
poolAddress={poolAddress}
|
||||||
totalPoolTokens={totalPoolTokens}
|
totalPoolTokens={totalPoolTokens}
|
||||||
totalBalance={totalBalance}
|
totalBalance={totalBalance}
|
||||||
|
Loading…
Reference in New Issue
Block a user