avoid division by zero
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
421f2cef27
commit
7607030d58
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "ghost-dao-interface",
|
"name": "ghost-dao-interface",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.7.5",
|
"version": "0.7.6",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
|||||||
@ -20,7 +20,7 @@ export const useCurrentIndex = (chainId) => {
|
|||||||
chainId: chainId,
|
chainId: chainId,
|
||||||
});
|
});
|
||||||
|
|
||||||
const currentIndexRaw = index ? index : 0n;
|
const currentIndexRaw = index ? index : 1000000000n;
|
||||||
const currentIndex = new DecimalBigNumber(currentIndexRaw, 9);
|
const currentIndex = new DecimalBigNumber(currentIndexRaw, 9);
|
||||||
|
|
||||||
return { currentIndex, refetch };
|
return { currentIndex, refetch };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user