swarmcity / SwarmCityDapp

Swarm City dApp FrontEnd
MIT License
28 stars 10 forks source link

total amount request incorrect #825

Closed kikipluche closed 5 years ago

kikipluche commented 6 years ago

Location

ne request

Expected behavior

the total amount shown is the offer + the fee

Actual behavior

when putting in an offer with decimals (1,6,9) the total offer adds a 1 in the 16th decimal place

screen shot 2018-09-18 at 13 07 01

Steps to reproduce the problem

new request, post offer of 1,1 or 1,6 or 1,9

Operating system / hardware

all

kikipluche commented 6 years ago

@bkawk Flurkel explained that this is due to blockchain and numbers, they are not absolute. He says it is unfixable, but, we can round the numbers at 2 decimals in the front end.

xardass commented 6 years ago

@bkawk Let's address this with a consistent use of Big Numbers.

kingflurkel commented 6 years ago

@bkawk Flurkel explained that this is due to blockchain and numbers, they are not absolute. He says it is unfixable, but, we can round the numbers at 2 decimals in the front end.

Yeah like Xardas said, we need to use bigNumbers everywhere and only go fromBigNumber / 1e18 when we need to show it