Code Monkey home page Code Monkey logo

faast-web's Introduction

Faast

Package version GitHub license Build Status Netlify Status

A decentralized cryptocurrency portfolio manager and exchange. https://faa.st

This repository contains code for both the Faast static website and single page application. Both are built using React.

Usage

Prerequisites

NPM is required, please see the website for installation instructions.

Running

This repository includes a prebuilt version of the application located in dist. To run it you'll need to install local-web-server:

npm install local-web-server

Then start the application with:

npm start

Then open https://localhost:8000. To resolve the SSL warning follow these steps to install the certificate.

Building

To build the application, you will need to install all of the modules:

npm install

Build the app:

npm run build

Files will be built to the dist folder. They can be served from your machine with:

npm start

Contributing

Development Server

The static website is built using react-static, which uses webpack under the hood. And the single page app is built directly with Webpack. For easier development, both can be run with webpack dev server. This allows live reloading on code changes. To start both dev servers behind a frontend proxy, run:

npm run dev

Once compiled, open http://localhost:8000 in your browser.

This concurrently runs the following:

HTTPS

To run the development server over https use HTTPS=true npm run dev

To resolve the SSL warning follow these steps.

or on Google Chrome Browser visit chrome://flags/#allow-insecure-localhost and set the property to Enabled.

Ngrok

For mobile development you can run the development server behind ngrok by running npm run ngrok in a separate terminal.

Branches

The OneFlow model will be followed as best as possible, with develop being the working branch and master pointing to the latest release tag.

Testing

Run:

npm run test

New Currency Checklist

  1. Implement the Wallet abstraction which specifies how to load balances, generate/sign transactions, etc. (see src/services/Wallet/lib/Wallet.ts)
    • If the currency is Bitcoin based and has bitcore support, you can implement BitcoreWallet instead. For an example refer to one of the existing implementations for Bitcoin/Litecoin.
  2. Update src/services/Wallet/lib/WalletSerializer.ts
  3. Update src/utilities/walletIcon.js
  4. Update src/app/components/ConfirmTransactionModal/index.jsx
  5. Update explorer URLs src/config/index.js
  6. If hardware wallet based:
    • Update src/app/actions/connectHardwareWallet.js
    • Add default derivation path src/config/walletTypes.js
    • If export flow differs from Bitcoin, add instruction override in src/app/components/HardwareWalletModal/ConnectionInstructions.jsx
  7. If not hardware wallet based:
    • Add new access tile src/app/components/Access
    • Create custom action to connect to the wallet src/app/actions/access.js

Security

Faast is a fully client side application. Faast is never in control of user funds, and private keys never leave the browser, they are only used to sign transactions. This is similar to myetherwallet.com

Faast never stores, transmits or otherwise knows of private keys. If you are interesting in auditing this, you can find the wallet handling logic located in src/services/Wallet.

License

This project is licensed under the MIT License - see the LICENSE file for details

faast-web's People

Contributors

dankonino avatar dependabot[bot] avatar dwolfgram avatar dylanseago avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faast-web's Issues

'NPN run' error

Following error on Windows, both stabel release and developer branch:
npm ERR! path C:\Users%USER%\package.json
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users%USER%\package.json'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

Wait to mark "order complete" once assets are received

An order may be marked complete before web3 returns updated balances. If the endpoint returned a txhash it could poll web3 for those transactions, waiting to mark orders as "complete" until the transaction is seen.
May be related to #2

Support adding new ERC-20 tokens to Assets

Is it possible to add support for a new Asset 'on the fly' via the Token Symbol, Contract Address, and decimals such as what's used on MetaMask or MyEtherWallet? Thanks and great project!

Track/display a "Pending Balance"

Offset the sudden drop in the portfolio balance during a swap by keeping track of the funds that were sent. Include the pending amount in the fiat balance calculation until the swap is complete.

View and follow tokens you don't own from the Balances page

Viewing other tokens and their charts would be very beneficial. Being able to "follow" tokens would require setting a state somewhere. Local storage is used for settings but is not persisted across browsers/devices. Blockstack storage can be a solution but there's a current issue with mixed content (https->http). Server side storage would be another alternative

Do not use pie charts

Better handling for server errors

A failed call to /app/assets will stop the app from loading and display a very brief message. Provide better error messages and retry calls to server in certain situations.

Swap should clarify about fees and what happens with late confirmations

Lets say, I select reasonable but low (for the current time) transaction fee, but the transaction is only confirmed hours or days later (i.e. because network suddenly have more transactions). What will happen with the sent "funds"? Is there a way to get it back, or perform a swap at different rate (if market conditions changed grately), or what? I think the swap and status must show this much more clearly. And possibly automatically include "return" address, in case something goes wrong, to return back coins (minus additional fees for a new transaction and some minor penalty for a trouble), or warn about fees, or something.

Support showing balances of all currencies held in hardware wallets

New currencies can be added by implementing the Wallet interface.

Trezor

  • Bitcoin (BTC)
  • Bitcoin Cash (BCH)
  • Bitcoin Gold (BTG)
  • Litecoin (LTC)
  • DASH (DASH
  • Zcash (ZEC)
  • Ethereum (ETH)
  • Ethereum Classic (ETC)
  • ERC-20 Tokens
  • Expanse (EXP)
  • UBIQ (UBQ)
  • NEM (XEM)
  • Namecoin (NMC)
  • Dogecoin (DOGE)

Ledger

  • Ark (ARK)
  • Bitcoin (BTC)
  • Bitcoin Cash (BCH)
  • Bitcoin Gold (BTG)
  • Ethereum (ETH)
  • Ethereum Classic (ETC)
  • ERC-20 Tokens
  • Expanse (EXP)
  • Dash (DASH)
  • Digibyte (DGB)
  • Dogecoin (DOGE)
  • Hcash (HSR)
  • Komodo (KMD)
  • Litecoin (LTC)
  • Neo (NEO)
  • Pivx (PIVX)
  • PoSW (POSW)
  • Qtum (QTUM)
  • Stealthcoin (XST)
  • Stellar (XLM)
  • Stratis (STRAT)
  • Ubiq (UBQ)
  • Vertcoin (VTC)
  • Viacoin (VIA)
  • Ripple (XRP)
  • Zcash (ZEC)
  • Iota (IOTA)

Invalid JSON RPC response: {}

I can't use the portfolio at faa.st, I get the error Invalid JSON RPC response: {} also tried sending a message to [email protected] but haven't received any response, although this issue is not exclusively related to the source code in repository, there is still a change that it is so I' posting it here nonetheless.

New asset picker on Modify page

The current asset picker was designed for the original swap app but does fulfill all the needs of the portfolio. Users should be able to see more information/charts on the tokens they wish to swap to.

Pending Token Transfers should be indicated in portfolio

After signing off on the token purchase, the pending allocation should be visible in the portfolio as "pending transfers". While this requires some sort of state management, html5 allows local storage of such information. https://www.w3schools.com/html/html5_webstorage.asp

While this would not be visible cross platforms, it should smooth out the customer confusion about completed transactions awaiting token transfers. The funds are not gone, the order is just being filled...

Transaction history page

Currently the only way to view all transactions is through a block explorer, i.e. https://etherscan.io/. A more "swap" specific view can be presented which combines the send and receive transactions for swaps as well as other transactions. Or simply swaps only to start, using the /orders endpoint

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.