burner-wallet / burner-wallet-2

A modular, extendable Burner Wallet
MIT License
88 stars 39 forks source link

Add functionality to display information from exchange estimate #24

Closed patitonar closed 4 years ago

patitonar commented 4 years ago

This PR adds the functionality to allow exchanges Pairs to display custom information related to the estimate of the exchange operation.

This is useful for example for bridge pairs that have fees in the operations so at the moment of informing the estimated value the user is going to receive on the other asset, a message can be displayed informing of the fee charged to the user.

This also can be useful for the Uniswap pair that could use this field to display the exchange rate for example between ETH <> DAI when estimating the receiving value.

Right now, XDAIBridge (does not have fees) and Uniswap pairs do not provide any information on the estimation so there shouldn't be any changes from the user perspective only a little bigger space between the inputs and the assets dropdown.

I tested adding a custom estimate information to display in XDAIBridge and this is how it looks:

estimateMessage

patitonar commented 4 years ago

Hi @dmihal! What do you about the functionality proposed in this PR?