pancake-swap-interface-v1
pancake-swap-interface-v1 copied to clipboard
Division by 0 on liquidity pool
Bug Description When trying to create a new Liquidity Pool, first adding the token for the pairing, there's a division by zero and the frontend crashes.
Steps to Reproduce
- Go to https://exchange.pancakeswap.finance/#/add/0x new token address/BNB
- Click on adding the token on the pairing
- Page gets blank with the following errors:
rangeError: Division by zero
value jsbi-umd.js:1
get fraction.ts:37
quote price.ts:64
R hooks.ts:86
React 2
L hooks.ts:71
Ol index.tsx:72
React 8
unstable_runWithPriority scheduler.production.min.js:18
React 5
Uncaught RangeError: Division by zero
value jsbi-umd.js:1
get fraction.ts:37
quote price.ts:64
R hooks.ts:86
React 2
L hooks.ts:71
Ol index.tsx:72
React 8
unstable_runWithPriority scheduler.production.min.js:18
React 5
Expected Behavior The page not to turn white, to show the pairing, and to allow me to add the new LP pairing.
Does it happen to some specific token? Just tried with random token from BSCscan (0x49277cc5be56b519901e561096bfd416277b4f6d
) and it didn't go blank 🤔
Yep, I am testing with this token 0x49bb32eBdBD70468f809c434746c2Fc2Af1fF9e7
that has the V2 router
I cloned to test in local using mainnet and I could interact with the UI without this problem, so it may be something that's not happening on master upstream.