-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: wrong unit displayed in claim rewards modal (#626)
- Loading branch information
1 parent
72f2313
commit 60f3f9f
Showing
3 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
/** | ||
* Converts BBN to uBBN (micro BBN). | ||
* Converts BABY to uBBN (micro BABY). | ||
* should be used internally in the app | ||
* @param bbn The amount in BBN. | ||
* @param bbn The amount in BABY. | ||
* @returns The equivalent amount in uBBN. | ||
*/ | ||
export function bbnToUbbn(bbn: number): number { | ||
export function babyToUbbn(bbn: number): number { | ||
return Math.round(bbn * 1e6); | ||
} | ||
|
||
/** | ||
* Converts uBBN (micro BBN) to BBN. | ||
* Converts uBBN (micro BABY) to BABY. | ||
* should be used only in the UI | ||
* @param ubbn The amount in uBBN. | ||
* @returns The equivalent amount in BBN. | ||
* @returns The equivalent amount in BABY. | ||
*/ | ||
export function ubbnToBbn(ubbn: number): number { | ||
export function ubbnToBaby(ubbn: number): number { | ||
return ubbn / 1e6; | ||
} |