3s3s / opentrade

OpenTrade - Open Source Cryptocurrency Exchange
MIT License
399 stars 399 forks source link

Incorrect fee Comission rate when fee scheduled changed? #57

Open bihonglu opened 6 years ago

bihonglu commented 6 years ago

Dear OpenTrade Dev,,

I have modified my clone of OpenTrade to double the fee from 0.1% to 0.2%. I have modifed two part of code:

server/constants.js modified -exports.TRADE_COMISSION = 0.001; +exports.TRADE_COMISSION = 0.002;

server/views/pages/fees.ejs modified:

Trading Commission

However, even if above change, the fees on order seems to stay same as 0.1%. I rebooted the machine, reinstalled npm did not help the issue.

Here is error order page under my clone server with 0.2% commission rate:

Buy Marycoin Your balance: Dogecoin Highest Ask: Dogecoin Amount:

100 MC Price:

1.6 DOGE Comission:

0.16 DOGE Total:

160.16 DOGE

--- comission above is automatically calculated by the system-- The 0.2% fee would be 160.32 total, obviously above still shows the original 0.1% comission fees. What is going on?

bihonglu commented 6 years ago

I checked code myself in the order.js uder user folder, it looks all good, it is calling the constant.js module and using the TRADE_COMMISSION for fee calculation. Do not know why the fee did not change when user place an order. Now the fee and total appears to be calculated by java script automatically, Is it possible that browser has cache issue still remembers the old value days ago? It should not be, used my cell phone, and see the same wrong old fees too. Never used cell phone on opentrade software before.

bihonglu commented 6 years ago

Found the reason. In addition to the constants.js file, below file also needs to be modified: static_pages/js/utils.js DEFAULT_PAIR: DEFAULT_PAIR,

After changing the content of this file, all the comission calculation is changed from 0.1% to 0.2% successfully.

This issue can be closed now.