Skip to content

Commit

Permalink
update title
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzhangg committed Mar 27, 2024
1 parent 1e4dfee commit c9b0fbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ The `XykService` refers to the [Xy=k API endpoints](https://www.covalenthq.com/d
- `GetHealthData()`: Ping the health of xy=k endpoints to get the synced block height per chain.

## Additional Helper Functions
### calculate_pretty_balance
### CalculatePrettyBalance
The `CalculatePrettyBalance` function is designed to take up to 4 inputs: the `Balance` field obtained from the `TokenBalances` endpoint and the `ContractDecimals`. The function also includes two optional fields, `roundOff` and `precision`, to allow developers to round the unscaled balance to a certain decimal precision. The primary purpose of this function is to convert the scaled token balance (the balance parameter) into its unscaled, human-readable form. The scaled balance needs to be divided by 10^(contractDecimals) to remove the scaling factor.

```go
Expand All @@ -249,7 +249,7 @@ func main() {
}
}
```
### prettify_currency
### PrettifyCurrency
The `PrettifyCurrency` function refines the presentation of a monetary value, accepting a numerical amount and a fiat currency code as parameters (with USD as the default currency). It simplifies currency formatting for developers, ensuring visually polished representations of financial information in user interfaces for an enhanced user experience.

```go
Expand Down

0 comments on commit c9b0fbb

Please sign in to comment.