Skip to content

Commit

Permalink
ui: fix grown stalk calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
0xalecks committed Apr 11, 2024
1 parent 81a21a3 commit bde358b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion projects/sdk/src/lib/silo/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ export function calculateGrownStalkSeeds(
* @param bdv The bdv of the deposit
*/
export function calculateGrownStalkStems(stemTip: ethers.BigNumber, stem: ethers.BigNumber, bdv: TokenValue) {
const deltaStem = stemTip.sub(stem);
const deltaStem = stemTip.sub(stem).div(10 ** 6);

if (deltaStem.lt(0)) return Silo.sdk.tokens.STALK.fromHuman("0"); // FIXME
return Silo.sdk.tokens.STALK.fromBlockchain(bdv.toBigNumber().mul(deltaStem));
}
Expand Down

0 comments on commit bde358b

Please sign in to comment.