Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Check fee values against "undefined" (#241)
Browse files Browse the repository at this point in the history
Check fee values against "undefined"
  • Loading branch information
CassioMG authored May 25, 2021
1 parent edb232d commit a847eb2
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## In master

## [v0.3.0-rc.9](https://github.com/stellar/js-stellar-wallets/compare/v0.3.0-rc.8...v0.3.0-rc.9)

- Fix issue where zero fees were still being considered as "complex"
instead of "simple".

## [v0.3.0-rc.8](https://github.com/stellar/js-stellar-wallets/compare/v0.3.0-rc.7...v0.3.0-rc.8)

- Also consider 0 (zero) as "simple" fee type when parsing asset info.
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": "@stellar/wallet-sdk",
"version": "0.3.0-rc.8",
"version": "0.3.0-rc.9",
"description": "Libraries to help you write Stellar-enabled wallets in Javascript",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions src/transfers/parseInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ const parseFee = (
feeEnabled: boolean,
): Fee => {
if (
(fee_fixed && Number(fee_fixed) >= 0) ||
(fee_percent && Number(fee_percent) >= 0)
(fee_fixed !== undefined && Number(fee_fixed) >= 0) ||
(fee_percent !== undefined && Number(fee_percent) >= 0)
) {
return {
type: "simple",
Expand Down

0 comments on commit a847eb2

Please sign in to comment.