Skip to content

Commit 7d94a2a

Browse files
authored
Merge pull request #2 from SmartCash/refactor(index)
add parseInt and remove radix for parseFloat
2 parents cf4811a + 4c5d364 commit 7d94a2a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ for (var key in templates) {
66
}
77

88
function amount (amount, fee) {
9-
fee = parseFloat(fee, 10) * 100000000
10-
amount = parseFloat(amount, 10) * 100000000
9+
fee = parseInt(parseFloat(fee) * 100000000, 10)
10+
amount = parseInt(parseFloat(amount) * 100000000, 10)
1111
return amount - fee
1212
}
1313

0 commit comments

Comments
 (0)