From c9b0fbb745746ac7e8288a177d14160a38a7ea1e Mon Sep 17 00:00:00 2001 From: davidzhangg Date: Tue, 26 Mar 2024 21:14:08 -0700 Subject: [PATCH] update title --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b2ac828..f0225ab 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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