Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c0164c333 | ||
|
|
fc351bfbe4 | ||
|
|
e9bcb91ead | ||
|
|
278456907c | ||
|
|
3480aef404 | ||
|
|
45b2c9a09e | ||
|
|
15ff33271b | ||
|
|
20197834a7 | ||
|
|
5f29318f75 | ||
|
|
5fc0b586ab | ||
|
|
7f38c51503 | ||
|
|
0949b90563 | ||
|
|
d284b2925c |
@@ -217,7 +217,7 @@ android {
|
||||
initWith release
|
||||
applicationIdSuffix ".pr"
|
||||
versionNameSuffix ".pr"
|
||||
debuggable true
|
||||
debuggable false
|
||||
matchingFallbacks = ["release"]
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
@@ -263,6 +263,7 @@ dependencies {
|
||||
implementation project(':realm')
|
||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
||||
implementation "com.android.support:appcompat-v7:28.0.0"
|
||||
implementation 'androidx.multidex:multidex:2.0.1' // only needed if minSdkVersion is less than 21 (https://developer.android.com/studio/build/multidex)
|
||||
// Force using exact RN version instead of relying on gradle dependency resolution
|
||||
// https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution
|
||||
//compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
|
||||
@@ -276,6 +277,7 @@ dependencies {
|
||||
implementation project(':react-native-webview')
|
||||
implementation project(':react-native-config')
|
||||
implementation project(':react-native-firebase')
|
||||
implementation project(':react-native-shake')
|
||||
implementation project(':RNMail')
|
||||
compile ('com.google.android.gms:play-services-base:16.0.1') {
|
||||
force = true
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
</service>
|
||||
<service android:name="io.invertase.firebase.messaging.RNFirebaseBackgroundMessagingService" />
|
||||
<provider
|
||||
android:name="android.support.v4.content.FileProvider"
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true"
|
||||
|
||||
@@ -2,7 +2,7 @@ package im.status.ethereum;
|
||||
|
||||
import android.content.Context;
|
||||
import android.annotation.TargetApi;
|
||||
import android.support.annotation.Nullable;
|
||||
import androidx.annotation.Nullable;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.ActivityManager;
|
||||
import android.content.DialogInterface;
|
||||
@@ -13,7 +13,7 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Looper;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.ActivityCompat;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import android.util.Log;
|
||||
import android.view.WindowManager;
|
||||
import android.content.Intent;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package im.status.ethereum;
|
||||
|
||||
import android.support.multidex.MultiDexApplication;
|
||||
import androidx.multidex.MultiDexApplication;
|
||||
|
||||
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
|
||||
import com.facebook.react.ReactApplication;
|
||||
@@ -36,6 +36,7 @@ import io.invertase.firebase.notifications.RNFirebaseNotificationsPackage;
|
||||
import io.realm.react.RealmReactPackage;
|
||||
import me.alwx.HttpServer.HttpServerReactPackage;
|
||||
import com.chirag.RNMail.*;
|
||||
import com.clipsub.RNShake.RNShakeEventPackage;
|
||||
|
||||
public class MainApplication extends MultiDexApplication implements ReactApplication {
|
||||
|
||||
@@ -72,7 +73,8 @@ public class MainApplication extends MultiDexApplication implements ReactApplica
|
||||
new WebViewBridgePackage(BuildConfig.DEBUG_WEBVIEW == "1", callRPC),
|
||||
new RNCWebViewPackage(),
|
||||
new ReactNativeConfigPackage(),
|
||||
new KeychainPackage());
|
||||
new KeychainPackage(),
|
||||
new RNShakeEventPackage());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,3 +25,5 @@ STATUS_RELEASE_KEY_ALIAS=status
|
||||
STATUS_RELEASE_KEY_PASSWORD=password
|
||||
|
||||
org.gradle.jvmargs=-Xmx8704M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
|
||||
@@ -44,3 +44,5 @@ include ':react-native-android'
|
||||
project(':react-native-android').projectDir = new File(rootProject.projectDir, '../node_modules/react-native/ReactAndroid')
|
||||
include ':RNMail', ':app'
|
||||
project(':RNMail').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-mail/android')
|
||||
include ':react-native-shake'
|
||||
project(':react-native-shake').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-shake/android')
|
||||
|
||||
@@ -81,15 +81,6 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
env.PKG_URL = cmn.utils.uploadArtifact(apk)
|
||||
/* build type specific */
|
||||
switch (btype) {
|
||||
case 'release':
|
||||
mobile.android.uploadToPlayStore(); break;
|
||||
case 'nightly':
|
||||
env.DIAWI_URL = mobile.android.uploadToDiawi(); break;
|
||||
case 'e2e':
|
||||
env.SAUCE_URL = mobile.android.uploadToSauceLabs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -26,6 +26,7 @@ pipeline {
|
||||
LC_ALL = "en_US.UTF-8"
|
||||
LANGUAGE = "en_US.UTF-8"
|
||||
TARGET_OS = 'ios'
|
||||
NIX_IGNORE_SYMLINK_STORE = 1
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
REALM_DISABLE_ANALYTICS = 1
|
||||
@@ -63,7 +64,9 @@ pipeline {
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
script { cmn.nix.shell('lein prod-build-ios') }
|
||||
script {
|
||||
cmn.nix.shell('lein prod-build-ios')
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Bundle') {
|
||||
|
||||
+2
-1
@@ -44,7 +44,8 @@
|
||||
"js-sha3"
|
||||
"react-navigation"
|
||||
"hi-base32"
|
||||
"react-native-mail"]
|
||||
"react-native-mail"
|
||||
"react-native-shake"]
|
||||
|
||||
;; Desktop modules
|
||||
:desktop-modules ["realm"
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
stdenv ? pkgs.stdenv,
|
||||
target-os ? "all" }:
|
||||
|
||||
(pkgs.callPackage ./derivation.nix { inherit pkgs target-os config; }).overrideAttrs(_: {
|
||||
(pkgs.callPackage ./derivation.nix { inherit pkgs target-os config stdenv; }).overrideAttrs(_: {
|
||||
src = null;
|
||||
# TODO: Figure out if there's a better way to do this
|
||||
# NOTE: There's a weird difference in behavior between Linux and macOS: in Linux the packages will only be fetched by `nix build` if unpackPhase exists. In macOS it's the other way around :-/
|
||||
|
||||
+9
-2
@@ -1,15 +1,22 @@
|
||||
{ system ? builtins.currentSystem
|
||||
, config ? { android_sdk.accept_license = true; }, overlays ? []
|
||||
, pkgs ? (import <nixpkgs> { inherit system config overlays; })
|
||||
, target-os }:
|
||||
, target-os
|
||||
, stdenv }:
|
||||
|
||||
let
|
||||
platform = pkgs.callPackage ./nix/platform.nix { inherit target-os; };
|
||||
# Declare a specialized mkShell function which adds some bootstrapping
|
||||
# so that e.g. STATUS_REACT_HOME is automatically available in the shell
|
||||
mkShell = (import ./bootstrapped-shell.nix {
|
||||
inherit stdenv target-os;
|
||||
inherit (pkgs) mkShell git;
|
||||
});
|
||||
# TODO: Try to use stdenv for iOS. The problem is with building iOS as the build is trying to pass parameters to Apple's ld that are meant for GNU's ld (e.g. -dynamiclib)
|
||||
stdenv' = pkgs.stdenvNoCC;
|
||||
gradle = pkgs.gradle_4_10;
|
||||
statusDesktop = pkgs.callPackage ./nix/desktop { inherit target-os status-go; inherit (pkgs) darwin; stdenv = stdenv'; };
|
||||
statusMobile = pkgs.callPackage ./nix/mobile { inherit target-os config status-go gradle; inherit (pkgs.xcodeenv) composeXcodeWrapper; stdenv = stdenv'; };
|
||||
statusMobile = pkgs.callPackage ./nix/mobile { inherit target-os config status-go gradle; inherit (pkgs.xcodeenv) composeXcodeWrapper mkShell; stdenv = stdenv'; };
|
||||
status-go = pkgs.callPackage ./nix/status-go { inherit target-os; inherit (pkgs.xcodeenv) composeXcodeWrapper; inherit (statusMobile) xcodewrapperArgs; androidPkgs = statusMobile.androidComposition; };
|
||||
nodejs' = pkgs.nodejs-10_x;
|
||||
yarn' = pkgs.yarn.override { nodejs = nodejs'; };
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
source "https://rubygems.org"
|
||||
|
||||
gem "fastlane"
|
||||
gem "fastlane", ">= 2.127.2"
|
||||
|
||||
plugins_path = File.join(File.dirname(__FILE__), 'Pluginfile')
|
||||
eval_gemfile(plugins_path) if File.exist?(plugins_path)
|
||||
|
||||
+16
-16
@@ -14,11 +14,11 @@ GEM
|
||||
declarative (0.0.10)
|
||||
declarative-option (0.1.0)
|
||||
digest-crc (0.4.1)
|
||||
domain_name (0.5.20180417)
|
||||
domain_name (0.5.20190701)
|
||||
unf (>= 0.0.5, < 1.0.0)
|
||||
dotenv (2.7.2)
|
||||
dotenv (2.7.4)
|
||||
emoji_regex (1.0.1)
|
||||
excon (0.64.0)
|
||||
excon (0.65.0)
|
||||
faraday (0.15.4)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
faraday-cookie_jar (0.0.6)
|
||||
@@ -27,7 +27,7 @@ GEM
|
||||
faraday_middleware (0.13.1)
|
||||
faraday (>= 0.7.4, < 1.0)
|
||||
fastimage (2.1.5)
|
||||
fastlane (2.121.1)
|
||||
fastlane (2.128.0)
|
||||
CFPropertyList (>= 2.3, < 4.0.0)
|
||||
addressable (>= 2.3, < 3.0.0)
|
||||
babosa (>= 1.0.2, < 2.0.0)
|
||||
@@ -46,8 +46,8 @@ GEM
|
||||
google-cloud-storage (>= 1.15.0, < 2.0.0)
|
||||
highline (>= 1.7.2, < 2.0.0)
|
||||
json (< 3.0.0)
|
||||
mini_magick (~> 4.5.1)
|
||||
multi_json
|
||||
jwt (~> 2.1.0)
|
||||
mini_magick (>= 4.9.4, < 5.0.0)
|
||||
multi_xml (~> 0.5)
|
||||
multipart-post (~> 2.0.0)
|
||||
plist (>= 3.1.0, < 4.0.0)
|
||||
@@ -78,7 +78,7 @@ GEM
|
||||
signet (~> 0.9)
|
||||
google-cloud-core (1.3.0)
|
||||
google-cloud-env (~> 1.0)
|
||||
google-cloud-env (1.0.5)
|
||||
google-cloud-env (1.2.0)
|
||||
faraday (~> 0.11)
|
||||
google-cloud-storage (1.16.0)
|
||||
digest-crc (~> 0.4)
|
||||
@@ -102,7 +102,7 @@ GEM
|
||||
mime-types (3.2.2)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2019.0331)
|
||||
mini_magick (4.5.1)
|
||||
mini_magick (4.9.5)
|
||||
multi_json (1.13.1)
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.0.0)
|
||||
@@ -122,7 +122,7 @@ GEM
|
||||
netrc (~> 0.8)
|
||||
retriable (3.1.2)
|
||||
rouge (2.0.7)
|
||||
rubyzip (1.2.2)
|
||||
rubyzip (1.2.3)
|
||||
security (0.1.3)
|
||||
signet (0.11.0)
|
||||
addressable (~> 2.3)
|
||||
@@ -136,17 +136,17 @@ GEM
|
||||
terminal-notifier (2.0.0)
|
||||
terminal-table (1.8.0)
|
||||
unicode-display_width (~> 1.1, >= 1.1.1)
|
||||
tty-cursor (0.6.1)
|
||||
tty-screen (0.6.5)
|
||||
tty-spinner (0.9.0)
|
||||
tty-cursor (~> 0.6.0)
|
||||
tty-cursor (0.7.0)
|
||||
tty-screen (0.7.0)
|
||||
tty-spinner (0.9.1)
|
||||
tty-cursor (~> 0.7)
|
||||
uber (0.1.0)
|
||||
unf (0.1.4)
|
||||
unf_ext
|
||||
unf_ext (0.0.7.6)
|
||||
unicode-display_width (1.5.0)
|
||||
unicode-display_width (1.6.0)
|
||||
word_wrap (1.0.0)
|
||||
xcodeproj (1.8.2)
|
||||
xcodeproj (1.11.0)
|
||||
CFPropertyList (>= 2.3.3, < 4.0)
|
||||
atomos (~> 0.1.3)
|
||||
claide (>= 1.0.2, < 2.0)
|
||||
@@ -161,7 +161,7 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
fastlane
|
||||
fastlane (>= 2.127.2)
|
||||
fastlane-plugin-clean_testflight_testers
|
||||
fastlane-plugin-diawi
|
||||
|
||||
|
||||
+25
-25
@@ -117,20 +117,20 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0abdlwb64ns7ssmiqhdwgl27ly40x2l27l8hs8hn0z4kb3zd2x3v";
|
||||
sha256 = "0lcqjsmixjp52bnlgzh4lg9ppsk52x9hpwdjd53k8jnbah2602h0";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.5.20180417";
|
||||
version = "0.5.20190701";
|
||||
};
|
||||
dotenv = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "13cis6bf06hmz744xrsl163p6gb78xcm8g8q4pcabsy5ywyv6kag";
|
||||
sha256 = "1375dyawvcp81d94jkjwjjkj3j23gsp06cfwh15g695l4g3ssswc";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.7.2";
|
||||
version = "2.7.4";
|
||||
};
|
||||
emoji_regex = {
|
||||
groups = ["default"];
|
||||
@@ -147,10 +147,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0vcplvlykirg2vc56jjxavgpkllzq26xgp7ind7wc5ikaqaz64gn";
|
||||
sha256 = "1mc6y6n7i0hhk7i8wwi4qjnpkm013p7z3xr994s696hk74f91a7j";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.64.0";
|
||||
version = "0.65.0";
|
||||
};
|
||||
faraday = {
|
||||
dependencies = ["multipart-post"];
|
||||
@@ -196,15 +196,15 @@
|
||||
version = "2.1.5";
|
||||
};
|
||||
fastlane = {
|
||||
dependencies = ["CFPropertyList" "addressable" "babosa" "colored" "commander-fastlane" "dotenv" "emoji_regex" "excon" "faraday" "faraday-cookie_jar" "faraday_middleware" "fastimage" "gh_inspector" "google-api-client" "google-cloud-storage" "highline" "json" "mini_magick" "multi_json" "multi_xml" "multipart-post" "plist" "public_suffix" "rubyzip" "security" "simctl" "slack-notifier" "terminal-notifier" "terminal-table" "tty-screen" "tty-spinner" "word_wrap" "xcodeproj" "xcpretty" "xcpretty-travis-formatter"];
|
||||
dependencies = ["CFPropertyList" "addressable" "babosa" "colored" "commander-fastlane" "dotenv" "emoji_regex" "excon" "faraday" "faraday-cookie_jar" "faraday_middleware" "fastimage" "gh_inspector" "google-api-client" "google-cloud-storage" "highline" "json" "jwt" "mini_magick" "multi_xml" "multipart-post" "plist" "public_suffix" "rubyzip" "security" "simctl" "slack-notifier" "terminal-notifier" "terminal-table" "tty-screen" "tty-spinner" "word_wrap" "xcodeproj" "xcpretty" "xcpretty-travis-formatter"];
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "03lzpws5xy5alla96sf4h7qapklylpaq8qzln8r1p11qbpgnrrlc";
|
||||
sha256 = "1ahxbimlx6d2w0dhx2pj7mii2rpigqgmj4bcaymddbwfbp385gmx";
|
||||
type = "gem";
|
||||
};
|
||||
version = "2.121.1";
|
||||
version = "2.128.0";
|
||||
};
|
||||
fastlane-plugin-clean_testflight_testers = {
|
||||
groups = ["default"];
|
||||
@@ -265,10 +265,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "038jcy9nm1liah5ywaxm5xx2adbd28y6p8fk2frgv63v80pj8mw4";
|
||||
sha256 = "0j25sy2qhybqfwsyh8j4m10z2x7dn2jmf1gwr1w2b90cmya4yrbd";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.0.5";
|
||||
version = "1.2.0";
|
||||
};
|
||||
google-cloud-storage = {
|
||||
dependencies = ["digest-crc" "google-api-client" "google-cloud-core" "googleauth"];
|
||||
@@ -379,10 +379,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1a59k5l29vj060yscaqk370rg5vyr132kbw6x3zar7khzjqjqd8p";
|
||||
sha256 = "0qy09qrd5bwh8mkbj514n5vcw9ni73218h9s3zmvbpmdwrnzi8j4";
|
||||
type = "gem";
|
||||
};
|
||||
version = "4.5.1";
|
||||
version = "4.9.5";
|
||||
};
|
||||
multi_json = {
|
||||
groups = ["default"];
|
||||
@@ -521,10 +521,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1n1lb2sdwh9h27y244hxzg1lrxxg2m53pk1vq7p33bna003qkyrj";
|
||||
sha256 = "1w9gw28ly3zyqydnm8phxchf4ymyjl2r7zf7c12z8kla10cpmhlc";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.2.2";
|
||||
version = "1.2.3";
|
||||
};
|
||||
security = {
|
||||
groups = ["default"];
|
||||
@@ -594,20 +594,20 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0n9mcb1jdyhz11fg0s7wy3q57xkh77p1r60w7rjibjfpkyx9v8q3";
|
||||
sha256 = "0prcxdy6qhqba4cv7hsy503b3bjciqk3j3hhzvcbij1kj2gh31c9";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.6.1";
|
||||
version = "0.7.0";
|
||||
};
|
||||
tty-screen = {
|
||||
groups = ["default"];
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0azpjgyhdm8ycblnx9crq3dgb2x8yg454a13n60zfpsc0n138sw1";
|
||||
sha256 = "1143g05fs28ssgimaph6sdnsndd1wrpax9kjypvd2ripa1adm4kx";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.6.5";
|
||||
version = "0.7.0";
|
||||
};
|
||||
tty-spinner = {
|
||||
dependencies = ["tty-cursor"];
|
||||
@@ -615,10 +615,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0248h3x77634b41w5xv6k10p7767li5b6pc90h23635xv7kdkdyd";
|
||||
sha256 = "089qiqzjs1m727kalz8vn2wzgwzdn8mg5gyag901pmimxl64lnvc";
|
||||
type = "gem";
|
||||
};
|
||||
version = "0.9.0";
|
||||
version = "0.9.1";
|
||||
};
|
||||
uber = {
|
||||
groups = ["default"];
|
||||
@@ -656,10 +656,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "1ssnc6rja9ii97z7m35y4zd0rd7cpv3bija20l7cpd7y4jyyx44q";
|
||||
sha256 = "08kfiniak1pvg3gn5k6snpigzvhvhyg7slmm0s2qx5zkj62c1z2w";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.5.0";
|
||||
version = "1.6.0";
|
||||
};
|
||||
word_wrap = {
|
||||
groups = ["default"];
|
||||
@@ -677,10 +677,10 @@
|
||||
platforms = [];
|
||||
source = {
|
||||
remotes = ["https://rubygems.org"];
|
||||
sha256 = "0ji3wmpr6xm4172vxh9y6731vm2xrvv7ccwk4ijd5n4if1dakm03";
|
||||
sha256 = "1h73ilwyjwyyhj761an3pmicllw50514gxb6b1r4z4klc9rzxw4j";
|
||||
type = "gem";
|
||||
};
|
||||
version = "1.8.2";
|
||||
version = "1.11.0";
|
||||
};
|
||||
xcpretty = {
|
||||
dependencies = ["rouge"];
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
42B30EAD0EED4C72BB96D1AB /* Inter-ExtraBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 6B145D55D500476BB45C2232 /* Inter-ExtraBold.otf */; };
|
||||
475D202F20B7450D00879A77 /* libRNFirebase.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 475D1FC020B7413500879A77 /* libRNFirebase.a */; };
|
||||
4C16DE0C1F89508700AA10DB /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */; };
|
||||
4C5F69C322815E6A00D26222 /* libRNShakeEvent.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C5F69BE22815E4F00D26222 /* libRNShakeEvent.a */; };
|
||||
4C9FBC56227C85640024181F /* libRNMail.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 4C9FBC50227C85250024181F /* libRNMail.a */; };
|
||||
54BD2CE922134B6291FE1BFD /* Inter-Light-BETA.otf in Resources */ = {isa = PBXBuildFile; fileRef = 6864A92FD6844B928C52F5C1 /* Inter-Light-BETA.otf */; };
|
||||
57C854A7993C47A3B1AECD32 /* Inter-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */; };
|
||||
@@ -188,6 +189,13 @@
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNFirebase;
|
||||
};
|
||||
4C5F69BD22815E4F00D26222 /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4C5F698522815E4E00D26222 /* RNShakeEvent.xcodeproj */;
|
||||
proxyType = 2;
|
||||
remoteGlobalIDString = 134814201AA4EA6300B7C361;
|
||||
remoteInfo = RNShakeEvent;
|
||||
};
|
||||
4C9FBC4F227C85250024181F /* PBXContainerItemProxy */ = {
|
||||
isa = PBXContainerItemProxy;
|
||||
containerPortal = 4C9FBC19227C85250024181F /* RNMail.xcodeproj */;
|
||||
@@ -556,6 +564,7 @@
|
||||
475D1FCD20B7415300879A77 /* libFirebaseCore.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libFirebaseCore.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
475D1FCE20B7415300879A77 /* libFirebaseMessaging.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = libFirebaseMessaging.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
|
||||
4C5F698522815E4E00D26222 /* RNShakeEvent.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNShakeEvent.xcodeproj; path = "../node_modules/react-native-shake/ios/RNShakeEvent.xcodeproj"; sourceTree = "<group>"; };
|
||||
4C9FBC19227C85250024181F /* RNMail.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RNMail.xcodeproj; path = "../node_modules/react-native-mail/RNMail.xcodeproj"; sourceTree = "<group>"; };
|
||||
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; };
|
||||
5535217F57E44D77AA9CF083 /* libRCTOrientation.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTOrientation.a; sourceTree = "<group>"; };
|
||||
@@ -629,6 +638,7 @@
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
4C5F69C322815E6A00D26222 /* libRNShakeEvent.a in Frameworks */,
|
||||
ABC194E5221009A800EB06E6 /* libRNLanguages.a in Frameworks */,
|
||||
475D202F20B7450D00879A77 /* libRNFirebase.a in Frameworks */,
|
||||
4C9FBC56227C85640024181F /* libRNMail.a in Frameworks */,
|
||||
@@ -891,6 +901,14 @@
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4C5F698622815E4E00D26222 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C5F69BE22815E4F00D26222 /* libRNShakeEvent.a */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
4C9FBC1A227C85250024181F /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -922,6 +940,7 @@
|
||||
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
4C5F698522815E4E00D26222 /* RNShakeEvent.xcodeproj */,
|
||||
4C9FBC19227C85250024181F /* RNMail.xcodeproj */,
|
||||
ABC194DC2210099B00EB06E6 /* RNLanguages.xcodeproj */,
|
||||
B461988B2210C98F00603CF2 /* RNCWebView.xcodeproj */,
|
||||
@@ -1324,6 +1343,10 @@
|
||||
ProductGroup = 475D1EEE20B73EE000879A77 /* Products */;
|
||||
ProjectRef = AF409BB755B94FB1BBA01927 /* RNSecureRandom.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 4C5F698622815E4E00D26222 /* Products */;
|
||||
ProjectRef = 4C5F698522815E4E00D26222 /* RNShakeEvent.xcodeproj */;
|
||||
},
|
||||
{
|
||||
ProductGroup = 92925B361F571DE600203EEB /* Products */;
|
||||
ProjectRef = 1E74DC52A1E449A2BA858B14 /* RNSVG.xcodeproj */;
|
||||
@@ -1451,6 +1474,13 @@
|
||||
remoteRef = 475D1FBF20B7413500879A77 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
4C5F69BE22815E4F00D26222 /* libRNShakeEvent.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
path = libRNShakeEvent.a;
|
||||
remoteRef = 4C5F69BD22815E4F00D26222 /* PBXContainerItemProxy */;
|
||||
sourceTree = BUILT_PRODUCTS_DIR;
|
||||
};
|
||||
4C9FBC50227C85250024181F /* libRNMail.a */ = {
|
||||
isa = PBXReferenceProxy;
|
||||
fileType = archive.ar;
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.13.0
|
||||
0.13.4
|
||||
|
||||
@@ -54,6 +54,7 @@
|
||||
"react-native-randombytes": "3.5.0",
|
||||
"react-native-safe-area-view": "0.9.0",
|
||||
"react-native-securerandom": "git+https://github.com/status-im/react-native-securerandom.git#0.1.1-2",
|
||||
"react-native-shake": "^3.3.1",
|
||||
"react-native-splash-screen": "3.1.1",
|
||||
"react-native-status-keycard": "git+https://github.com/status-im/react-native-status-keycard.git#v2.5.4",
|
||||
"react-native-svg": "^9.2.4",
|
||||
|
||||
@@ -3526,7 +3526,7 @@ invariant@2.2.0:
|
||||
dependencies:
|
||||
loose-envify "^1.0.0"
|
||||
|
||||
invariant@^2.2.2, invariant@^2.2.4:
|
||||
invariant@^2.2.2, invariant@^2.2.4, invariant@^2.2.x:
|
||||
version "2.2.4"
|
||||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
|
||||
integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==
|
||||
@@ -5581,6 +5581,13 @@ react-native-scrollable-mixin@^1.0.1:
|
||||
dependencies:
|
||||
base64-js "*"
|
||||
|
||||
react-native-shake@^3.3.1:
|
||||
version "3.3.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-shake/-/react-native-shake-3.3.1.tgz#e168827015db0cfb316f2bd428afe95f225fda6a"
|
||||
integrity sha512-Z5W/tC3rsOcQmAOxe/uHsGNrXyZx3xwd1bFaRw0pbO0lhG4Z1g2MOcrO/Pa+ZA59ap/1tmwVP6/+IPtt6DPT1w==
|
||||
dependencies:
|
||||
invariant "^2.2.x"
|
||||
|
||||
react-native-splash-screen@3.1.1:
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/react-native-splash-screen/-/react-native-splash-screen-3.1.1.tgz#1a4e46c9fdce53ff52af2a2cb4181788c4e30b30"
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import androidx.core.content.FileProvider;
|
||||
import android.util.Log;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# This Nix expression appends/modifies an existing attribute set in order to run scripts/setup if needed,
|
||||
# as well as define STATUS_REACT_HOME
|
||||
#
|
||||
|
||||
{ stdenv, mkShell, target-os, git }:
|
||||
|
||||
let
|
||||
shell' = shellAttr:
|
||||
shellAttr // {
|
||||
nativeBuildInputs = (shellAttr.nativeBuildInputs or [ ]) ++ [ git ];
|
||||
TARGET_OS = target-os;
|
||||
shellHook = ''
|
||||
set -e
|
||||
|
||||
export STATUS_REACT_HOME=$(git rev-parse --show-toplevel)
|
||||
|
||||
${shellAttr.shellHook or ""}
|
||||
|
||||
if [ "$IN_NIX_SHELL" != 'pure' ] && [ ! -f $STATUS_REACT_HOME/.ran-setup ]; then
|
||||
$STATUS_REACT_HOME/scripts/setup
|
||||
touch $STATUS_REACT_HOME/.ran-setup
|
||||
fi
|
||||
|
||||
set +e
|
||||
'';
|
||||
};
|
||||
# Declare a specialized mkShell function which adds some bootstrapping
|
||||
# so that e.g. STATUS_REACT_HOME is automatically available in the shell
|
||||
mkShell' = shellAttr:
|
||||
(mkShell.override { inherit stdenv; }) (shell' shellAttr);
|
||||
|
||||
in mkShell'
|
||||
@@ -0,0 +1,189 @@
|
||||
#
|
||||
# This script prepares a finalized version of node_modules,
|
||||
# as well as a local version of the Maven repository required by Gradle scripts
|
||||
#
|
||||
|
||||
{ stdenv, stdenvNoCC, lib, callPackage,
|
||||
gradle, bash, file, nodejs, zlib,
|
||||
projectNodePackage, localMavenRepoBuilder, mkFilter }:
|
||||
|
||||
let
|
||||
mavenLocalRepo = callPackage ./maven { inherit localMavenRepoBuilder; stdenv = if stdenv.isLinux then stdenv else stdenvNoCC; };
|
||||
|
||||
# Import the native dependencies for React Native Android builds
|
||||
react-native-deps = callPackage ./maven/reactnative-android-native-deps.nix { inherit stdenvNoCC; };
|
||||
|
||||
createMobileFilesSymlinks = root: ''
|
||||
ln -sf ${root}/mobile_files/package.json.orig ${root}/package.json
|
||||
ln -sf ${root}/mobile_files/metro.config.js ${root}/metro.config.js
|
||||
ln -sf ${root}/mobile_files/yarn.lock ${root}/yarn.lock
|
||||
'';
|
||||
|
||||
# fake build to pre-download deps into fixed-output derivation
|
||||
deps =
|
||||
let
|
||||
# Place build target directories in NIX_BUILD_TOP (normally represents /build)
|
||||
projectBuildDir = "$NIX_BUILD_TOP/project";
|
||||
mavenRepoDir = "$NIX_BUILD_TOP/.m2/repository";
|
||||
reactNativeDepsDir = "$NIX_BUILD_TOP/deps"; # Use local writable deps, otherwise (probably due to some interaction between Nix sandboxing and Java) gradle will fail copying directly from the nix store
|
||||
in
|
||||
stdenv.mkDerivation {
|
||||
name = "patched-android-gradle-and-npm-modules";
|
||||
src =
|
||||
let path = ./../../../..; # Import the root /android and /mobile_files folders clean of any build artifacts
|
||||
in builtins.path { # We use builtins.path so that we can name the resulting derivation, otherwise the name would be taken from the checkout directory, which is outside of our control
|
||||
inherit path;
|
||||
name = "status-react-source-gradle-install";
|
||||
filter =
|
||||
# Keep this filter as restrictive as possible in order to avoid unnecessary rebuilds and limit closure size
|
||||
mkFilter {
|
||||
dirRootsToInclude = [
|
||||
"android" "mobile_files" "resources"
|
||||
"translations" "status-modules"
|
||||
];
|
||||
dirsToExclude = [ ".git" ".svn" "CVS" ".hg" ".gradle" "build" "intermediates" "libs" "obj" ];
|
||||
filesToInclude = [ ".babelrc" ];
|
||||
filesToExclude = [ "android/gradlew" ];
|
||||
root = path;
|
||||
};
|
||||
};
|
||||
phases = [ "unpackPhase" "patchPhase" "installPhase" "fixupPhase" ];
|
||||
nativeBuildInputs = [ projectNodePackage ];
|
||||
buildInputs = [ gradle nodejs bash file zlib mavenLocalRepo ];
|
||||
propagatedBuildInputs = [ react-native-deps ];
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
|
||||
# Copy project directory
|
||||
mkdir -p ${projectBuildDir}
|
||||
cp -a $src/. ${projectBuildDir}
|
||||
chmod u+w ${projectBuildDir}
|
||||
cd ${projectBuildDir}
|
||||
|
||||
# Copy RN maven dependencies and make them writable, otherwise Gradle copy fails (since the top-level directory is read-only, Java isn't smart enough to copy the child files/folders into that target directory)
|
||||
mkdir -p ${mavenRepoDir}
|
||||
cp -a ${mavenLocalRepo}/. ${mavenRepoDir}
|
||||
cp -a ${react-native-deps}/deps ${reactNativeDepsDir}
|
||||
for d in `find ${reactNativeDepsDir} -mindepth 1 -maxdepth 1 -type d`; do
|
||||
chmod -R u+w $d
|
||||
done
|
||||
|
||||
# Copy node_modules from Nix store
|
||||
rm -rf ${projectBuildDir}/node_modules
|
||||
mkdir -p ${projectBuildDir}/node_modules
|
||||
cp -a ${projectNodePackage}/node_modules/. ${projectBuildDir}/node_modules/
|
||||
|
||||
# Adjust permissions
|
||||
chmod -R u+w ${projectBuildDir}
|
||||
|
||||
cp -R ${projectBuildDir}/status-modules/ ${projectBuildDir}/node_modules/status-modules/
|
||||
cp -R ${projectBuildDir}/translations/ ${projectBuildDir}/node_modules/status-modules/translations/
|
||||
|
||||
# Set up symlinks to mobile enviroment in project root
|
||||
${createMobileFilesSymlinks projectBuildDir}
|
||||
|
||||
# Create a dummy VERSION, since we don't want this expression to be invalidated just because the version changed
|
||||
echo '0.0.1' > ${projectBuildDir}/VERSION
|
||||
|
||||
runHook postUnpack
|
||||
'';
|
||||
patchPhase = ''
|
||||
runHook prePatch
|
||||
|
||||
prevSet=$-
|
||||
set -e
|
||||
|
||||
patchShebangs ${projectBuildDir}
|
||||
|
||||
function patchMavenSource() {
|
||||
set +e
|
||||
|
||||
local targetGradleFile="$1"
|
||||
local source="$2"
|
||||
local deriv="$3"
|
||||
grep "$source" $targetGradleFile > /dev/null && \
|
||||
substituteInPlace $targetGradleFile --replace "$source" "$deriv"
|
||||
}
|
||||
|
||||
function patchMavenSources() {
|
||||
set +e
|
||||
|
||||
local targetGradleFile="$1"
|
||||
local deriv="$2"
|
||||
patchMavenSource $targetGradleFile 'mavenCentral()' 'mavenLocal()'
|
||||
patchMavenSource $targetGradleFile 'google()' 'mavenLocal()'
|
||||
patchMavenSource $targetGradleFile 'jcenter()' 'mavenLocal()'
|
||||
grep 'https://maven.google.com' $targetGradleFile > /dev/null && \
|
||||
substituteInPlace $targetGradleFile --replace 'https://maven.google.com' "$deriv"
|
||||
grep 'https://jitpack.io' $targetGradleFile > /dev/null && \
|
||||
substituteInPlace $targetGradleFile --replace 'https://jitpack.io' "$deriv"
|
||||
}
|
||||
|
||||
# Patch maven and google central repositories with our own local directories. This prevents the builder from downloading Maven artifacts
|
||||
patchMavenSources 'android/build.gradle' '${mavenLocalRepo}'
|
||||
for f in `find ${projectBuildDir}/node_modules/ -name build.gradle`; do
|
||||
patchMavenSources $f '${mavenLocalRepo}'
|
||||
done
|
||||
|
||||
# Do not add a BuildId to the generated libraries, for reproducibility
|
||||
substituteInPlace ${projectBuildDir}/node_modules/react-native/ReactAndroid/src/main/jni/Application.mk \
|
||||
--replace \
|
||||
'-Wl,--build-id' \
|
||||
'-Wl,--build-id=none'
|
||||
|
||||
# Disable Gradle daemon and caching, since that causes rebuilds (and subsequently errors) anyway due to cache being considered stale
|
||||
substituteInPlace ${projectBuildDir}/android/gradle.properties \
|
||||
--replace \
|
||||
'org.gradle.jvmargs=-Xmx8704M' \
|
||||
'org.gradle.jvmargs=-Xmx8704M
|
||||
org.gradle.daemon=false
|
||||
org.gradle.caching=false'
|
||||
|
||||
# Patch the path to nodejs in project.ext.react
|
||||
substituteInPlace ${projectBuildDir}/android/app/build.gradle \
|
||||
--replace \
|
||||
'nodeExecutableAndArgs: ["node"' \
|
||||
'nodeExecutableAndArgs: ["${nodejs}/bin/node"'
|
||||
|
||||
# Patch dependencies which are not yet ported to AndroidX
|
||||
npx jetify
|
||||
|
||||
set $prevSet
|
||||
|
||||
runHook postPatch
|
||||
'';
|
||||
installPhase = ''
|
||||
rm -rf $out
|
||||
mkdir -p $out/{project,.m2/repository}
|
||||
|
||||
# TODO: maybe node_modules/react-native/ReactAndroid/build/{tmp,generated} can be discarded?
|
||||
cp -R ${mavenRepoDir} $out/.m2/
|
||||
cp -R ${projectBuildDir}/{android,node_modules}/ $out/project
|
||||
'';
|
||||
fixupPhase = ''
|
||||
# Patch prepareJSC so that it doesn't subsequently try to build NDK libs
|
||||
substituteInPlace $out/project/node_modules/react-native/ReactAndroid/build.gradle \
|
||||
--replace \
|
||||
'packageReactNdkLibs(dependsOn: buildReactNdkLib, ' \
|
||||
'packageReactNdkLibs('
|
||||
'';
|
||||
|
||||
# The ELF types are incompatible with the host platform, so let's not even try
|
||||
# TODO: Use Android NDK to strip binaries manually
|
||||
dontPatchELF = true;
|
||||
dontStripHost = true;
|
||||
|
||||
# Take whole sources into consideration when calculating sha
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
};
|
||||
|
||||
in {
|
||||
deriv = deps;
|
||||
|
||||
shellHook = ''
|
||||
${createMobileFilesSymlinks "$STATUS_REACT_HOME"}
|
||||
|
||||
export STATUSREACT_NIX_MAVEN_REPO="${deps}/.m2/repository"
|
||||
'';
|
||||
}
|
||||
@@ -1,23 +1,24 @@
|
||||
{ config, stdenv, callPackage, target-os,
|
||||
gradle, status-go, composeXcodeWrapper }:
|
||||
gradle, status-go, composeXcodeWrapper, mkShell }:
|
||||
|
||||
with stdenv;
|
||||
|
||||
let
|
||||
platform = callPackage ../platform.nix { inherit target-os; };
|
||||
xcodewrapperArgs = {
|
||||
version = "10.1";
|
||||
version = "10.2.1";
|
||||
};
|
||||
xcodeWrapper = composeXcodeWrapper xcodewrapperArgs;
|
||||
androidPlatform = callPackage ./android.nix { inherit config gradle; };
|
||||
fastlane = callPackage ./fastlane { inherit stdenv target-os mkShell; };
|
||||
selectedSources =
|
||||
[ status-go ] ++
|
||||
[ fastlane status-go ] ++
|
||||
lib.optional platform.targetAndroid androidPlatform;
|
||||
|
||||
in
|
||||
{
|
||||
inherit (androidPlatform) androidComposition;
|
||||
inherit xcodewrapperArgs;
|
||||
inherit xcodewrapperArgs fastlane;
|
||||
|
||||
buildInputs =
|
||||
status-go.buildInputs ++
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
{ stdenv, target-os, callPackage, mkShell, makeWrapper,
|
||||
bundlerEnv, bundler, ruby, curl }:
|
||||
|
||||
let
|
||||
inherit (stdenv.lib) optionals optionalString unique;
|
||||
|
||||
platform = callPackage ../../platform.nix { inherit target-os; };
|
||||
useFastlanePkg = platform.targetAndroid && !stdenv.isDarwin;
|
||||
fastlane = callPackage ../../../fastlane {
|
||||
bundlerEnv = _:
|
||||
bundlerEnv {
|
||||
name = "fastlane-gems";
|
||||
gemdir = ../../../fastlane;
|
||||
};
|
||||
};
|
||||
bundlerDeps = optionals platform.targetMobile [
|
||||
bundler
|
||||
ruby
|
||||
]; # bundler/ruby used for fastlane on macOS
|
||||
shellHook = optionalString useFastlanePkg fastlane.shellHook;
|
||||
|
||||
# TARGETS
|
||||
shell = mkShell {
|
||||
buildInputs = if useFastlanePkg then [ fastlane curl ] else bundlerDeps;
|
||||
inherit shellHook;
|
||||
};
|
||||
|
||||
in {
|
||||
# We only include bundler in regular shell if targetting iOS, because that's how the CI builds the whole project
|
||||
buildInputs = unique (optionals (!useFastlanePkg && platform.targetIOS) bundlerDeps);
|
||||
inherit shellHook;
|
||||
|
||||
# TARGETS
|
||||
inherit shell;
|
||||
}
|
||||
@@ -33,4 +33,5 @@
|
||||
(def snoopy-buffer #js {})
|
||||
(def background-timer #js {:setTimeout (fn [cb ms] (js/setTimeout cb ms))})
|
||||
(def react-navigation (js/require "react-navigation"))
|
||||
(def react-native-shake #js {})
|
||||
(def react-native-mail #js {:mail (fn [])})
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
(def snoopy-buffer (js/require "rn-snoopy/stream/buffer"))
|
||||
(def background-timer (.-default (js/require "react-native-background-timer")))
|
||||
(def react-navigation (js/require "react-navigation"))
|
||||
(def react-native-shake (js/require "react-native-shake"))
|
||||
(def react-native-mail (.-default (js/require "react-native-mail")))
|
||||
(def desktop-linking #js {:addEventListener (fn [])})
|
||||
(def desktop-menu #js {:addEventListener (fn [])})
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@@ -90,7 +90,7 @@ case $1 in
|
||||
git apply $GIT_ROOT/ios/patches/ios-legacy-build-system.patch || \
|
||||
echo "Patch already applied"
|
||||
# CocoaPods are trash and can't handle other pod instances running at the same time
|
||||
$GIT_ROOT/scripts/wait-for.sh pod 240
|
||||
$GIT_ROOT/scripts/wait-for.sh 240 'pod install'
|
||||
pushd $GIT_ROOT/ios && pod install; popd
|
||||
fi
|
||||
fi
|
||||
|
||||
+14
-7
@@ -2,25 +2,32 @@
|
||||
|
||||
set -e
|
||||
|
||||
PROC_NAME=${1}
|
||||
TIMEOUT=${2:-600}
|
||||
TIMEOUT=${1}
|
||||
shift
|
||||
PGREP_FILTER=${@}
|
||||
SLEEP_SEC=5
|
||||
STEPS=$((TIMEOUT / SLEEP_SEC))
|
||||
# use UID to restrict search
|
||||
PGREP_OPTS="-U ${UID} -f"
|
||||
|
||||
if [[ -z ${PROC_NAME} ]]; then
|
||||
echo "No process name specified!" >&2
|
||||
if [[ -z ${PGREP_OPTS} ]]; then
|
||||
echo "No pgrep options name specified!" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Checking for process: '${PGREP_FILTER}'"
|
||||
for ((i = 0; i < ${STEPS}; i += 1)); do
|
||||
if pgrep -f ${PROC_NAME} > /dev/null; then
|
||||
if pgrep ${PGREP_OPTS} "${PGREP_FILTER}" > /dev/null; then
|
||||
echo "Process found. Sleeping ${SLEEP_SEC}..." >&2
|
||||
sleep ${SLEEP_SEC}
|
||||
else
|
||||
echo "Process '${PROC_NAME}' gone." >&2
|
||||
echo "Process '${PGREP_FILTER}' gone." >&2
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Timeout reached! (${TIMEOUT}s) Process still up: ${PROC_NAME}" >&2
|
||||
echo "Timeout reached! (${TIMEOUT}s) Process still up: ${PGREP_OPTS}" >&2
|
||||
echo "Following processes matched:"
|
||||
# show what is still up
|
||||
ps u $(pgrep -l ${PGREP_OPTS} "${PGREP_FILTER}" | cut -d' ' -f1 | xargs -I{} echo -n "-p {} ")
|
||||
exit 1
|
||||
|
||||
@@ -5,7 +5,7 @@ with pkgs;
|
||||
let
|
||||
projectDeps = import ./default.nix { inherit target-os; };
|
||||
platform = callPackage ./nix/platform.nix { inherit target-os; };
|
||||
useFastlanePkg = (platform.targetAndroid && !stdenv'.isDarwin);
|
||||
useFastlanePkg = (platform.targetIOS || (platform.targetAndroid && !stdenv'.isDarwin));
|
||||
# TODO: Try to use stdenv for iOS. The problem is with building iOS as the build is trying to pass parameters to Apple's ld that are meant for GNU's ld (e.g. -dynamiclib)
|
||||
stdenv' = stdenvNoCC;
|
||||
mkShell' = mkShell.override { stdenv = stdenv'; };
|
||||
@@ -30,8 +30,10 @@ in mkShell' {
|
||||
ps # used in scripts/start-react-native.sh
|
||||
unzip
|
||||
wget
|
||||
] ++
|
||||
(if useFastlanePkg then [ fastlane' ] else lib.optionals platform.targetMobile [ bundler ruby ]); # bundler/ruby used for fastlane on macOS
|
||||
fastlane'
|
||||
bundler
|
||||
ruby
|
||||
];
|
||||
inputsFrom = [ projectDeps ];
|
||||
TARGET_OS = target-os;
|
||||
shellHook = ''
|
||||
@@ -46,6 +48,15 @@ in mkShell' {
|
||||
$STATUS_REACT_HOME/scripts/setup
|
||||
touch $STATUS_REACT_HOME/.ran-setup
|
||||
fi
|
||||
|
||||
# HACK: see https://github.com/facebook/react-native/pull/25146/
|
||||
HACK_FILE='node_modules/react-native/React/Base/RCTModuleMethod.mm'
|
||||
set -x
|
||||
if [[ -f $HACK_FILE ]] && ! grep 'RCTReadString(input, "__attribute__((__unused__))' $HACK_FILE; then
|
||||
sed -i.bkp '/return RCTReadString/a RCTReadString(input, "__attribute__((__unused__))") ||' $HACK_FILE
|
||||
fi
|
||||
set +x
|
||||
|
||||
set +e
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -21,6 +21,9 @@
|
||||
(defn on-languages-change [event]
|
||||
(set! (.-locale rn-dependencies/i18n) (.-language event)))
|
||||
|
||||
(defn on-shake []
|
||||
(dispatch [:shake-event]))
|
||||
|
||||
(defn app-root [props]
|
||||
(let [keyboard-height (subscribe [:keyboard-height])]
|
||||
(reagent/create-class
|
||||
@@ -42,7 +45,10 @@
|
||||
(dispatch [:set :keyboard-height 0]))))
|
||||
(.hide react/splash-screen)
|
||||
(.addEventListener react/app-state "change" app-state-change-handler)
|
||||
(.addEventListener rn-dependencies/react-native-languages "change" on-languages-change))
|
||||
(.addEventListener rn-dependencies/react-native-languages "change" on-languages-change)
|
||||
(.addEventListener rn-dependencies/react-native-shake
|
||||
"ShakeEvent"
|
||||
on-shake))
|
||||
:component-did-mount
|
||||
(fn [this]
|
||||
(dispatch [:set-initial-props (reagent/props this)]))
|
||||
@@ -50,7 +56,10 @@
|
||||
(fn []
|
||||
(.stop react/http-bridge)
|
||||
(.removeEventListener react/app-state "change" app-state-change-handler)
|
||||
(.removeEventListener rn-dependencies/react-native-languages "change" on-languages-change))
|
||||
(.removeEventListener rn-dependencies/react-native-languages "change" on-languages-change)
|
||||
(.removeEventListener rn-dependencies/react-native-shake
|
||||
"ShakeEvent"
|
||||
on-shake))
|
||||
:display-name "root"
|
||||
:reagent-render views/main})))
|
||||
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
(defn default-account-settings []
|
||||
{:web3-opt-in? true
|
||||
:preview-privacy? false
|
||||
:show-public-launch-banner? true
|
||||
:wallet {:visible-tokens {:testnet #{:STT :HND}
|
||||
:mainnet #{:SNT}
|
||||
:rinkeby #{:MOKSHA :KDO}
|
||||
|
||||
@@ -2120,4 +2120,20 @@
|
||||
(fx/merge cofx
|
||||
(custom-tokens/remove-custom-token token)
|
||||
(when navigate-back?
|
||||
(navigation/navigate-back)))))
|
||||
(navigation/navigate-back)))))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:shake-event
|
||||
(fn [cofx _]
|
||||
(logging/show-logs-dialog cofx)))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:announcements.ui/banner-close-button-pressed
|
||||
(fn [{:keys [db] :as cofx} _]
|
||||
(let [settings (get-in db [:account/account :settings])]
|
||||
(accounts.update/update-settings cofx (assoc settings :show-public-launch-banner? false) {}))))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:browser.ui/open-url
|
||||
(fn [cofx [_ url]]
|
||||
(browser/open-url cofx url)))
|
||||
@@ -19,6 +19,9 @@
|
||||
(defn on-languages-change [event]
|
||||
(set! (.-locale rn-dependencies/i18n) (.-language event)))
|
||||
|
||||
(defn on-shake []
|
||||
(dispatch [:shake-event]))
|
||||
|
||||
(defn app-root [props]
|
||||
(let [keyboard-height (subscribe [:keyboard-height])]
|
||||
(reagent/create-class
|
||||
@@ -37,7 +40,10 @@
|
||||
(dispatch [:set :keyboard-height 0])))
|
||||
(.hide react/splash-screen)
|
||||
(.addEventListener react/app-state "change" app-state-change-handler)
|
||||
(.addEventListener rn-dependencies/react-native-languages "change" on-languages-change))
|
||||
(.addEventListener rn-dependencies/react-native-languages "change" on-languages-change)
|
||||
(.addEventListener rn-dependencies/react-native-shake
|
||||
"ShakeEvent"
|
||||
on-shake))
|
||||
:component-did-mount
|
||||
(fn [this]
|
||||
(dispatch [:set-initial-props (reagent/props this)]))
|
||||
@@ -45,7 +51,10 @@
|
||||
(fn []
|
||||
(.stop react/http-bridge)
|
||||
(.removeEventListener react/app-state "change" app-state-change-handler)
|
||||
(.removeEventListener rn-dependencies/react-native-languages "change" on-languages-change))
|
||||
(.removeEventListener rn-dependencies/react-native-languages "change" on-languages-change)
|
||||
(.removeEventListener rn-dependencies/react-native-shake
|
||||
"ShakeEvent"
|
||||
on-shake))
|
||||
:display-name "root"
|
||||
:reagent-render views/main})))
|
||||
|
||||
|
||||
@@ -16,4 +16,6 @@
|
||||
:warning-sign (js/require "./resources/images/ui/warning-sign.png")
|
||||
:phone-nfc-on (js/require "./resources/images/ui/phone-nfc-on.png")
|
||||
:phone-nfc-off (js/require "./resources/images/ui/phone-nfc-off.png")
|
||||
:dapp-store (js/require "./resources/images/ui/dapp-store.png")})
|
||||
:dapp-store (js/require "./resources/images/ui/dapp-store.png")
|
||||
:small-badge (js/require "./resources/images/ui/small-badge.png")
|
||||
:large-badge (js/require "./resources/images/ui/large-badge.png")})
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
:wallet {:type :wallet-tab}
|
||||
:wallet-stack {:type :wallet-tab}
|
||||
:profile-qr-viewer {:type :modal-white}
|
||||
:public-launch-announcement {:type :modal-white}
|
||||
:recipient-qr-code {:type :transparent}
|
||||
:wallet-send-assets {:type :wallet}
|
||||
:wallet-request-assets {:type :wallet}
|
||||
|
||||
@@ -0,0 +1,197 @@
|
||||
(ns status-im.ui.screens.announcements.views
|
||||
(:require-macros [status-im.utils.views :as views])
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.accounts.update.core :as accounts.update]
|
||||
[status-im.react-native.resources :as resources]
|
||||
[status-im.ui.components.icons.vector-icons :as icons]
|
||||
[status-im.ui.components.react :as react]
|
||||
[status-im.ui.components.status-bar.view :as status-bar]
|
||||
[status-im.ui.components.common.common :as components.common]
|
||||
[status-im.ui.components.colors :as colors]))
|
||||
|
||||
(views/defview public-launch-banner [style]
|
||||
(views/letsubs [{:keys [settings]} [:account/account]]
|
||||
(let [show-banner? (or (nil? (:show-public-launch-banner? settings))
|
||||
(:show-public-launch-banner? settings))]
|
||||
(when show-banner?
|
||||
[react/touchable-highlight
|
||||
{:on-press #(re-frame/dispatch [:navigate-to :public-launch-announcement])}
|
||||
[react/view {:background-color colors/white}
|
||||
[react/view (merge style
|
||||
{:background-color colors/green-transparent-10
|
||||
:justify-content :space-between
|
||||
:flex-direction :row
|
||||
:border-top-width 1
|
||||
:border-top-color colors/gray-light
|
||||
:border-bottom-width 1
|
||||
:border-bottom-color colors/gray-light})
|
||||
[react/image {:source (:small-badge resources/ui)
|
||||
:style {:height 64}}]
|
||||
[react/view {:flex 1
|
||||
:margin-vertical 10
|
||||
:margin-left -4}
|
||||
[react/text {:style {:typography :main-medium
|
||||
:line-height 22}}
|
||||
(i18n/label :t/status-launch-banner-title)]
|
||||
[react/text {:style {:line-height 22}}
|
||||
(i18n/label :t/stauts-launch-banner-text)]]
|
||||
[react/touchable-highlight
|
||||
{:style {:width 44
|
||||
:height 44
|
||||
:align-items :center
|
||||
:justify-content :center}
|
||||
:on-press #(re-frame/dispatch
|
||||
[:announcements.ui/banner-close-button-pressed])}
|
||||
[react/view {:width 21
|
||||
:height 21
|
||||
:border-radius 12
|
||||
:background-color colors/gray
|
||||
:align-items :center
|
||||
:justify-content :center}
|
||||
[icons/icon :main-icons/close {:color colors/white
|
||||
:width 19
|
||||
:height 19}]]]]]]))))
|
||||
|
||||
(defn public-launch-announcement []
|
||||
[react/view {:flex 1}
|
||||
[status-bar/status-bar {:type :modal-white}]
|
||||
[react/scroll-view
|
||||
[react/view {:justify-content :space-between
|
||||
:flex-direction :row}
|
||||
[react/touchable-highlight {:on-press #(re-frame/dispatch [:navigate-back])
|
||||
:style {:width 56
|
||||
:height 56
|
||||
:justify-content :center
|
||||
:align-items :center}
|
||||
:accessibility-label :done-button}
|
||||
[icons/icon :main-icons/close {}]]
|
||||
[react/view {:flex 1
|
||||
:margin-right 56
|
||||
:justify-content :center
|
||||
:align-items :center}
|
||||
[react/image {:source (:large-badge resources/ui)
|
||||
:style {:margin-top 4}}]]]
|
||||
[react/text {:style {:margin-top 0
|
||||
:margin-bottom 8
|
||||
:typography :header
|
||||
:text-align :center}}
|
||||
(i18n/label :t/status-launch-modal-title)]
|
||||
[react/text {:style {:margin-top 8
|
||||
;; :color colors/gray
|
||||
:line-height 21
|
||||
:font-size 15
|
||||
:margin-horizontal 16
|
||||
:text-align :center}}
|
||||
(i18n/label :t/status-launch-modal-text)]
|
||||
[react/text {:style {:color colors/gray
|
||||
:margin-horizontal 16
|
||||
:margin-top 22
|
||||
:margin-bottom 6
|
||||
:font-size 15
|
||||
:text-align :left}}
|
||||
(i18n/label :t/status-launch-modal-h2-what-new)]
|
||||
[react/view {:flex-direction :row
|
||||
:margin-horizontal 16
|
||||
:margin-top 6
|
||||
:align-items :center}
|
||||
[react/text {:style {:font-size 20}}
|
||||
"🔑"]
|
||||
[react/text {:style {:flex 1
|
||||
:margin-left 8}}
|
||||
(i18n/label :t/status-launch-modal-new-key)]]
|
||||
[react/view {:flex-direction :row
|
||||
:margin-horizontal 16
|
||||
:margin-top 8
|
||||
:align-items :center}
|
||||
[react/text {:style {:font-size 20}}
|
||||
"🗂"]
|
||||
[react/text {:style {:flex 1
|
||||
:margin-left 8}}
|
||||
(i18n/label :t/status-launch-modal-multi-account)]]
|
||||
[react/view {:flex-direction :row
|
||||
:margin-horizontal 16
|
||||
:margin-top 8
|
||||
:align-items :center}
|
||||
[react/text {:style {:font-size 20}}
|
||||
"💳"]
|
||||
[react/text {:style {:flex 1
|
||||
:margin-left 8}}
|
||||
(i18n/label :t/status-launch-modal-keycard)]]
|
||||
[react/view {:flex-direction :row
|
||||
:margin-horizontal 16
|
||||
:margin-top 8
|
||||
:align-items :center}
|
||||
[react/text {:style {:font-size 20}}
|
||||
"💬"]
|
||||
[react/text {:style {:flex 1
|
||||
:margin-left 8}}
|
||||
(i18n/label :t/status-launch-modal-ens-in-chat)]]
|
||||
[react/view {:flex-direction :row
|
||||
:margin-horizontal 16
|
||||
:margin-top 8
|
||||
:align-items :center}
|
||||
[react/text {:style {:font-size 20}}
|
||||
"🏇"]
|
||||
[react/text {:style {:flex 1
|
||||
:margin-left 8}}
|
||||
(i18n/label :t/status-launch-modal-perf-improvements)]]
|
||||
[react/text {:style {:color colors/gray
|
||||
:margin-horizontal 16
|
||||
:margin-top 6
|
||||
:font-size 15
|
||||
:text-align :left}}
|
||||
(i18n/label :t/status-launch-modal-much-more)]
|
||||
[react/view {:background-color colors/red-transparent-10
|
||||
:border-top-width 1
|
||||
:padding-horizontal 16
|
||||
:padding-top 10
|
||||
:margin-top 12
|
||||
:padding-bottom 12
|
||||
:margin-bottom 24
|
||||
:border-top-color colors/gray-light
|
||||
:border-bottom-width 1
|
||||
:border-bottom-color colors/gray-light}
|
||||
[react/text {:style {:typography :main-medium
|
||||
:line-height 22
|
||||
:color colors/red}}
|
||||
(i18n/label :t/status-launch-modal-before-you-update-title)]
|
||||
[react/text {:style {:line-height 22}}
|
||||
(i18n/label :t/status-launch-modal-before-you-update-text1)]
|
||||
[react/text {:style {:typography :main-semibold
|
||||
:line-height 22}}
|
||||
(i18n/label :t/status-launch-modal-before-you-update-text2)]
|
||||
[react/text {:style {:line-height 22}}
|
||||
(i18n/label :t/status-launch-modal-before-you-update-text3)]
|
||||
[react/text {:style {:padding-top 10
|
||||
:color colors/blue}
|
||||
:on-press #(do
|
||||
(re-frame/dispatch [:navigate-back])
|
||||
(re-frame/dispatch [:browser.ui/open-url "https://v1-changes-explained.status.im"]))}
|
||||
(i18n/label :t/status-launch-modal-before-you-update-learn-more)]]
|
||||
[react/text {:style {:color colors/gray
|
||||
:margin-horizontal 16
|
||||
:margin-bottom 6
|
||||
:font-size 15
|
||||
:text-align :left}}
|
||||
(i18n/label :t/status-launch-modal-when-title)]
|
||||
[react/nested-text {:style {:line-height 22
|
||||
:margin-horizontal 16}}
|
||||
(i18n/label :t/status-launch-modal-when-text1)
|
||||
[{:style {:color colors/blue} :on-press #(do
|
||||
(re-frame/dispatch [:navigate-back])
|
||||
(re-frame/dispatch [:chat.ui/start-public-chat "status"]))}
|
||||
(i18n/label :t/status-launch-modal-when-text2)]
|
||||
(i18n/label :t/status-launch-modal-when-text3)
|
||||
[{:style {:color colors/blue} :on-press #(do
|
||||
(re-frame/dispatch [:navigate-back])
|
||||
(re-frame/dispatch [:browser.ui/open-url "https://twitter.com/ethstatus"]))}
|
||||
(i18n/label :t/status-launch-modal-when-text4)]]
|
||||
[react/view {:align-items :center}
|
||||
[components.common/button {:button-style {:margin-vertical 30
|
||||
:padding-horizontal 32
|
||||
:justify-content :center
|
||||
:align-items :center}
|
||||
:on-press #(re-frame/dispatch [:navigate-back])
|
||||
:label (i18n/label :t/got-it)}]]]])
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
(def privacy-container
|
||||
{:margin-horizontal 16
|
||||
:margin-top 8
|
||||
:margin-vertical 8
|
||||
:border-color colors/gray-lighter
|
||||
:border-width 1
|
||||
:border-radius 12
|
||||
@@ -62,4 +62,4 @@
|
||||
:font-weight "500"
|
||||
:color colors/gray
|
||||
:line-height 18
|
||||
:margin-top 2})
|
||||
:margin-top 2})
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
[status-im.ui.components.icons.vector-icons :as vector-icons]
|
||||
[status-im.ui.components.radio :as radio]
|
||||
[status-im.ui.components.icons.vector-icons :as icons]
|
||||
[reagent.core :as reagent])
|
||||
[reagent.core :as reagent]
|
||||
[status-im.ui.screens.announcements.views :as announcements])
|
||||
(:require-macros [status-im.utils.views :as views]))
|
||||
|
||||
(defn list-item [{:keys [browser-id name url]}]
|
||||
@@ -92,7 +93,7 @@
|
||||
:style styles/input
|
||||
:accessibility-label :dapp-url-input
|
||||
:return-key-type :go}]
|
||||
[components/separator]
|
||||
[announcements/public-launch-banner {:margin-bottom 8}]
|
||||
(if (empty? browsers)
|
||||
[list-header true]
|
||||
[react/scroll-view
|
||||
|
||||
@@ -155,10 +155,8 @@
|
||||
:tint-color :white})
|
||||
|
||||
(def no-chats
|
||||
{:flex 1
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:margin-horizontal 34})
|
||||
{:flex 1
|
||||
:transform [{:translateY (- search-input-height)}]})
|
||||
|
||||
(def no-chats-text
|
||||
{:text-align :center
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
[status-im.ui.components.bottom-bar.styles :as tabs.styles]
|
||||
[status-im.ui.screens.home.views.inner-item :as inner-item]
|
||||
[status-im.ui.components.common.common :as components.common]
|
||||
[status-im.ui.components.list-selection :as list-selection])
|
||||
[status-im.ui.components.list-selection :as list-selection]
|
||||
[status-im.ui.screens.announcements.views :as announcements])
|
||||
(:require-macros [status-im.utils.views :as views]))
|
||||
|
||||
(views/defview les-debug-info []
|
||||
@@ -52,10 +53,16 @@
|
||||
|
||||
(defn home-empty-view []
|
||||
[react/view styles/no-chats
|
||||
[react/i18n-text {:style styles/no-chats-text :key :no-recent-chats}]
|
||||
[react/view {:align-items :center :margin-top 20}
|
||||
[components.common/button {:on-press #(list-selection/open-share {:message (i18n/label :t/get-status-at)})
|
||||
:label (i18n/label :t/invite-friends)}]]])
|
||||
[announcements/public-launch-banner {}]
|
||||
[react/view {:flex 1
|
||||
:align-items :center
|
||||
:justify-content :center
|
||||
:padding-horizontal 34
|
||||
:align-self :stretch}
|
||||
[react/i18n-text {:style styles/no-chats-text :key :no-recent-chats}]
|
||||
[react/view {:align-items :center :margin-top 20}
|
||||
[components.common/button {:on-press #(list-selection/open-share {:message (i18n/label :t/get-status-at)})
|
||||
:label (i18n/label :t/invite-friends)}]]]])
|
||||
|
||||
(defn home-items-view [_ _ _]
|
||||
(let [previous-touch (reagent/atom nil)
|
||||
@@ -86,6 +93,7 @@
|
||||
previous-position)))
|
||||
(filter.views/show-search!)))
|
||||
false)}))
|
||||
[announcements/public-launch-banner {}]
|
||||
[list/flat-list {:data all-home-items
|
||||
:key-fn first
|
||||
:footer [react/view
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
[status-im.utils.identicon :as identicon]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.universal-links.core :as universal-links]
|
||||
[status-im.utils.utils :as utils])
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im.ui.screens.announcements.views :as announcements])
|
||||
(:require-macros [status-im.utils.views :refer [defview letsubs]]))
|
||||
|
||||
(defn my-profile-toolbar []
|
||||
@@ -356,6 +357,7 @@
|
||||
(profile-icon-options-ext)
|
||||
profile-icon-options)
|
||||
:on-change-text-event :my-profile/update-name}]]
|
||||
[announcements/public-launch-banner {:margin-bottom 8}]
|
||||
[share-profile-item (dissoc current-account :mnemonic)]
|
||||
[contacts-list-item active-contacts-count]
|
||||
(when config/tr-to-talk-enabled?
|
||||
|
||||
@@ -27,4 +27,5 @@
|
||||
:wallet-transaction-fee
|
||||
:wallet-transactions-filter
|
||||
:profile-qr-viewer
|
||||
:welcome])
|
||||
:public-launch-announcement
|
||||
:welcome])
|
||||
@@ -78,7 +78,8 @@
|
||||
:as
|
||||
transaction-sent]
|
||||
[status-im.ui.screens.wallet.transactions.views :as wallet-transactions]
|
||||
[status-im.ui.screens.wallet.custom-tokens.views :as custom-tokens]))
|
||||
[status-im.ui.screens.wallet.custom-tokens.views :as custom-tokens]
|
||||
[status-im.ui.screens.announcements.views :as announcements]))
|
||||
|
||||
(def all-screens
|
||||
{:login login/login
|
||||
@@ -175,7 +176,8 @@
|
||||
:reset-card hardwallet.settings/reset-card
|
||||
:keycard-settings hardwallet.settings/keycard-settings
|
||||
:mobile-network-settings mobile-network-settings/mobile-network-settings
|
||||
:welcome [:modal home/welcome]})
|
||||
:welcome [:modal home/welcome]
|
||||
:public-launch-announcement [:modal announcements/public-launch-announcement]})
|
||||
|
||||
(defn get-screen [screen]
|
||||
(get all-screens screen #(throw (str "Screen " screen " is not defined."))))
|
||||
|
||||
@@ -6,7 +6,12 @@
|
||||
[status-im.utils.handlers :as handlers]
|
||||
[status-im.utils.email :as mail]
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.utils.config :as config]))
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.utils.platform :as platform]
|
||||
[status-im.utils.build :as build]
|
||||
[status-im.transport.utils :as transport.utils]
|
||||
[status-im.utils.datetime :as datetime]))
|
||||
|
||||
(def report-email "error-reports@status.im")
|
||||
(def max-log-entries 1000)
|
||||
@@ -63,14 +68,79 @@
|
||||
:node/status]))]
|
||||
{:logs/archive-logs [db-json ::send-email]}))
|
||||
|
||||
(fx/defn show-logs-dialog
|
||||
[{:keys [db]}]
|
||||
(when-not (:logging/dialog-shown? db)
|
||||
{:db
|
||||
(assoc db :logging/dialog-shown? true)
|
||||
:utils/show-confirmation
|
||||
{:title (i18n/label :t/send-logs)
|
||||
:content (i18n/label :t/send-logs-to
|
||||
{:email report-email})
|
||||
:confirm-button-text (i18n/label :t/send-logs)
|
||||
:on-accept #(re-frame/dispatch
|
||||
[:logging.ui/send-logs-pressed])
|
||||
:on-cancel #(re-frame/dispatch
|
||||
[:logging/dialog-canceled])}}))
|
||||
|
||||
(fx/defn dialog-closed
|
||||
[{:keys [db]}]
|
||||
{:db (dissoc db :logging/dialog-shown?)})
|
||||
|
||||
(defn email-body
|
||||
[{:keys [:web3-node-version :mailserver/current-id
|
||||
:node-info :peers-summary]
|
||||
:as db}]
|
||||
"logs attached"
|
||||
(let [build-number (if platform/desktop? build/version build/build-no)
|
||||
build-version (str build/version " (" build-number ")")
|
||||
separator (clojure.string/join (take 40 (repeat "-")))
|
||||
[enode-id ip-address port]
|
||||
(transport.utils/extract-url-components (:enode node-info))]
|
||||
(clojure.string/join
|
||||
"\n"
|
||||
(concat [(i18n/label :t/report-bug-email-template)]
|
||||
[separator
|
||||
(str "App version: " build-version)
|
||||
(str "OS: " platform/os)
|
||||
(str "Node version: " web3-node-version)
|
||||
(str "Mailserver: " (name current-id))
|
||||
separator
|
||||
"Node Info"
|
||||
(str "id: " enode-id)
|
||||
(str "ip: " ip-address)
|
||||
(str "port: " port)
|
||||
separator
|
||||
"Peers"]
|
||||
(mapcat
|
||||
(fn [{:keys [enode]}]
|
||||
(let [[enode-id ip-address port]
|
||||
(transport.utils/extract-url-components enode)]
|
||||
[(str "id: " enode-id)
|
||||
(str "ip: " ip-address)
|
||||
(str "port: " port)
|
||||
"\n"]))
|
||||
peers-summary)
|
||||
[separator
|
||||
(datetime/timestamp->long-date
|
||||
(datetime/now))]))))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
::send-email
|
||||
(fn [cofx [_ archive-path]]
|
||||
(mail/send-email cofx
|
||||
{:subject "Error report"
|
||||
:recipients [report-email]
|
||||
:body "logs attached"
|
||||
:attachment {:path archive-path
|
||||
:type "zip"
|
||||
:name "status_logs.zip"}}
|
||||
(fn []))))
|
||||
(fn [{:keys [db] :as cofx} [_ archive-path]]
|
||||
(fx/merge
|
||||
cofx
|
||||
(dialog-closed)
|
||||
(mail/send-email
|
||||
{:subject "Error report"
|
||||
:recipients [report-email]
|
||||
:body (email-body db)
|
||||
:attachment {:path archive-path
|
||||
:type "zip"
|
||||
:name "status_logs.zip"}}
|
||||
(fn [])))))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:logging/dialog-canceled
|
||||
(fn [cofx]
|
||||
(dialog-closed cofx)))
|
||||
|
||||
@@ -105,6 +105,7 @@
|
||||
:desktop-notifications? false
|
||||
:settings {:web3-opt-in? true
|
||||
:preview-privacy? true
|
||||
:show-public-launch-banner? true
|
||||
:fleet :eth.beta
|
||||
:wallet {:visible-tokens {:testnet #{:STT
|
||||
:HND}
|
||||
|
||||
+25
-2
@@ -424,7 +424,8 @@
|
||||
"logout": "Log out",
|
||||
"status-not-sent-tap": "Not confirmed. Tap for options",
|
||||
"status-not-sent-click": "Not confirmed. Click for options",
|
||||
"send-logs": "Send logs",
|
||||
"send-logs": "Report a bug",
|
||||
"send-logs-to": "Report a bug to {{email}}",
|
||||
"edit-network-config": "Edit network config",
|
||||
"clear-history-confirmation": "Clear history?",
|
||||
"currency-display-name-gyd": "Guyana Dollar",
|
||||
@@ -1048,5 +1049,27 @@
|
||||
"wrong-address" : "Wrong address",
|
||||
"default" : "Default",
|
||||
"token-details" : "Token details",
|
||||
"remove-token" : "Remove token"
|
||||
"remove-token" : "Remove token",
|
||||
"report-bug-email-template": "1. Issue Description\n(Describe the feature you would like, or briefly summarise the bug and what you did, what you expected to happen, and what actually happens. Sections below)\n\n\n2. Steps to reproduce\n(Describe how we can replicate the bug step by step.)\n-Open Status\n-...\n-Step 3, etc.\n\n\n3. Expected behavior\n(Describe what you expected to happen.)\n\n\n4. Actual behavior\n(Describe what actually happened.)\n\n\n5. Attach screenshots that can demo the problem, please\n",
|
||||
"status-launch-banner-title": "Status 1.0 is coming!",
|
||||
"stauts-launch-banner-text": "Your account will be affected.\nTap to learn more",
|
||||
"status-launch-modal-title": "Status 1.0 coming",
|
||||
"status-launch-modal-text": "Status is taking important steps toward a more secure, censorship resistant network. Thanks for being part of beta; we're sure you'll love v1.0!",
|
||||
"status-launch-modal-h2-what-new": "What's new",
|
||||
"status-launch-modal-new-key": "New key structure for more privacy",
|
||||
"status-launch-modal-multi-account": "Add and manage multiple accounts",
|
||||
"status-launch-modal-keycard": "Use Status Keycard",
|
||||
"status-launch-modal-ens-in-chat": "ENS usernames in chat",
|
||||
"status-launch-modal-perf-improvements": "Performance improvements",
|
||||
"status-launch-modal-much-more": "...and much more!",
|
||||
"status-launch-modal-before-you-update-title": "Before you update",
|
||||
"status-launch-modal-before-you-update-text1": "To use your current wallet in version 1.0, you will need to recover it using your recovery phrase.",
|
||||
"status-launch-modal-before-you-update-text2": "Please make sure you have your recovery phrase handy!",
|
||||
"status-launch-modal-before-you-update-text3": "If it's lost, transfer your funds to another secure wallet as soon as possible. Your contact details will change as well.",
|
||||
"status-launch-modal-before-you-update-learn-more": "Learn more ↗",
|
||||
"status-launch-modal-when-title": "When?",
|
||||
"status-launch-modal-when-text1": "We're aiming to release version 1.0 in late 2019. To receive a heads up about the launch, track our progress in ",
|
||||
"status-launch-modal-when-text2": "#status",
|
||||
"status-launch-modal-when-text3": " or on ",
|
||||
"status-launch-modal-when-text4": "Twitter."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user