Coder Social home page Coder Social logo

metamask / metamask-mobile Goto Github PK

View Code? Open in Web Editor NEW
2.0K 113.0 1.0K 282.6 MB

Mobile web browser providing access to websites that use the Ethereum blockchain

Home Page: https://metamask.io

License: Other

Java 0.39% JavaScript 44.00% Objective-C 0.13% Shell 0.48% Ruby 0.06% Starlark 0.02% Swift 0.12% TypeScript 53.92% Gherkin 0.72% CMake 0.01% C++ 0.09% Objective-C++ 0.06% HTML 0.01%
react-native web3 dapps-browser javascript ios android metamask

metamask-mobile's Introduction

MetaMask logo

MetaMask

CI CLA

MetaMask is a mobile wallet that provides easy access to websites that use the Ethereum blockchain.

For up to the minute news, follow our Twitter or Medium pages.

To learn how to develop MetaMask-compatible applications, visit our Developer Docs.

Documentation

Getting started

Environment setup

Before running the app, make sure your development environment has all the required tools. Several of these tools (ie Node and Ruby) may require specific versions in order to successfully build the app.

Setup your development environment

Building the app

Clone the project

git clone [email protected]:MetaMask/metamask-mobile.git && \
cd metamask-mobile

Install dependencies

yarn setup

Not the usual install command, this will run scripts and a lengthy postinstall flow

Running the app

Run Metro bundler

yarn watch

Like a local server for the app

Run on a iOS device

yarn start:ios

Run on an Android device

yarn start:android

metamask-mobile's People

Contributors

abretonc7s avatar andepande avatar andrepimenta avatar bitpshr avatar blackdevelopa avatar brianacnguyen avatar brunobar79 avatar cal-l avatar chrisleewilcox avatar cortisiko avatar dependabot[bot] avatar estebanmino avatar etdu avatar fatxx avatar gantunesr avatar github-actions[bot] avatar gudahtt avatar ibrahimtaveras00 avatar jpcloureiro avatar jpuri avatar legobeat avatar nicolasmassart avatar owencraston avatar rekmarks avatar rickycodes avatar samuelsalas avatar segun avatar sethkfman avatar tommasini avatar wachunei 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  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

metamask-mobile's Issues

Accounts & Settings

screen shot 2018-08-10 at 3 05 54 pm

Questions
Settings:

  1. In invision, can the top-right settings (etherscan, view address) get folded in to the accounts menu, and let the accounts "settings" (view seed, switch currency) live in the top-right? Basically: swap.
  2. Is a "download state logs" possible? What else would we include for help debugging? Open console?
  3. Custom RPCs part of MVP? Do we need any other features that will make it easy to develop dapps for a mobile browser? Let's stay the browser devs <3
  4. What type of deep linking (if any) do we need to handle?

Accounts:

  1. Hardware part of MVP? Trezor works on Android
  2. Import part of MVP? Prolly requires putting the key in plaintext which ain't great
  3. Need UI for account removal
  4. Can we make the "import" or other "add" options more obvious than a + ?
  5. What balance do we show under each account? ETH only? Tokens/collectibles too?

MVP feature set

This is a living doc, you are welcome to edit without permission.
Numbers correspond to the open questions in each section.

Onboarding

  • Create account flow
    • Terms
    • Create password
    • Seed Warning 1
    • Seed Display
    • Seed Confirm
    • Setup FaceID / Device PIN
    • Welcome 2
  • Import account flow
    • Terms
    • Seed Confirm
    • Setup FaceID / Device PIN
    • Welcome 2

Questions

  1. What can we do to make the seed experience good?
  2. Do we want a welcome / splash / tutorial after onboarding is complete?
  3. Should terms come later? What's best thing to begin onboarding with?
  4. Can we re-use terms from the extension? (Check with Legal)

Navigation

  • Bottom Nav 1
    • Dapps
    • Wallet
    • Transfer
  • Top Nav 2
    • Left: Accounts
    • Right: Settings 3

Questions

  1. Names for bottom three nav items? (Dapps, Explore, Web / Transfer, Send, etc)
  2. What about moving Accounts to the right? Mirrors extension, common design pattern
  3. Could account "Settings" (Etherscan, copy address) live in Accounts?

Dapps page

  • Browser functionality
    • Basics: back, forward, stop, reload
    • Historical URL bar
  • Two tabs 1
    • Explore (show icons / tiles of popular dapps) 2
    • Favorites (bookmarks) 3
  • Interacting with dapps
    • Confirm screen 4
    • Login / Connect screen 5

Questions

  1. Information hierarchy: URL bar at top, above "Explore" / "Favorites" tabs?
  2. How do we populate the explore page? Custom? Use State of the Dapps?
  3. Do we want browser extras, like bookmarks / favorites, history, QR scanning for URLs?
  4. What does the confirm screen (for signing tx or signing data) look like (when prompted by a dapp)?
  5. Are we supporting 1102 by default? Yes
  6. What does the "connect" or "login" UI look like?

Wallet page

  • Name, balance 5
  • Transfer button 1
    • Deposit screen 4
  • Tabs
    • Tokens 2
    • Transactions 3
    • Collectibles

Questions

  1. Maybe Send/Deposit buttons (as in the extension) makes sense - no idea what onboarding / first ETH numbers are like, but probably good to spoon-feed here.
  2. Does MVP have automatic token detection?
  3. Not in invision but we should include
  4. Should tapping a transaction just go to Etherscan? Could build tx detail view after MVP
  5. What is the deposit experience? Coinbase, shapeshift, possibly Simplex or Coinmama?
  6. Where is my address?
  7. Do we want balance showing on the main page? Perhaps want to add a setting to hide the user's balance by default?

Transfer page

  • Send
    • From
    • To 1
    • Token 2
    • Amount
    • Transaction Fee 3
  • Receive 6

Questions

  1. Should QR scanner part of MVP?
  2. As with the extension designs, think we need a better label
  3. "Advanced" leads to the current production options?
  4. How does this screen look with the keyboard / number pad popped up?
  5. Did we consider a one-by-one screen? This is the way most other dapp browsers have implemented, and there's some evidence that sequential forms do much better on mobile.
  6. Consider making the QR foxy/cute? Would be fun to share these.
  7. Should "Receive" also a link to the Coinbase / Deposit flow?

Security

  • FaceID / PIN when app is foregrounded
  • Blank screen when switching between apps

Questions

  1. How are we handling the user's key? Secure enclave?

Accounts

  • Create from same seed
  • Import 1
  • Hardware 1

Questions

  1. Hardware part of MVP? Trezor works on Android
  2. Import part of MVP? Prolly requires putting the key in plaintext which ain't great
  3. Account removal?
  4. Animation - tray vs. slide over? Tray makes logical sense, familiar from Google, etc.
  5. Can we make the "import" or other "add" options more obvious than a + ?
  6. What balance do we show under each account? ETH only? Tokens/collectibles too?

Settings / Other

  • Settings 1: Top Right 1
  • Settings 2: In Accounts tray 1
    • Network toggle 2
    • Currency conversion
    • New RPC URL 3
    • State Logs 4
    • Reveal Seed

Questions

  1. In invision, can the top-right settings (etherscan, view address) get folded in to the accounts menu, and let the accounts "settings" (view seed, switch currency) live in the top-right? Basically: swap.
  2. ~Do we support testnets? ~ Yes.
  3. Part of MVP?
  4. Is a "download state logs" possible? What else would we include for help debugging? Open console?
  5. Do we need any other features that will make it easy to develop dapps for a mobile browser? Let's stay the browser devs <3
  6. What type of deep linking (if any) do we need to handle?

Differentiation

  • Mobile signing for desktop dapps
  • Generate payment URLs on extension, submit from the phone
  • Gnosis SAFE support
  • By default, could use the same seed on desktop & mobile
    • do we need a feature to mitigate nonce issues?
  • save encrypted version of seed phrase in phone keychain?
  • save encrypted version of seed phrase in desktop extension?

Set global currency

and make sure all the conversions are using it.

Once it's done make sure we're doing it everywhere by making a project wide search for USD and $

Investigate GABA module format

If GABA isn't compiled to CommonJS, the Metro bundler blows up. We should look into this, as GABA should ideally be imported into this project as ES. This is a Metro-specific issue.

Encrypt keychain data

react-native-keychain already uses the android keystore system which is good enough but apple's keychain has been hacked in the pass so we shouldn't store plain text.

One potenital solution is to use the encryptor (which uses AES internally) and generate a key based on the device id

Send screen

  • Should QR scanner be part of MVP?
  • As with the extension designs, think we need a better label for the
  • "Advanced" leads to the current production options (number inputs for price and limit)?
  • How does this screen look with the keyboard / number pad popped up?

Navigation

Navigation

  • Bottom Nav 1
    • Dapps
    • Wallet
    • Transfer
  • Top Nav 2
    • Left: Accounts
    • Right: Settings 3

Questions

  1. Names for bottom three nav items? (Dapps, Explore, Web / Transfer, Send, etc)
  2. What about moving Accounts to the right? Mirrors extension, common design pattern
  3. Could account "Settings" (Etherscan, copy address) live in Accounts?

Transfer Flow

screen shot 2018-08-10 at 3 04 22 pm

Questions

  1. Should QR scanner be part of MVP?
  2. "Advanced" leads to the current production options?
  3. How does this screen look with the keyboard / number pad popped up?
  4. Did we consider a one-by-one screen? This is the way most other dapp browsers have implemented, and there's some evidence that sequential forms do better on mobile.
  5. Consider making the QR foxy/cute? Would be fun to share these.
  6. Should "Receive" also a link to the Coinbase / Deposit flow?

Implement loading spinner during page loads

Since we switched from WebView to WKWebView, we lost the built-in loading spinner between page loads. We should re-enable one, or if that's not possible, replace the "refresh" icon with a loading spinner during page loads.

Explore / Browse Flow

screen shot 2018-08-10 at 3 09 04 pm

Questions

  1. Information hierarchy: URL bar at top, above "Explore" / "Favorites" tabs?
  2. How do we populate the explore page? Custom? Use State of the Dapps?
  3. Do we want browser extras, like bookmarks / favorites, history, QR scanning for URLs?
  4. What does the confirm screen (for signing tx or signing data) look like (when prompted by a dapp)?
  5. What does the "connect" or "login" UI look like?

Improve Android injection logic

Android WebViews are safely polyfilled during startup, but they rely on a timeout to avoid being overwritten by the bridge once it loads. We need to be able to polyfill and let users call postMessage immediately, not after an arbitrary timeout. We should look to monkey-patch the underlying native code like we do for iOS.

Setup fastlane

We will need it to generate appstore / playstore builds and release betas

Fix Browser code coverage

The Browser component executes an asynchronous filesystem read in its componentDidMount method. This operation (or any other asynchronous operation) breaks the Istanbul code coverage produced by Jest and can't be ignored using any flavor of ignore syntax. If this single statement is commented out manually, 100% code coverage is achieved, hinting at a transpilation error.

Ideally, we should find a way to ignore this line or work around this issue to achieve 100% coverage.

Improve CI workflow

We need to be generating appstore / playstore builds on every PR so we don't get surprises at the time of releasing.

LOTS of things breaks while building in release mode and we want to know as early as possible

Onboarding Flow

Onboarding

  • Create account flow
    • Terms
    • Create password
    • Seed Warning 2
    • Seed Display
    • Seed Confirm
    • Setup FaceID / Device PIN
    • Welcome 3
  • Import account flow
    • Terms
    • Seed Confirm
    • Setup FaceID / Device PIN
    • Welcome

Open Questions

  1. What's the order?
  2. Should we force the user to do seed phrase on setup?
  3. What can we do to make the seed experience good? Anything with extension?
  4. Do we want a welcome / splash / tutorial after onboarding is complete?
  5. Can we re-use terms from the extension? (Check with Legal)
  6. Do we want to encourage / discourage using the same seed as extension? (Nonce tracking is hard)

Wallet Flow

  • Name, balance 5
  • Transfer button 1
    • Deposit screen 4
  • Tabs
    • Tokens 2
    • Transactions 3
    • Collectibles

screen shot 2018-08-10 at 3 07 53 pm

Questions

  1. Maybe Send/Deposit buttons (as in the extension) makes sense - no idea what onboarding / first ETH numbers are like, but probably good to spoon-feed here.
  2. Does MVP have automatic token detection?
  3. One single transaction list vs. per-asset transaction lists?
  4. Should tapping a transaction just go to Etherscan? Could build tx detail view after MVP
  5. What is the deposit experience? Coinbase, shapeshift, possibly Simplex or Coinmama?
  6. Where is my address?
  7. Do we want balance showing on the main page? Perhaps want to add a setting to hide the user's balance by default?

Fix aes-js

The build output of the version of aes-js we use produces invalid JavaScript that breaks the Metro bundler. For now, we're monkey-patching this as part of our postinstall script, but we should probably update the dependency to make this nicer.

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.