Skip to content

Commit

Permalink
edit string math fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorSlimm committed Mar 3, 2022
1 parent 3241ca2 commit 0a9a072
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/okcoin.js
Original file line number Diff line number Diff line change
Expand Up @@ -2761,8 +2761,8 @@ module.exports = class okcoin extends Exchange {
// or a negative number (transaction fee deduction)
// therefore we need to invert the fee
// more about it https://github.com/ccxt/ccxt/issues/5909
if ((feeCostFirstString !== undefined) && (feeCostFirstString !== 0)) {
if ((feeCostSecondString !== undefined) && (feeCostSecondString !== 0)) {
if ((feeCostFirstString !== undefined) && (feeCostFirstString !== '0')) {
if ((feeCostSecondString !== undefined) && (feeCostSecondString !== '0')) {
fees = [
{
'cost': Precise.stringNeg (feeCostFirstString),
Expand All @@ -2779,7 +2779,7 @@ module.exports = class okcoin extends Exchange {
'currency': feeCurrencyCodeFirst,
};
}
} else if ((feeCostSecondString !== undefined) && (feeCostSecondString !== 0)) {
} else if ((feeCostSecondString !== undefined) && (feeCostSecondString !== '0')) {
fee = {
'cost': Precise.stringNeg (feeCostSecondString),
'currency': feeCurrencyCodeSecond,
Expand Down

0 comments on commit 0a9a072

Please sign in to comment.