1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

change undefined with 0 as value to fix new Decimal error (#1089)

* change undefined with 0 as value to fix new Decimal error

* correction for fix changed undefined value with 0 as value to fix new Decimal error
This commit is contained in:
EnzoVezzaro 2022-02-14 16:22:50 +01:00 committed by GitHub
parent 5da468c831
commit b6dc52c0ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -197,7 +197,7 @@ function PoolProvider({ children }: { children: ReactNode }): ReactElement {
// Staking bot receives half the pool shares so for display purposes
// we can multiply by 2 as we have a hardcoded 50/50 pool weight.
const userPoolShares = new Decimal(poolInfoUser.poolShares)
const userPoolShares = new Decimal(poolInfoUser.poolShares || 0)
.mul(2)
.toString()