Skip to content

Commit

Permalink
chore: ensure 2 decimal places (#298)
Browse files Browse the repository at this point in the history
* chore: ensure 2 decimal places

* chore: update changelog

* 0.14.1
  • Loading branch information
npty authored Feb 16, 2024
1 parent 0678a94 commit c7d6407
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [0.14.1] - 2024-FEBRUARY-16

- Fix floating points issue for `executeGasMultiplier` in `estimateGasFee` function.

## [0.14.0] - 2024-FEBRUARY-9

Breaking Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axelar-network/axelarjs-sdk",
"version": "0.14.0",
"version": "0.14.1",
"description": "The JavaScript SDK for Axelar Network",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/libs/AxelarQueryAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ export class AxelarQueryAPI {
destination_native_token,
express_fee_string,
express_supported,
execute_gas_multiplier,
} = response.result;
const execute_gas_multiplier = response.result.execute_gas_multiplier as number;
const { decimals: sourceTokenDecimals } = source_token;
const baseFee = parseUnits(source_base_fee_string, sourceTokenDecimals).toString();
const expressFee = express_fee_string
Expand All @@ -230,7 +230,7 @@ export class AxelarQueryAPI {
baseFee,
expressFee,
sourceToken: source_token,
executeGasMultiplier: execute_gas_multiplier,
executeGasMultiplier: parseFloat(execute_gas_multiplier.toFixed(2)),
destToken: {
gas_price: destination_native_token.gas_price,
gas_price_gwei: parseInt(destination_native_token.gas_price_gwei).toString(),
Expand Down

0 comments on commit c7d6407

Please sign in to comment.