Commit Graph

217 Commits

Author SHA1 Message Date
Gheorghe Pinzaru 793579885a
Add universal QR scanner via common router
Rename events

Add router to handle all links

Use router in add new chat

Unify universal link and universal qr with router

Add icon for universal scanner

Update tests

Now routing is tested in routing PR

lint

Cleanup

QA fixes

Scan own profile

Handle more EIP

Fix wallet scanner

Fix stack for view profile in UL

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-08-11 10:24:15 +03:00
andrey 2d8b0107e3
replace camera library
Signed-off-by: andrey <motor4ik@gmail.com>
2020-08-10 17:54:14 +02:00
Jakub Sokołowski 68722340c9
nix: add missing args to gcroots.sh script
This should fix the following error showing up on MacOS:
```
error: assertion ((__lessThan  0)  ((builtins).stringLength  watchmanSockPath))
failed at /Users/jenkins/repos/status-react/nix/mobile/android/watchman.nix:8:9
```
Which was caused by flags like `--argstr` not being passed.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 15:12:37 +02:00
Jakub Sokołowski f904d7b543
nix: add --console=plain to gradle call
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 14:34:07 +02:00
Jakub Sokołowski 2161192e76
nix: simplify build of gomobile
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-08-06 14:28:15 +02:00
Gheorghe Pinzaru 3c42360b30
Add referral program under feature flag
Add acquisition backend methods

Init referrals sharing UI

Add invite on home screen

Use i18n for strings

Lint

Update status go

Pull acquisition contract to get SNT amount

Use new invite component

f pulling

go

Use screen instead of bottom sheet

Handle android install referrer

Post referrer to backend if present

go go

Add async storage for referral decisions

Update with the stage backend

Update contract methods

Modal

UI

Full handling of advertiser type

UI

test

UI

Handle with universal link

Allow multiple acquisition per installation

Fix android bottom sheet

Do not call service if no click-id received

Disable invite in release

Parse query params for referrer

Adapt UI changes

Add push notification

update deps

Mock react-native-push-notification

Request push notifications permission on press accept

Store transaction to local storage and load it back on login

Separate acquisition into smaller ns

Add chat invite

Get referrer only on first install

fix string

Fix firebase crash

Handle outdate click-id

Cleanup business logic

Update contract

Revert pn

Minor update to advertiser modal copy

OLD -  Welcome to Status! Here is some crypto to get you started
NEW - Here’s some crypto to get you started! Use it to get stickers, an ENS name and try dapps

OLD - By accepting you agree to the starter pack
NEW - By accepting you agree to the referral program

upgrade status-go

Add mainnet

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-08-03 15:25:34 +03:00
Jakub Sokołowski 933c0f8f8c
nix: allow XCode versions 11.5 and higher
This is kinda hacky, but is simple enough since the version check uses grep.

For details see:
https://github.com/status-im/nixpkgs/blob/status-mods/pkgs/development/mobile/xcodeenv/compose-xcodewrapper.nix

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-31 13:04:47 +02:00
Jakub Sokołowski 788d0d5cc5
add ANDROID_APK_SIGNED to make unsigned builds for F-Droid
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:38 +02:00
Jakub Sokołowski 517a1be27c
nix: disable Gradle daemon for builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:31 +02:00
Jakub Sokołowski 8bb99743a7
nix: set GRADLE_USER_HOME to a temp dir
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:31 +02:00
Jakub Sokołowski 0be5f5d8d0
nix: enable build-use-sandbox for Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-29 10:12:30 +02:00
tbenr 86700f2b5c
audio messages
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2020-07-29 10:09:31 +02:00
Gheorghe Pinzaru 0f07f3eecb
Update image resizer
Do not resize images in camera roll

request permission on camera roll

fix images e2e

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-07-20 11:54:31 +03:00
Jakub Sokołowski 9ce786c9fb
nix: fix conditional that selects .env.e2e for ABI=x86 builds
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-15 16:37:45 +02:00
Jakub Sokołowski 84286782f6
bump status-react-jenkins to 1.2.0
This updates a bunch of things in the Jenkins logic.
For details of that see:
https://github.com/status-im/status-react-jenkins/pull/12

It grew out of the changes I made to make PR builds available in Desktop client:
https://github.com/status-im/nim-status-client/pull/507

Changes:
- Bump `status-react-jenkins` library to newer version, probably `1.2.0`
- Update use of `utils.pkgFilename()` in `ci/Jenkinsfile.combined`
- Make all iOS builds go into the same folder: `status-ios`
- Drop e2e build type, infer it from Android ABIs set to `x86` only
- Simplify logic in `nix/mobile/android/release.nix.`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-13 12:13:47 +02:00
Jakub Sokołowski 112132aa94
drop all desktop related files and references
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-07-08 10:26:51 +02:00
Jakub Sokołowski c943f5f283
nix: upgrade xcode 11.4.1 to 11.5
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-29 10:00:00 +02:00
Jakub Sokołowski de7ce0493b
nix: optimize garbage collection
In order to prevent `nix-store --gc` from removing too much I've:

- Added the `keep-outputs = true` setting to `nix/nix.conf`
- Fixed `nix/scripts/gcroots.sh` to make symlinks in `/nix/var/nix/gcroots`
- Made `nix/scripts/build.sh` and `nix/scripts/shell.sh` use it

This way when running `make nix-gc` most recently used shells and built
derivations won't be removed along with their dependencies.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-22 16:34:27 +02:00
Jakub Sokołowski 2862f4c772
nix: upgrade 2.3.4 > 2.3.6
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-22 16:33:55 +02:00
Jakub Sokołowski 98280dc45b
make go-maven-resolver fail when any resolution fails
Before errors like this:
```
finder.go:91: error: 'no pom data' for: <Dep ID=com.afollestad.material-dialogs:commons:0.9.6.0 O=false S= >
```
Would be printed to `stderr` but exit code would not be non-zero.

Now the whole `make nix-update-gradle` target should fail if any
dependency resolution fails.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-18 12:10:08 +02:00
Jakub Sokołowski dbe3e0a3f9
nix: minor cleanup and documentation updates
Changes:
- Simplified `default.nix` and `shell.nix`
- Moved the default shell to `nix/shell.nix`
- Dropped unnecessary merge from  `nix/shells.nix`
- Fixed `nix/lib/getConfig.nix` to return default on `null`
- Expanded `nix/DETAILS.md` with more info
- Added links to presentations in `nix/README.md`
- Fixed a few typos

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-05 14:49:34 +02:00
Jakub Sokołowski f2c96dcd3b
nix: add config defaults and temp keystore generation
Changes:
* Create `nix/config.nix` with `config` defaults
* Add `nix/tools/gradlePropParser.nix` for reading `gradle.properties`
* Add `nix/mobile/android/keystore.nix` for generating a keystore
* Load keystore generation in `nix/mobile/android/default.nix`
* Use generated keystore if it's not provided via `config`
* Add `-deststoretype pkcs12` in `scripts/generate-keystore.sh`
* Add `nix/lib/assertEnvVarSet.nix` for checking if env var is set

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-04 11:10:48 +02:00
Jakub Sokołowski 12e67ad6d2
nix: improve nix/scripts/node_modules.sh
Changes:
- MOAR functions so it's easier to follow
- Don't use /tmp, put the copied node_modules in repo root first
- Ignore more node_modules sub folders when checking for modifications
  - */unpacked_bin/clj-kondo
  - */scripts/.packager.env

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-06-02 16:26:19 +02:00
Andrey Shovkoplyas f659cbf242
camera roll 2020-06-01 11:34:13 +02:00
Jakub Sokołowski 2f65cedd2d
nix: replace grep and sed with AWK for parsing Gradle deps
The mess with regexes is hard to read and think about which is why it
had bugs with handling some Gradle formats.

It also lowers further the number of dependencies pulled from 785 to 744.

Changes:
- Added `gradle_parser.awk` script for getting dependencies from Gradle
- Changed the `deps.urls` file to contain full URLs to POMs
- Dropped the `deps.urls.old` part since `get_urls.sh` no longer exists
- Added `CLR` for learing line to `scripts/colors.sh`
- Wrote a new `nix/deps/gradle/README.md`
- Re-generated `nix/pkgs/go-maven-resolver/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-25 19:34:56 +02:00
Jakub Sokołowski d0216674da
nix: use go-maven-resolver to fix nix-update-gradle
This Go package was implemented by me to avoid having to use Mavan or
Gradle to resolve all the dependencies for Nix:
https://github.com/status-im/go-maven-resolver

The Go tool is essentially a slightly smarter and more efficient version
of the `get_urls.sh` script, which was mostly slow due to the `mvn
dependency:list` calls and slow HTTP requests.

This takes down the `make nix-update-gradle` target to under 2 minutes
on my machine.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-24 18:08:05 +02:00
Jakub Sokołowski 883af7b57a
nix: add missing Gradle repo path in gradle shell
Also rename STATUSREACT_NIX_MAVEN_REPO to STATUS_NIX_MAVEN_REPO.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-20 13:59:49 +02:00
Jakub Sokołowski 0bec573eb3
nix: don't use gradle to patch node modules
Before in order to create `deps.nodejs-patched` the `deps.gradle` would
also have to be downloaded in order to patch `build.gradle` files with
path to the Gradle dependencies in Nix store.

It turns out just replacting lines referencing `mavenCentral()`,
`google()`, and `jcenter()` in `repositories` block is enough to make
Gradle properly fetch dependencies from repo provided via the command
line `-Dmaven.repo.local='${deps.gradle}` option.

This should reduce the required size for shells that don't use Gradle.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-20 10:50:29 +02:00
Jakub Sokołowski d494f3b267
nix: enforce xcode only for status-go for ios
According to gomobile docs Xcode is only necessary for iOS:

>For -target ios, gomobile must be run on an OS X machine with Xcode installed.

https://godoc.org/golang.org/x/mobile/cmd/gomobile

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-19 19:58:19 +02:00
Jakub Sokołowski 8a1704a064
nix: fix ios shell to use patched nodejs modules
This was missed in 604362958b

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-19 12:22:22 +02:00
Jakub Sokołowski 604362958b
nix: always use patched node_modules in shells
Becuase `clojure` shell used unpatched `node_modules` while the
`android` shell used the patched version when starting these shells
the `node_modules` would keep being switched between them wasting time.

Changes:
- Move `nix/tools/patchNodeModules.nix` to `nix/deps/nodejs-patched`
- Make `nix/deps/nodejs-patched` a normal derivation without extra arguments
- Use `deps.nodejs-patched` in `nix/mobile/android` shell
- Use `deps.nodejs-patched` in `nix/shells.nix` node shell
- Use `with pkgs` to reduce arguments in `nix/mobile/android/release.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-18 13:54:26 +02:00
Jakub Sokołowski 559a79b3d5
nix: move jetify-ing Java files to patchNodeModules
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 22:44:40 +02:00
Jakub Sokołowski 2f9593a7d2
unify multiple Makefile targets
Changes:
- Drop a bunch of `watch-{android,ios}-*` tagets
- Replace them with one `run-clojure`
- Drop a bunch of `react-native-*` targets
- Replace them with one `run-metro`
- Replace `run-{android,ios}` with `run-{android,ios}`
- Drop `startdev-{android,ios,desktop}*` targets
- Drop `prod-build-{android,ios}` as deprecated
- Drop `src/status_im/android/core.cljs`
- Drop `src/status_im/ios/core.cljs`
- Move `lsof` tool to `default` shell
- Replace them with one `init` `src/status_im/core.cljs`
- Use `init` in one `shadow-cljs.edn` target `mobile`
- Use `mobile` target in `nix/mobile/android/jsbundle`
- Update instructions in `STARTING_GUIDE.md`
- Use `gradle` shell for `android-clean` target

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 18:29:31 +02:00
Jakub Sokołowski 707a9b7095
nix: add status-go shell
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 16:19:34 +02:00
Jakub Sokołowski 64b8b9f170
nix: add support for more build inputs in mergeSh
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 16:19:27 +02:00
Jakub Sokołowski 73a8992db7
nix: refactor loading of node.js modules
Changes:
- Drop `nix/mobile/android/maven-and-npm-deps/default.nix`
- Replace it with much simpler `nix/tools/patchNodeModules`
- Move Gradle patching tool to `nix/pkgs/patch-maven-srcs`
- Simplify it by using `gradle.deps` and patched node modules separately
- Change `TARGET` for `release-android` to `default`
- Move `mobile/reset-node_modules.sh` to `scripts/node_modules.sh`
- Move `nix/mobile/android/targets/release-android.nix` to `nix/mobile/android/release.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-15 16:19:27 +02:00
Jakub Sokołowski 5607540ac1
nix: data in nix/deps/gradle should be JSON
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 17:24:59 +02:00
Jakub Sokołowski 6746b7d932
nix: data in nix/deps/clojure should be JSON
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 16:02:17 +02:00
Gheorghe Pinzaru d133f57678
Remove source-map android debug
Update flipper version android

Disable source maps ios

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-05-14 15:43:06 +03:00
Jakub Sokołowski ed4d0a1ed9
nix: refactor updating Gradle dependencies
changes:
- Moved Gradle deps setup to `nix/deps/gradle`
- Dropped `nix/mobile/android/maven-and-npm-deps/maven`
- Used GNU Parallel to optimize `nix/deps/gradle/generate.sh`
- Move Maven+Node shell setup from `release-android.nix` to Android shell
- Moved AAPT2 patching to `nix/pkgs/aapt2`
- Drop `patchPhase` and `gradlew` use from `release-android.nix`
- Simplify symlinking `{mobile,desktop}/js_files/*`
- Add new `nodejs` shell and merge it with `clojure` and `gradle`
- Re-created Gradle deps files with new scripts:
  - `nix/deps/gradle/proj.list`
  - `nix/deps/gradle/deps.list`
  - `nix/deps/gradle/deps.urls`
  - `nix/deps/gradle/deps.nix`

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:30 +02:00
Jakub Sokołowski 45f1d58832
nix: simplify android release build
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:23 +02:00
Jakub Sokołowski df25f09159
nix: move yarn2nix setup to nix/deps/nodejs
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:23 +02:00
Jakub Sokołowski 381b2462a4
nix: put clojure deps under pkgs.deps.clojure
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:23 +02:00
Jakub Sokołowski a96b35996f
drop scripts/copy-translations.sh as useless
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-14 09:46:22 +02:00
yenda abfe0869f3
requiring translations inline
Signed-off-by: yenda <eric@status.im>
2020-05-12 16:11:37 +02:00
Gheorghe Pinzaru 2140a9867b
Upgrade react native to 0.62.2
Xcode updates

Localization

Pods upgrade

Update package.json

Upgrade android

Fix gitignore

Add flipper

Do not enable flipper by default on ios

maven update

Remove outdated hermes

idk what it is, but it's outdated

show warning on build

gradle update

rebase

Update deprecated clipboard

nix

align e2e to rn upgrade

Signed-off-by: Gheorghe Pinzaru <feross95@gmail.com>
2020-05-06 17:35:13 +03:00
Jakub Sokołowski fedb7131a9
nix: fix maven deps shell
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-06 11:32:37 +02:00
Jakub Sokołowski e6005dd7c8
nix: use yarn2nix from nixpkgs, stop copying modules
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-05 20:00:47 +02:00
Jakub Sokołowski 954e677f0c
nix: use symlinks for maven dependencies derivation
This should reduce the size of the derivation by >50%.

Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-05 20:00:40 +02:00
Jakub Sokołowski 631339b314
nix: add missing STATUS_GO_ANDROID_LIBDIR env variable
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2020-05-05 12:46:06 +02:00