Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HathorNetwork/hathor-wallet-mobile
Hathor official mobile wallet
https://github.com/HathorNetwork/hathor-wallet-mobile
android app cryptocurrency hathor ios react-native wallet
Last synced: 3 months ago
JSON representation
Hathor official mobile wallet
- Host: GitHub
- URL: https://github.com/HathorNetwork/hathor-wallet-mobile
- Owner: HathorNetwork
- License: mit
- Created: 2019-07-22T18:14:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-06T15:45:36.000Z (3 months ago)
- Last Synced: 2024-11-06T16:43:49.306Z (3 months ago)
- Topics: android, app, cryptocurrency, hathor, ios, react-native, wallet
- Language: JavaScript
- Homepage: https://hathor.network/
- Size: 9.93 MB
- Stars: 24
- Watchers: 13
- Forks: 23
- Open Issues: 82
-
Metadata Files:
- Readme: README.md
- Changelog: changelogs/unreleased/feat-create-token.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
- awesome-hathor - Hathor Wallet Mobile - [Official] Mobile Wallet (Wallets / Utils)
README
# Hathor Wallet Mobile
See the instructions to run on (Windows)[./WINDOWS.md].
## Install
`npm run setup`
### Check SES integrity
The SES lockdown file should match the commited sha256 sum
`sha256sum -c SHA256SUMS`
### Podfile install for iOS
#### Install cocoapods
Cocoapods is an iOS package manager. Sentry needs to add some native codes, so we must install an iOS native lib of Sentry.
Actually Apple already released a new package manager 'Swift Package Manager' but it's not supported for the React native version we use.
`sudo gem install cocoapods`
`cd ios && pod install`
### Sentry configuration
We use Sentry to allow users to send crash reports.
There is one file that must be created on ios and android folders. This file has a token used to upload some symbols to Sentry.
https://github.com/getsentry/sentry-react-native/issues/112#issuecomment-309980345This token is only used when releasing an app version, no need to have it for development.
So you must create `ios/sentry.properties` and `android/sentry.properties` files with the following content in both:
```
defaults.url=https://sentry.io/
defaults.org=ORG-NAME
defaults.project=PROJECT-NAME
auth.token=YOUR-SENTRY-TOKEN
```## Run
### iOS
First start the Metro bundler:
`npm start` or `npm run start:clean` to invalidate the cache before run.
Then press `i` to select the `run on iOS` option: this will build the app for iOS.
Alternatively, `npm run ios` to open on iOS simulator, or `npm run ios -- --simulator "iPhone 11"` to run it by name.
To list all available simulators, use `xcrun simctl list devices`.
#### Physical device
If you want to run in your physical device, you should first get its UDID by running the list of all possible devices:
```bash
xcrun xctrace list devices
```You should see an output like this:
```text
== Devices ==
Alex’s ... (490613AE-...)
Alex’s ... (16.3.1) (3198...)== Simulators ==
...
```The code inside the last parenteses is your UDID. Then, deploy the app to your device with:
```bash
npm run ios -- --udid=3198...
```> INFO: To be able to deploy to your physical device you can use `ios-deploy`, it can be downloaded from https://github.com/ios-control/ios-deploy:
> `ios-deploy --version`#### Required resource
The Firebase package uses the credentials of `GoogleService-Info.plist` to initialize the device in the FCM automatically. You should generate and install this resource in your Xcode environment. Read [Generating iOS credentials](https://rnfirebase.io/#generating-ios-credentials).
### Android
First start the Metro bundler:
`npm start`
Then press `a` to select the `run on Android` option: this will build the app for Android. If a physical device is connected, the application will start on it. Else, the latest Android Studio's Emulator will be the run target. Alternatively, use `npm run android` after having the Metro bundler started.
If you need to open the Dev Menu on Android Studio Emulator, use `Ctrl + M` or run `adb shell input keyevent 82` in a terminal.
Obs: To run on your device some configuration may need to be done (see [running on device](https://reactnative.dev/docs/running-on-device))
#### Required resource
The Firebase package uses the credentials of `google-services.json` to initialize the device in the FCM automatically. You should generate and install this resource in your Android Studio environment. Read [Generating Android credentials](https://rnfirebase.io/#generating-android-credentials).
### Debugging
The preferred way of debugging the Wallet Mobile is through the Flipper Desktop application, as the Chromium-based debugger has multiple conflics with the app's dependencies. It's also [being deprecated as of React Native v0.72](https://github.com/facebook/react-native/issues/38311#issuecomment-1731456182) due to incompatibilites with React Native's _New Architecture_.On MacOS environments Safari debugging will continue to be supported, and is a viable alternative.
To install Flipper, [download it on the official website](https://fbflipper.com/docs/getting-started/#installation) and follow its instructions to run the executable. For Linux users, issue 1058 on Flipper's repository may [help with troubleshooting](https://github.com/facebook/flipper/issues/1058#issuecomment-786827372).
### Run linter
`npm run lint`
## Translations
We use the `ttag` lib for i18n. Check out the docs [here](https://ttag.js.org/docs/quickstart.html).
Run `npm run locale-update-pot` to update the pot file (`locale/texts.pot`).
Run `msgmerge pt-br/texts.po texts.pot -o pt-br/texts.po` to merge a pot file with a po file.
Finally, run `make i18n` to compile all po files to json files.
## License
Code released under [the MIT license](https://github.com/HathorNetwork/hathor-wallet-mobile/blob/master/LICENSE).