当前位置: 首页 > 软件库 > Web3 > 开源货币/比特币 >

blockchain-wallet-v4-frontend

Blockchain.com's Wallet built with React & Redux
授权协议 AGPL-3.0 License
开发语言 Python
所属分类 Web3、 开源货币/比特币
软件类型 开源软件
地区 不详
投 递 者 关翰
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Codechecks

Blockchain.com Wallet

Be Your Own Bank at login.blockchain.com.Please contact support if you have any issues using the wallet.

About

This repo contains the three codebases/packages listed below.

Packages

Local Development

  1. Ensure Node version >= 14.16 is installed. Using NVM is recommended.
  2. From the project root, run the following command to install dependencies: ./setup.sh.
  3. Start the application in development mode: yarn start
  4. The frontend application will now be accessible via browser at localhost:8080

If you require the application to run locally over HTTPS, follow the instructions here.You can disable SSL by setting the DISABLE_SSL env param to true with any start command. (e.g. DISABLE_SSL=true yarn start:staging)

Windows Support

To ensure proper support for Windows, please take the following actions before running the above setup instructions.

  1. Open a Powershell window with rights elevated to an Administrator.
  2. Run npm install -g windows-build-tools. This will install Python 2.7 and Visual C++ Build Tools which are required to compile some native Node modules.
  3. Ensure Python has been added to your environment variables by opening a cmd prompt and typing python. If you get a CommandNotFoundException message, add the folder %USERPROFILE%\.windows-build-tools\python27 to your environment variables.

Tips & Useful Commands

  1. To completely remove all dependencies and artifacts run yarn clean
  2. To add/remove an NPM package run yarn add or yarn remove in the package folder. After installing or uninstalling a NPM package, run yarn in the root folder to re-init the project
  3. All development specific dependencies should be installed as a dev-dependency in the top level package.json via yarn i --save-dev [package-name]
  4. All application specific dependencies should be installed in the specific packages package.json via yarn i --save [package-name]

Running Environments Locally

The frontend application can be ran locally with different build configurations found in config/env. The following commands are available:

  • yarn start Runs the application with the development.js configuration file
  • yarn start:dev Runs the application with the development.js configuration file
  • yarn start:staging Runs the application with the staging.js configuration file
  • yarn start:prod Runs the application with the production.js configuration file
  • yarn run:prod Runs the application mimicking the production environment entirely (i.e. code is bundled and minified, HMR is disabled,Express server is used (./server.js) and the production.js configuration file is loaded)

Notes:

  • Developers will need to manually create the development.js and staging.js files
  • Custom application runtimes are possible by modifying the corresponding environment files found in the config/env folder

Useful Chrome Extensions

Release Process

Prerequisites

To be able to create a release follow these steps starting with "Obtain a personal access token...":https://github.com/release-it/release-it#github-releases

GITHUB_TOKEN should be saved as RELEASE_IT_TOKEN instead in your bash_profile or wherever you keep env variables

You'll need git changelog to generate the history since the last release:npm install -g changelog

Release Steps

  1. From the tip of the development branch, run yarn release
  2. Answer the questions prompted via CLI, accepting the defaults for each
  3. Once completed, this will create a new tag which will trigger a builds
  4. Once builds have finished, deploy the images to desired environments
  5. Test and verify the latest changes in desired environments
  6. Create PR to merge the HEAD of development into master
  7. Merge PR to master so that master always reflects what is currently in production

Code Quality

  • yarn vet Runs Prettier, lint JS, lint CSS and finally all unit tests

Linting

We follow the rules outlined by the Javascript Standard Style as well as a few React specific rules.

Code linting is handled by ESLint. The following commands are available:

These IDE plugins/packages assist with complying with these lint rules while developing:

Prettier

We follow all standard rules that are provided by Prettier. The following commands are available:

It is recommended to setup a Prettier plugin for your IDE plugins/packages that will automatically prettify your files on save.

When installing the plugin for VS Code make sure you are on v3.7.0 or lower

Unit Tests

Testing is done via Jest and Enzyme.

Running Tests

Note: if you see errors that Jest cannot resolve package imports, you may need to run yarn test before testing specific packages (eg, yarn test:frontend)

Running Tests via Watch

Debugging Tests

To enable debugging for unit tests via the Chrome browser, run the following commands:

After running one of the above commands, Node will wait for a debugger to attach before starting the tests.To attach, simply open your browser and go to chrome://inspect and click on "Open Dedicated DevTools for Node",which will give you a list of available node instances you can connect to. Click on the address displayed in the terminal(usually localhost:9229) and you will be able to debug tests using Chrome's DevTools.

Updating Snapshot Tests

We are snapshot testing UI some components. Here are the commands to update them when necessary:

Code Coverage

To generate code coverage reports via Istanbul, the following commands are available:

Depending upon which coverage report was ran, the results can be found in the following directories:

  • coverage/index.html
  • coverage/blockchain-info-components/index.html
  • coverage/blockchain-wallet-v4/index.html
  • coverage/blockchain-wallet-v4-frontend/index.htmlSimply open the index.html file in your browser to view.

TypeScript

TypeScript is supported and should be used when adding new code. It's also recommended to replace legacy JS with TS when time allows.

TS Coverage

We are using Codechecks and Typecov for coverage reporting. Coverage is automatically analyzed for PRs and the following command is available.

  • yarn codechecks

Code Bundle Analysis/Reports

To visualize and interact with the tree of the production code bundles files:

  • yarn analyzeOnce completed, a browser will automatically open with the results.

Storybook

Storybook is used by the blockchain-info-components and blockchain-wallet-v4-frontend packages to interactively view, develop and test components.The following commands are available:

  • storybook:build-wallet: Builds the static storybook assets for wallet specific components (if base components is running locally, storybook will put wallet and base components into the same storybook UI)
  • storybook:build-base: Builds the static storybook assets for base shared components
  • storybook:serve-wallet Builds storybook assets and then serves them locally at localhost:6006
  • storybook:serve-base Builds storybook assets and then serves them locally at localhost:6007
  • storybook:deploy-wallet Builds storybook assets and then serves them to github pages. You will probably need to run cd ./packages/blockchain-info-components && git remote add origin git@github.com:blockchain/blockchain-wallet-v4-frontend.git first.
  • storybook:deploy-base Builds storybook assets and then serves them to github pages. You will probably need to run cd ./packages/blockchain-info-components && git remote add origin git@github.com:blockchain/blockchain-wallet-v4-frontend.git first.

If the deploy begins to fail, deleting the static build file before redeploy will likely help.

Contribute

Please review to the Wiki

Security

Security issues can be reported to us in the following venues:

  • 坚固性?! 先给出源码 // solidity pragma solidity ^0.4.23; contract Trans{ string flag; mapping(address => uint256) balances; constructor () public { } function getBalance() public

  • 论文翻译 201802 26-28 Evaluating Blockchains for IoT P5 R17 这是一篇关于区块链和物联网的论文,第一次写,先适应一下这个文本编辑器。第一天比较粗糙,只学会了标题,以后会慢慢自己画图,制表等…… Abstract: As proof-of-work blockchains are inherently energy greedy and offer

  • rem add.bat @echo off &setlocal enabledelayedexpansion color 0a & title autoAddData set /a namelen=10 set /a strlen=62 set /a number=100 set str=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01

  • 今天在espace里面看到有人问官员wallet的使用,于是就自己下来研究了一下,并进行了验证可以正常使用,学习记忆录一下,以后用的时候可以马来拿来看。 wallet的作用哪就是无密码登陆oracle,相当于一个密钥,并且对于脚本登陆数据库来操作是特别有用的,并且存放起来也更加的完全,便于修改! 下来在客户端创建一个wallet: 用法: D:\app\Administrator\product\

 相关资料
  • Here we describe the data structures in the Tendermint blockchain and the rules for validating them. Data Structures The Tendermint blockchains consists of a short list of basic data types: Block Head

  • A simple implementation of blockchain This project aims to create a simple implementation of blockchain concept and demostrate it in a user friendly way. Design Concept This project consists of two ma

  • PLEASE NOTE WE HAVE DETECTED SOME FAKE COPAY WALLETS ON THE GOOGLE PLAY STORE FOR ANDROID, PLEASE BE SURE TO INSTALL "BITPAY WALLET" ONLY FROM THE APP STORES. APP's DEVELOPER SHOULD BE "BITPAY INC" ON

  • The Blockchain Reactor's high level responsibility is to enable peers who are far behind the current state of the consensus to quickly catch up by downloading many blocks in parallel, verifying their

  • Truffle 是以太坊的开发环境,测试框架和资产管道,可以让以太坊开发人员开发更轻松。 特性 内置智能合约编译、链接、部署和二进制管理 使用Mocha和Chai进行自动合同测试 可配置的构建管道,支持自定义构建过程 可编写脚本的部署和迁移框架 用于部署到许多公共和专用网络的网络管理 交互式控制台,用于直接合同通 在开发过程中即时重建资产 在Truffle环境中执行脚本的外部脚本运行器 安装 $

  • Stacks 2.0 Reference implementation of the Stacks blockchain in Rust. Stacks 2.0 is a layer-1 blockchain that connects to Bitcoin for security and enables decentralized apps and predictable smart cont