Code Monkey home page Code Monkey logo

pyrus's Introduction

Pyrus Web App

Build

This repo stores the Pyrus codebase. The code is served at pyrus.ubiqsmart.com

Documentation can be found in our wiki

Development / Build Requirements

  • Node >= 12*
  • Yarn >= 1.19.1**

On systems where a pre-built version of node-hid is not available (e.g. 32-bit versions of Windows and Linux), you additionally need Python (3+) and node-gyp installed.

*Higher versions should work fine, but may cause inconsistencies.
**npm is NOT supported for package management. Pyrus uses yarn.lock to ensure sub-dependency versions are pinned, so yarn is required to install node_modules

***For users trying to build with WSL, you'll need to have install libpng via sudo apt-get install libpng16-dev.

Running the App

First, you must run yarn to grab all the dependencies. If you are ever having trouble with something, a good place to start is by trying rm -rf node_modules/ && yarn which will completely clear all your previously installs dependencies and re-install them from scratch.

Then, you can run various commands depending on what you want to do:

Development

# run app in dev mode in browser, rebuild on file changes
yarn start

A development server will be available on https://localhost:3000 If you're using Chrome, you will get a net::ERR_CERT_AUTHORITY_INVALID warning. To disable it you can your settings in chrome: chrome://flags/#allow-insecure-localhost

Staging

# builds app for staging
yarn build:staging

Production

# builds app for production
yarn build

Testing

Unit Tests

# runs all unit tests using jest
yarn test

End-to-end Tests

# runs all e2e tests using testcafe
yarn test:e2e

To debug E2E tests in the browser

yarn test:e2e:dev

You can also run a single file

yarn test:e2e:dev __tests__/dashboard.test.js

Environments

In development we use a .env file to define required values. The list is defined in .env.example. These values are made available to the React code through the dotenv webpack plugin. In production, the values are set through Github secrets and made available to the React app through the webpack.EnvironmentPlugin. NB. Since TestCafe has access to the node, the values are available at process.env and do not need to be cloned.

Product Analytics

Pyrus has removed any analytics.

Dependency verification.

The integrity hash is generated by base64 encoding the sha512 binary digest:

  openssl dgst -binary -sha512 <dependency>.tgz | openssl base64

The best way to verify the integrity hash of a yarn.lock is to compare the integrity hashes. This may be done manually.

  1. Download tgz from yarnpkg host

  2. Generate integrity hash for it (sha512 base64)

  3. Unpackage tgz

  4. Download files from Github at relevant tag

  5. Diff the files from Github and the files from the unpackages tgz

      $ diff -r node_modules/<depedency> tmp/<downloaded_dependency>
    

pyrus's People

Contributors

409h avatar alepc253 avatar amacar avatar blurpesec avatar connorbryan avatar crptm avatar data-go avatar dternyak avatar e00dan avatar frederikbolding avatar greenkeeper[bot] avatar guillaumerx avatar james-prado avatar jyap808 avatar kantelabs avatar linfeilong avatar lubejmatej avatar mkrufky avatar mrluit avatar mrtenz avatar nessdan avatar nickmccurdy avatar peterzlodej avatar sharonmanrique avatar skubakdj avatar sonicrida avatar tayvano avatar vilsbole avatar wbobeirne avatar wtzb avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pyrus's Issues

Remove analytics

References to:

import { useAnalytics } from '@services/Analytics';

Dollar value calculations

Could leave it in and only calculate values for UBQ

Stretch goal would be to calculate dollar values for UBQ tokens as well.

Fork @mycrypto/wallets - Remove unused networks

Unused networks were removed in commit 3ca5442.

@mycrypto/wallets will need to also be forked to remove unused networks.

Build error:

ℹ 「wdm」: Compiled with warnings.
ERROR in /<SNIP>/src/database/data/networks.ts(21,14):
TS2740: Type '{ Ethereum: { id: NetworkId; name: string; baseUnitName: string; unit: Brand<string, "Ticker">; chainId: number; isCustom: false; color: string; blockExplorer: ExplorerConfig; tokenExplorer: ExplorerConfig; tokens: never[]; contracts: any; dPaths: { TREZOR: DerivationPath; LEDGER_NANO_S: DerivationPath; TREZOR_NEW: DerivationPath; LEDGER_NANO_S_NEW: DerivationPath; GRIDPLUS: DerivationPath; default: DerivationPath; }; gasPriceSettings: GasPrice; shouldEstimateGasPrice: true; supportsEIP1559: true; }; UBQ: { id: "UBQ"; name: string; unit: Brand<string, "Ticker">; chainId: number; isCustom: false; color: string; blockExplorer: ExplorerConfig; tokens: never[]; contracts: any; dPaths: { TREZOR: DerivationPath; LEDGER_NANO_S: DerivationPath; TREZOR_NEW: DerivationPath; LEDGER_NANO_S_NEW: DerivationPath; GRIDPLUS: DerivationPath; default: DerivationPath; }; gasPriceSettings: { min: number; max: number; initial: number; }; supportsEIP1559: true; }; }' is missing the following properties from type 'NetworkConfig': Ropsten, Kovan, Rinkeby, Goerli, and 33 more.
ERROR in /<SNIP>/src/database/data/nodes.ts(5,14):
TS2740: Type '{ Ethereum: ({ name: string; type: NodeType.RPC; service: string; url: string; } | { name: string; type: NodeType.ETHERSCAN; service: string; url: string; } | { name: string; type: NodeType.INFURA; service: string; url: string; } | { name: string; type: NodeType.POCKET; service: string; url: string; disableByDefault: false; })[]; UBQ: { name: string; type: NodeType.RPC; service: string; url: string; }[]; }' is missing the following properties from type '{ Ethereum: StaticNodeConfig[]; Ropsten: StaticNodeConfig[]; Kovan: StaticNodeConfig[]; Rinkeby: StaticNodeConfig[]; Goerli: StaticNodeConfig[]; ETC: StaticNodeConfig[]; RSK: StaticNodeConfig[]; AQUA: StaticNodeConfig[]; ARTIS_SIGMA1: StaticNodeConfig[]; ARTIS_TAU1: StaticNodeConfig[]; ATH: StaticNodeConfig[]; CLO: StaticNodeConfig[]; EGEM: StaticNodeConfig[]; ETI: StaticNodeConfig[]; ETHO: StaticNodeConfig[]; EXP: StaticNodeConfig[]; GO: StaticNodeConfig[]; GO_TESTNET: StaticNodeConfig[]; METADIUM: StaticNodeConfig[]; MIX: StaticNodeConfig[]; POA: StaticNodeConfig[]; RSK_TESTNET: StaticNodeConfig[]; THUNDERCORE: StaticNodeConfig[]; TOMO: StaticNodeConfig[]; UBQ: StaticNodeConfig[]; WEB: StaticNodeConfig[]; AUX: StaticNodeConfig[]; ASK: StaticNodeConfig[]; VOLTA: StaticNodeConfig[]; EnergyWebChain: StaticNodeConfig[]; MATIC: StaticNodeConfig[]; xDAI: StaticNodeConfig[]; SmartChain: StaticNodeConfig[]; SmartChainTestNetwork: StaticNodeConfig[]; Avalanche: StaticNodeConfig[]; AvalancheTestnet: StaticNodeConfig[]; EVRICE: StaticNodeConfig[]; Fantom: StaticNodeConfig[]; HECO: StaticNodeConfig[]; }': Ropsten, Kovan, Rinkeby, Goerli, and 33 more.

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.