Skip to content
This repository has been archived by the owner on Jul 31, 2021. It is now read-only.

Division by 0 on liquidity pool #393

Open
Joimer opened this issue Apr 26, 2021 · 3 comments
Open

Division by 0 on liquidity pool #393

Joimer opened this issue Apr 26, 2021 · 3 comments
Labels
bug Something isn't working

Comments

@Joimer
Copy link

Joimer commented Apr 26, 2021

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

  1. Go to https://exchange.pancakeswap.finance/#/add/0x new token address/BNB
  2. Click on adding the token on the pairing
  3. 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.

@Joimer Joimer added the bug Something isn't working label Apr 26, 2021
@Chef-Cheems
Copy link
Contributor

Does it happen to some specific token? Just tried with random token from BSCscan (0x49277cc5be56b519901e561096bfd416277b4f6d) and it didn't go blank 🤔

@Joimer
Copy link
Author

Joimer commented Apr 26, 2021

Yep, I am testing with this token 0x49bb32eBdBD70468f809c434746c2Fc2Af1fF9e7 that has the V2 router

@Joimer
Copy link
Author

Joimer commented Apr 26, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants