Git Product home page Git Product logo

whisperwallet's Introduction

WhisperWallet

How to start

Tested Dev Environment

$ node --version
$ v17.6.0
$ npm --version
$ 8.5.1

Development Command

Local iOS Dev: npm run ios Local Android Dev: npm run android

Run Locally

Clone the project

$ git clone https://github.com/aguycalled/WhisperWallet

Go to the project directory

$ cd WhisperWallet

Install dependencies

$ npm install
$ cd ios
$ pod install

Back to root and develop!

$ cd ..
$ npm run iOS

Happy Coding 🧑🏽‍💻

Development

Screen Size

We are currently using @tsejerome/react-native-size-matters.
The suggested default dimension screen size for UI development is 390 x 844.
The devices below are the suggested iPhone Simulator that matches such requirements:

  • iPhone 12
  • iPhone 12 Pro
  • iPhone 13
  • iPhone 13 Pro

References: https://www.ios-resolution.com/

Potential Fixes

Android tapping backdrop of bottom tab does not close the bottom tab

References: Issue 65 Add gestureHandlerRootHOC to the page that the bottom tab doesn't work

Duplicate interface definition for class 'RCTModuleRegistry'

Solution: https://github.com/LinusU/react-native-get-random-values/pull/33/commits/30267ff4e9b5e93136cc935cf0370d8a09dd3aee

Command PhaseScriptExecution failed with a nonzero exit code

Solution 1:
Make sure your xcode npm version is using the version you set as default in your bash/zsh. e.g. if you have set a nvm default alias, you will need to check if it is the same. One quick fix is to run nvm unalias default

Solution 2:
Change from your node_modules/react-native/find-node.sh https://github.com/facebook/react-native/commit/35bcf934b186e581d100d43e563044300759557f

whisperwallet's People

Contributors

tsejerome avatar paulayo93 avatar ildaneta avatar aguycalled avatar

Stargazers

 avatar  avatar UmaR Aamer avatar  avatar  avatar

Watchers

 avatar  avatar

whisperwallet's Issues

Fix QR code processing

Sometimes Navcoin addresses are encoded in a QR code with the navcoin: prefix

Example: navcoin:NQuwuaonBSft2VV83owJ9XE3twgWtfpoFU instead of NQuwuaonBSft2VV83owJ9XE3twgWtfpoFU

This is a valid format which should be supported when scanning a QR code.

Check react-native-keychain implementation

Doing some tests in a real iOS device, I realised it is not checking my biometrics (Face ID) anymore when opening a wallet or sending a transaction.

Need to verify implementation is correct in all cases (Face ID not available, Touch ID, etc.).

Haven't had the chance to test this in Android.

First wallet creation does not trigger update of wallet list

When the app is newly installed and a wallet is created for the first time, going back to the main menu does not show the option Open Wallet because walletsList is not being correctly updated. Closing and opening the app fixes this.

From WalletProvider:

      walletFile.on('loaded', async () => {
....
        njs.wallet.WalletFile.ListWallets().then(setWalletsList);
....
      });

But navigation/Intro sees walletsList empty and therefor shows no Open Wallet option.

Buttons styling

Buttons of the Init screen:

image

have a different text colour than the rest of the Buttons of the app:

image

It should use the darker always.

Also, when the buttons are tapped, the background colour changes to a blue which does not really match. Need to decide for a better colour. (Open to suggestions)

Simulator.Screen.Recording.-.iPhone.8.-.2022-04-20.at.21.17.24.mp4

Importing wallet does not complete

Going through the steps of Import Wallet creates the wallet, but does not move to the last step of the wizard. onCreate of createWallet is not triggered or there's a bug there.

Create wallet info screen accessible from settings

Create a WalletInfo screen accessible from settings which shows wallet information like:

  • Whisper Wallet version
  • Navcoin-js version
  • wallet name
  • connected server
  • block height (accessible through wallet.lastBlock)
  • network

Improve visibility of connecting state

When the wallet is connecting to the network, only the top left dot turns orange. Try to find a better way to show the user the state, one idea could be:

Add option to resync a wallet when opening

Add an option in the Open Wallet section to choose whether to clear the transaction history and resync or not.

This is accomplished by setting zapwallettxes to true|false in the function createWallet from the WalletProvider.

treasure_map-NAV

Show notification when address is copied

When the Tap to copy is tapped, a notification should be shown indicating that the address has been copied.

Also, consider to extend the tap area to the QR code and Address label.

P2pPool refactor

Right now, the P2pPool object is initialised in App.tsx. It should be done inside of the WalletProvider each time a wallet is created/opened, and loading the nodes specific from the wallet network.

Splash screen has a different background than app

Simulator.Screen.Recording.-.iPhone.8.-.2022-04-20.at.21.13.50.mp4

The splash screen is slightly lighter. Should have the same background as the main app.

Haven't checked Android, but needs to also have the same color.

Amount field does not remove the initial 0

On a new SendTo screen, when the user taps and inputs an amount, the initial 0 is not removed:

image

The amount should be parsed, and in this example, show 1 instead of 01

Trying to move NAV to xNAV gives an error

It took longer than expected to see the balance on the screen below, around 4-5 minutes, which I expected sooner as the transaction should be confirmed.

When moving to xNAV having the balance now visible, I get the error below
IMG_1240

Option to show fiat value

User should be able to tap on the balance circle to switch between NAV or FIAT value.

Wallet can fetch the price from https://api.coingecko.com/api/v3/simple/price?ids=nav-coin&vs_currencies=CURRENCY, with currency being one of:

                    "BTC"
                    "EUR"
                    "USD"
                    "ARS"
                    "AUD"
                    "BRL"
                    "CAD"
                    "CHF"
                    "CLP"
                    "CZK"
                    "DKK"
                    "GBP"
                    "HKD"
                    "HUF"
                    "IDR"
                    "ILS"
                    "INR"
                    "JPY"
                    "KRW"
                    "MXN"
                    "MYR"
                    "NOK"
                    "NZD"
                    "PHP"
                    "PKR"
                    "PLN"
                    "RUB"
                    "SEK"
                    "SGD"
                    "THB"
                    "TRY"
                    "TWD"
                    "ZAR"

User should be able to set the currency through the Settings screen.

Add menu to wallet screen

Tapping the menu button on the wallet screen returns to the main screen.

Instead it should show a menu (side menu would be OK) with the following options:

  • Show mnemonic:
const {read} = useKeychain();
const {wallet, walletName} = useWallet();

read(walletName).then((password: string) => {
const mnemonic: string = await wallet.db.GetMasterKey(
      "mnemonic",
      password
    );
});
  • Configure use of biometrics after locking the app
  const [lockAfterBackground, setLockAfterBackground] = useAsyncStorage(
    'lockAfterBackground',
    'false',
  );
  • Set up servers to connect. Should allow to set a list of nodes for both testnet and mainnet, stored locally. Creates an object with the following structure:
testnet: [
    {
      host: "electrum-testnet2.nav.community",
      port: 40004,
      proto: "wss",
    },
    {
      host: "electrum-testnet.nav.community",
      port: 40004,
      proto: "wss",
    },
  ],
  mainnet: [
    {
      host: "electrum4.nav.community",
      port: 40004,
      proto: "wss",
    },
    {
      host: "electrum.nextwallet.org",
      port: 40004,
      proto: "wss",
    },
    {
      host: "electrum2.nav.community",
      port: 40004,
      proto: "wss",
    },
    {
      host: "electrum3.nav.community",
      port: 40004,
      proto: "wss",
    },
    {
      host: "electrum.nav.community",
      port: 40004,
      proto: "wss",
    },
  ]

which is then passed with the nodes property of WalletFile.Load() in the WalletProvider.

      walletFile.Load({
        bootstrap: njs.wallet.xNavBootstrap,
        nodes
      });

If nodes == undefined, then it will use the default list of nodes.

  • Remove wallet: accomplished calling njs.wallet.WalletFile.RemoveWallet(name), needs close the wallet first.
  • Close wallet and back to main screen

Adding sync status to <BalanceCard/>

On Wallet page, during syncing, the currency amount at the wallet are shown as 0.00nav, which might confuse the users.
Details: #29 (comment)

As discussed with @aguycalled, we would add a Connection_Stats_Enum text to each <BalanceCard/> based on the connection status provided by the WalletProvider.
image

Centralize styles in one file.

At the moment many components defines their own styles variable on its own file, creating duplicities.

Condense them in one file.

Logo / Splash screen

Logo, Icon and Splash screen need to be updated.

Pending to receive work from graphic designer.

react-native-mcl polyfill needs manual intervention

react-native-mcl is a polyfill for @aguycalled/mcl-wasm, which is used by @aguycalled/bitcore-lib.

When doing npm i, there exist two copies of the module one in node_modules and the second in node_modules/@aguycalled/bitcore-lib/node_modules.

Seems like pod install setups the one in node_modules but @aguycalled/bitcore-lib loads the one in node_modules/@aguycalled/bitcore-lib/node_modules, making the app crash on the iOS simulator, requiring to manually delete the folder node_modules/@aguycalled/bitcore-lib/node_modules to be able to launch the app.

This is not critical, but would be nice if it can get fixed, maybe adding a post install rule in package.json.

Android crashes on simulator

npx react-native run-android crashes:

Screenshot 2022-03-15 at 19 26 47

Could not find references of this crash online. Might be related to some of the libraries used in the module. Haven't tested on a real device.

Android swipe back gesture not working

Swiping back does not move to the previous page.

Another bug, when the back button on the main wallet page is pushed, it goes back to the open/import/create wizard

Reduce package size

Running npx cost-of-modules:

Calculating...


┌───────────────────────────────────────────┬────────────┬─────────┐
│ name                                      │ children   │ size    │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-mcl                          │ 0          │ 275.83M │
├───────────────────────────────────────────┼────────────┼─────────┤
│ navcoin-js                                │ 0          │ 68.15M  │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-reanimated                   │ 0          │ 34.40M  │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native                              │ 0          │ 33.99M  │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-gesture-handler              │ 0          │ 8.29M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ indexeddbshim                             │ 0          │ 8.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-spring                              │ 0          │ 7.48M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-screens                      │ 0          │ 6.14M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-camera                       │ 0          │ 5.61M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-svg                          │ 0          │ 5.47M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-circular-progress            │ 0          │ 3.23M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-pager-view                   │ 0          │ 2.19M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ expo                                      │ 0          │ 2.16M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ expo-local-authentication                 │ 0          │ 1.92M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-keychain                     │ 0          │ 1.78M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-device-info                  │ 0          │ 1.78M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @react-native-async-storage/async-storage │ 0          │ 1.41M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @react-native-picker/picker               │ 0          │ 1.33M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-sqlite-2                     │ 0          │ 1.31M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ node-libs-react-native                    │ 0          │ 1.31M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @ui-kitten/eva-icons                      │ 0          │ 1.27M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-permissions                  │ 0          │ 1.25M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-tcp-socket                   │ 0          │ 1.24M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @gorhom/bottom-sheet                      │ 0          │ 1.17M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-safe-area-context            │ 0          │ 1.14M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-bootsplash                   │ 0          │ 1.08M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ expo-sqlite                               │ 0          │ 0.93M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ ajv                                       │ 1          │ 0.89M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @ui-kitten/components                     │ 0          │ 0.85M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-encrypted-storage            │ 0          │ 0.84M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @react-native-community/clipboard         │ 0          │ 0.84M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-os                           │ 0          │ 0.83M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-web-refresh-control          │ 0          │ 0.81M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-background-timer             │ 0          │ 0.75M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-randombytes                  │ 0          │ 0.74M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-redash                       │ 0          │ 0.65M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @arelstone/react-native-swipe-button      │ 0          │ 0.64M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ dayjs                                     │ 0          │ 0.60M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @aguycalled/bitcore-p2p                   │ 0          │ 0.58M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-level-fs                     │ 0          │ 0.55M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ uri-js                                    │ 1          │ 0.48M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-big-list                     │ 0          │ 0.45M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ sshpk                                     │ 1          │ 0.43M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ request                                   │ 1          │ 0.43M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @react-navigation/native                  │ 0          │ 0.38M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ numeral                                   │ 0          │ 0.32M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @eva-design/eva                           │ 0          │ 0.30M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react                                     │ 0          │ 0.28M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ buffer                                    │ 0          │ 0.25M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-qrcode-scanner               │ 0          │ 0.24M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @react-navigation/native-stack            │ 0          │ 0.23M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ bcrypt-pbkdf                              │ 1          │ 0.19M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @aguycalled/bitcore-mnemonic              │ 0          │ 0.18M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-qrcode-svg                   │ 0          │ 0.14M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ browserify-zlib                           │ 0          │ 0.13M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-toast-notifications          │ 0          │ 0.13M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ qs                                        │ 1          │ 0.12M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ url                                       │ 0          │ 0.09M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ readable-stream                           │ 0          │ 0.08M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ assert                                    │ 0          │ 0.08M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ dashdash                                  │ 1          │ 0.08M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ ecc-jsbn                                  │ 1          │ 0.07M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ verror                                    │ 1          │ 0.06M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-keyboard-aware-scroll-view   │ 0          │ 0.05M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ memoizee                                  │ 0          │ 0.05M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ http-signature                            │ 1          │ 0.05M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-progress                     │ 0          │ 0.04M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ electrum-mnemonic                         │ 0          │ 0.04M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ fast-text-encoding                        │ 0          │ 0.03M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ jsprim                                    │ 1          │ 0.03M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ asynckit                                  │ 1          │ 0.03M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ use-between                               │ 0          │ 0.03M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ json-schema                               │ 1          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ extend                                    │ 1          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ extsprintf                                │ 1          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ punycode                                  │ 0          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ aws4                                      │ 1          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ util                                      │ 0          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ vm-browserify                             │ 0          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ timers-browserify                         │ 0          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ asn1                                      │ 1          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ json-schema-traverse                      │ 1          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ fast-json-stable-stringify                │ 1          │ 0.02M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ dns.js                                    │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ @tradle/react-native-http                 │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ har-schema                                │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-crypto                       │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ aws-sign2                                 │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ caseless                                  │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ forever-agent                             │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ isstream                                  │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ oauth-sign                                │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ is-valid-hostname                         │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ json-stringify-safe                       │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ react-native-dialog-input                 │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ assert-plus                               │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ combined-stream                           │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ performance-now                           │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ string_decoder                            │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ har-validator                             │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ delayed-stream                            │ 1          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ path-browserify                           │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ stream-browserify                         │ 0          │ 0.01M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ getpass                                   │ 1          │ 0.00M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ https-browserify                          │ 0          │ 0.00M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ net                                       │ 0          │ 0.00M   │
├───────────────────────────────────────────┼────────────┼─────────┤
│ 106 modules                               │ 1 children │ 495.36M │
└───────────────────────────────────────────┴────────────┴─────────┘

Both react-native-mcl and navcoin-js need to get their size reduced.

Fix background color (bottomSheet and maybe overall app)

When dragging up a BottomSheet the background shows white.

Simulator.Screen.Recording.-.iPhone.13.-.2022-04-21.at.09.07.51.mp4

Another user also reported white flashes appear between screen changes, which makes me think maybe the app background is set to white instead of #1F2933.

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.