Giter VIP home page Giter VIP logo

nearswap-ui's People

Contributors

amityadav0 avatar jamesondh avatar robert-zaremba avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nearswap-ui's Issues

As a user I can add a new Pool

We need to change a UX of adding new pool. Instead of having the form at the end, we need a modal with single box and following input fields:

  • token address
  • initial token amount
  • initial NEAR amount

The modal should automatically compute an expected price based on the initial amounts.

The, to add a new pool user has to perform two actions:

  1. approve allowance
  2. submit (will only get active, once the 1. completed)

Integrating the 2 actions above will be done in other task.

Implement navigational URLs

Currently, when a transaction is made and the user is redirected to the NEAR wallet, the view state is reset. (Example: a user goes to add liquidity to the pool and when redirected back to NEARswap, they will be taken back to the swap view rather than the correct pool view.) Navigational URLs are needed so that the correct view is loaded when the user is redirected back.

React Router seems to be the best choice to implement this.

Display decimals in a token pool and token swap box.

For better UX, we should make it clear what's the token denomination.

I propose to add some small, low contrast information about decimals, eg decimals=18, next to the token amount (in all places where we display an amount).

Other idea is to add an icon and display the information on pointer hover.

Add liquidity modal

On Pool tab, "Add Liquidity" button should pop up a modal with two input boxes for inputting amount to pool along with details of already provided liquidity.

Improve SWAP UX

We have one big UX default: the swap (exchange) calls has a guard parameter to protect the user from a front running. For each swap, user has to provide a max / min value he is willing to pay / receive. Since the NEARswap is based on a bonding curve, the price grows after each purchase. If we will keep same guardian value then of course the transaction will be invalidated because the price changed and we can't but the asset any more for the same price.

Solution:

  1. show to the user the guardian (max) price (idea: maybe small input field)
  2. let the user adjust the guardian price
  3. After each trade reset the field.
  4. On each asset change (whenever user will change the pair) get a new price from the blockchain.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.