CommonsSwarm / tec-convert

Convert between your Aragon tokens
https://convert.tecommons.org
3 stars 11 forks source link

Apply tribute to received token estimation and show tribute on the frontend #24

Closed PabloCGL closed 3 years ago

PabloCGL commented 3 years ago

Addressing Issue #4. Now applies the tribute% to the number shown as "tokens received" to the user. Also tells you the % applied depeding on if you're buying or selling, and gives an estimate of the minimum received accounting for slippage (hardcoded at 1% slippage for now). NOTE: this only applies to the frontend, and not the buy process itself. Setting a "minimum received" on the contract call will be adressed separately when working on issue #10

If this PR is accepted, some minor UX points will have to be addressed in regards to number display formatting and layout. I'd open relevant issues.

PabloCGL commented 3 years ago

@sembrestels I wanted to tag you as reviewer but it seems I can't?

PabloCGL commented 3 years ago

Now also sends the minimum to the smart contracts.

PabloCGL commented 3 years ago

Just noticed after the demo that I forgot to push the last change 🤦‍♂️ Now it everything should be there

GriffGreen commented 3 years ago

Might be cleaner to merge this and then add a new one