bitshares / bitshares/bitshares-ui

Liquidity pool staking dialog not calculating share asset amount

Open
#3,695 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
520
Forks
575
Avg merge
12h 7m
Merged PRs (30d)
5

Description

**Describe the bug**
When asset A and B are both 0, upon entering an asset A amount the asset B amount is calculated, but the associated pool share amount is not distplayed.

**To Reproduce**

Go to pool staking, have 0 in both a and b fields.

Enter 1 in asset A.

Asset B will be calculated, but the pool share asset amount won't be.

**Expected behavior**

Calculate the pool share amount properly.

**Screenshots**

![staking_error](https://github.com/bitshares/bitshares-ui/assets/15861527/c4c9c2e6-6300-4ae7-bf4b-be309282b90b)

Contributor guide

Open the contributing guide

Research direction

Start at the pool staking dialog and reproduce the case with both asset fields at 0, then enter 1 in asset A. Trace where the asset B amount is calculated and compare that flow with the pool share amount calculation. Done means the share asset amount is displayed correctly in this scenario.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.