Giter Club home page Giter Club logo

ldex-ui's Introduction

ldex-ui

Requirements

How to run from source (recommended)

Running this application directly from source on your own desktop is the most secure way to trade. It is strongly recommended to use Node.js version 11.0.0.

To run for the first time (for traders):

  1. Using the terminal, navigate to the directory where you want to install this app.
  2. Clone this repository: git clone https://github.com/Capitalisk/ldex-ui.git
  3. cd ldex-ui/ldex-electron
  4. npm install
  5. npm run build-prod
  6. npm run electron

To run every other time:

  1. Using the terminal, navigate to the directory where you installed the app.
  2. cd ldex-ui/ldex-electron
  3. npm run electron

For development, use npm run start and view the running application at http://localhost:3000/

ldex-ui's People

Contributors

jaxkr avatar jondubois avatar maartennnn avatar sacoo7 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

maartennnn aaxx

ldex-ui's Issues

Automatic market discovery

Allow the UI to discover new markets on the blockchain automatically and add them to the market list panel ranked based on mainchain (LSK) volume for that day. The market list in the UI should be a combination of markets from the config file and DEX markets discovered on the blockchain which have good volume.

Rename SELL and BUY to (for example) SELL LSH and BUY LSH

Right now the sections are just called SELL and BUY; it should tell the user which token to SELL or BUY.

Also, next to each SELL LSH and BUY LSH, we should put an i (info) icon which gives the user a tooltip which explains in more detail. For example SELL LSH should say Convert your LSH to LSK. And BUY LSH should say Convert your LSK to LSH.

Minor improvements to sign in and sign out UX

  • Add a door icon next to each market so that the user can sign out of individual markets.
  • If user is already signed in with one or more passphrases and clicks on sign in again for the same market, show asterisks (*) where a password already exists. The user should still be able to replace the existing password with a new one if they want.

Improve price history chart

Currently, the chart only loads data from the last 100 trades and it reloads the records from the API from time to time.

  • Allow the user to view the price history further back into the past. Possibly with some kind of interactivity so that the user can scroll through the graph and it loads more data on demand. This data could be loaded directly from the blockchain HTTP APIs or it may be better to create a new API endpoint which aggregates price history data in a more efficient way. Any new backend solution should be packaged as an LDEM https://github.com/jondubois/ldem module to ensure that the historical price data can be served in a decentralized way.
  • Consider loading the trades/price data more efficiently (instead of fetching all the latest 100 every time).

Also check sufficient balance before sending a tx

image

The sell window checks is the amount is => than the minimum amount of LSH. But not if there's sufficient balance on the users account. Only after it sends a tx, which will fail, it shows the insufficient balance message.

Create an interface which can support any blockchain client (provided in config.json)

The ldex-ui client needs to support any blockchain client (not just Lisk client logic). Right now the Lisk-specific client logic is spread in different parts of the code and need to be abstracted and hidden away inside a new ChainClient class.

For example LiskChainClient class would fully abstract away the functionality provided by the following dependencies:

  • @liskhq/lisk-cryptography
  • @liskhq/lisk-passphrase
  • @liskhq/lisk-transactions

Users of the application should be able to specify different clients for different blockchain assets (this will also be useful for the upcoming Lisk v3). Each entry inside config.json in the assets object should contain the blockchainClientLibPath to use.

The client for each supported asset should be be required then instantiated inside App.jsx, then each client instance should be passed to the relevant React components (either as component attributes or via context).

Guidelines:

  • Try to keep the interface of the ChainClient/LiskChainClient interface/class as simple as possible (simple methods, simple arguments, simple return values, ...). The interface should not need to be specified explicitly. LiskChainClient library can be used as the default client.
  • Keep refactoring to a minimum (just to abstract away the blockchain-specific client functionality).

Pending orders from localStorage should only show up if they belong to the current account

Right now the client holds onto signed pending orders/transactions in localstorage; the ldex-ui just inserts those into the Your Orders section without considering whether it belongs to the current user or not. This means that if the user logs out and logs in with a different wallet, the pending order will show up in Your Orders even though it doesn't belong to the current wallet.

Add overall trade history

  • Adding a quick overview of trade history, for example last 20 trades, gives more insight in the activity of the DEX.
  • Good idea. I'm thinking maybe it may be better to just show the user's own trade history. Something to think about.

Allow the user to add new markets and assets from the UI

The user should be able to add new markets through the UI somehow.

These markets should be persistent so that if the user opens up or returns to the app later, they can still see their markets.

Some possible persistence options:

  • localStorage (web, possibly desktop too if Electron can guarantee persistence between app restarts)
  • Add a new custom-exchanges.json file (only for desktop)
  • edit the config.json file (only for desktop)

Allow switching the current base currency

Since a sidechain can have its own sidechains. The DEX UI should allow the user to navigate through the different levels of sidechains.

From the relevant market view, the user should be able to switch to the quote chain as the mainchain so that they can see its sub-markets.

Lisk DEX UI should behave like a file system browser; each market should expose a new layer of sub-markets. In accordance with Leasehold/lisk-dex-ui#1 - After switching to a new base chain, the application should initiate another round of discovery to find additional sub-markets.

The UI should remember the hierarchy of markets so that it can go back up through the different levels back to LSK as the mainchain.

This issue depends on Leasehold/lisk-dex-ui#6 - Users should be able to switch between different markets before they can switch the base currency. The user could select the quote currency from any market as the new base currency.

Improve error messages related to insufficient funds

If the account does not have enough tokens to perform a DEX action, it should give a more precise message.
Also, the UI should show a warning if the user is about to make a transaction which will bring their account balance to to near 0. If the user's account balance does not have enough tokens to cover the base fee, then the user may not be able to cancel an earlier order (without replenishing their account with additional LSK).

Signed binaries for different platforms

  • Create electron-builder.yml file to store build config.
  • Generate signing certificates for windows, linux and mac.
  • Generate artifacts on the CI, add release step to github if possible.

Use LDEX logo

We should use the new logo instead of the default one.

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.