Skip to content

Commit

Permalink
Merge branch 'status-im:develop' into password-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dangarbri authored Mar 26, 2022
2 parents ad597a9 + 79a5dcf commit 22db84a
Show file tree
Hide file tree
Showing 214 changed files with 1,510 additions and 787 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.18.0
1.19.0
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.android
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'

pipeline {
agent { label 'linux && x86_64 && nix-2.3' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.combined
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'

pipeline {
agent { label 'linux' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'

pipeline {
agent { label 'macos && x86_64 && nix-2.3 && xcode-12.5' }
Expand Down
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.nix-cache
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library 'status-jenkins-lib@v1.3.3'
library 'status-jenkins-lib@v1.3.5'

pipeline {
agent { label params.AGENT_LABEL }
Expand Down
19 changes: 12 additions & 7 deletions doc/STARTING_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,6 @@ make shell TARGET=android
```
This step will take a while the first time as it will download all dependencies.

To build the app, your can simply run on of the following:
```
make release-android
make release-ios
```
For more `make` targets run `make help`.

# Development

There are three steps necessary to start development, in this case for Android:
Expand All @@ -28,6 +21,18 @@ There are three steps necessary to start development, in this case for Android:
The first two will continue watching for changes and keep re-building the app. They need to be ready first.
The last one will exit once the app is up and ready.

You need to have your emulator or real devices running and visible to adb, before you run `make run-android`.

# Build release

To build the app, your can simply run on of the following:
```
make release-android
make release-ios
```

For more `make` targets run `make help`.

# Updating Dependencies

* `make nix-update-pods` - iOS CocoaPods dependencies (updates `ios/Podfile` and `ios/Podfile.loc`)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file modified fastlane/metadata/android/en-US/images/phoneScreenshots/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file modified fastlane/metadata/android/es-419/images/phoneScreenshots/1.jpg
Binary file modified fastlane/metadata/android/es-419/images/phoneScreenshots/2.jpg
Binary file modified fastlane/metadata/android/es-419/images/phoneScreenshots/3.jpg
Binary file modified fastlane/metadata/android/es-AR/images/phoneScreenshots/1.jpg
Binary file modified fastlane/metadata/android/es-AR/images/phoneScreenshots/2.jpg
Binary file modified fastlane/metadata/android/es-AR/images/phoneScreenshots/3.jpg
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/1.jpg
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/2.jpg
Binary file modified fastlane/metadata/android/es-ES/images/phoneScreenshots/3.jpg
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/1.jpg
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/2.jpg
Binary file modified fastlane/metadata/android/it-IT/images/phoneScreenshots/3.jpg
Binary file modified fastlane/metadata/android/ko-KR/images/phoneScreenshots/1.jpg
Binary file modified fastlane/metadata/android/ko-KR/images/phoneScreenshots/2.jpg
Binary file modified fastlane/metadata/android/ko-KR/images/phoneScreenshots/3.jpg
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/1.jpg
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/2.jpg
Binary file modified fastlane/metadata/android/ru-RU/images/phoneScreenshots/3.jpg
Binary file modified fastlane/metadata/android/zh-CN/images/phoneScreenshots/1.jpg
Binary file modified fastlane/metadata/android/zh-CN/images/phoneScreenshots/2.jpg
Binary file modified fastlane/metadata/android/zh-CN/images/phoneScreenshots/3.jpg
2 changes: 1 addition & 1 deletion nix/mobile/android/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ in {
export STATUS_NIX_MAVEN_REPO="${deps.gradle}"
# required by some makefile targets
export STATUS_GO_ANDROID_LIBDIR=${status-go}
export STATUS_GO_ANDROID_LIBDIR=${status-go {}}
# check if node modules changed and if so install them
$STATUS_REACT_HOME/nix/scripts/node_modules.sh ${deps.nodejs-patched}
Expand Down
2 changes: 1 addition & 1 deletion nix/mobile/android/release.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ in stdenv.mkDerivation rec {
ANDROID_NDK_ROOT = "${androidPkgs.ndk}";

# Used by the Android Gradle build script in android/build.gradle
STATUS_GO_ANDROID_LIBDIR = "${status-go}";
STATUS_GO_ANDROID_LIBDIR = status-go { inherit secretsFile; };

phases = [
"unpackPhase" "secretsPhase" "keystorePhase"
Expand Down
2 changes: 1 addition & 1 deletion nix/mobile/ios/status-go-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

mkShell {
shellHook = ''
export STATUS_GO_IOS_LIBDIR=${status-go}/Statusgo.framework
export STATUS_GO_IOS_LIBDIR=${status-go {}}/Statusgo.framework
RCTSTATUS_DIR="$STATUS_REACT_HOME/modules/react-native-status/ios/RCTStatus"
targetBasename='Statusgo.framework'
Expand Down
19 changes: 18 additions & 1 deletion nix/status-go/mobile/build.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
, goBuildLdFlags ? [ ]
, outputFileName ? "status-go-${source.shortRev}-${platform}.aar" }:

# Path to the file containing secret environment variables
{ secretsFile ? "" }:

let
inherit (stdenv) isDarwin;
inherit (lib)
Expand All @@ -34,6 +37,18 @@ in buildGo116Package {
# Fixes Cgo related build failures (see https://github.com/NixOS/nixpkgs/issues/25959 )
hardeningDisable = [ "fortify" ];

phases = [
"unpackPhase" "secretsPhase" "configurePhase"
"buildPhase" "installPhase" "fixupPhase"
];

# if secretsFile is not set we use generate keystore
secretsPhase = if (secretsFile != "") then ''
source "${secretsFile}"
'' else ''
echo "No secrets provided!"
'';

# Ensure XCode is present for iOS build, instead of failing at the end of the build
preConfigure = optionalString (isDarwin && platform == "ios") utils.enforceXCodeAvailable;

Expand All @@ -54,7 +69,9 @@ in buildGo116Package {

# Build the Go library using gomobile for each of the configured platforms
buildPhase = let
ldFlags = [ "-extldflags=-Wl,--allow-multiple-definition" ] ++ goBuildLdFlags;
ldFlags = [ "-extldflags=-Wl,--allow-multiple-definition" ]
++ lib.optionals (secretsFile != "") ["-X node.OpenseaKeyFromEnv=$OPENSEA_API_KEY"]
++ goBuildLdFlags;
CGO_LDFLAGS = concatStringsSep " " ldFlags;
in ''
runHook preBuild
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@react-native-community/push-notification-ios": "^1.4.1",
"@react-native-community/slider": "^3.0.0",
"@walletconnect/client": "^2.0.0-beta.23",
"@walletconnect/client-legacy": "npm:@walletconnect/client@^1.7.1",
"bignumber.js": "git+https://github.com/status-im/bignumber.js.git#v4.0.2-status",
"buffer": "^5.4.2",
"chance": "^1.1.0",
Expand Down
12 changes: 6 additions & 6 deletions scripts/hooks/prepare-commit-msg
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ GITHUB_LINK="${GITHUB_LINK_PREFIX}${GO_COMMIT_MERGE_BASE}...${GO_COMMIT_CURRENT}

COMMIT_MSG_FILE=$1
# Check if the commit message already contains the link (rebase) and update otherwise insert into line2
# temporary comment out because of the error on macos
#if ! grep -qF "${GITHUB_LINK_PREFIX}" "${COMMIT_MSG_FILE}" >/dev/null; then
# sed -in "2i${GITHUB_LINK}\n" "${COMMIT_MSG_FILE}"
#else
# sed -in "s;^${GITHUB_LINK_PREFIX}.*$;${GITHUB_LINK};" "${COMMIT_MSG_FILE}"
#fi
if ! grep -qF "${GITHUB_LINK_PREFIX}" "${COMMIT_MSG_FILE}" >/dev/null; then
sed -in'' -e "2i\\
${GITHUB_LINK}\n" "${COMMIT_MSG_FILE}"
else
sed -in'' -e "s;^${GITHUB_LINK_PREFIX}.*$;${GITHUB_LINK};" "${COMMIT_MSG_FILE}"
fi
3 changes: 3 additions & 0 deletions scripts/release-android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ fi
if [[ -n "${INFURA_TOKEN}" ]]; then
append_env_export 'INFURA_TOKEN'
fi
if [[ -n "${OPENSEA_API_KEY}" ]]; then
append_env_export 'OPENSEA_API_KEY'
fi

# Used by Clojure at compile time for remove import of react-native-notifications for fdroid release
if [[ -n "${READER_FEATURES}" ]]; then
Expand Down
57 changes: 57 additions & 0 deletions src/quo2/components/counter.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
(ns quo2.components.counter
(:require [quo.theme :as theme]
[quo.react-native :as rn]
[quo2.components.text :as text]
[quo2.foundations.colors :as colors]))

(def themes
{:light {:default colors/primary-50
:secondary colors/black-opa-5
:grey colors/neutral-30}
:dark {:default colors/primary-60
:secondary colors/white-opa-10
:grey colors/neutral-70}})

(defn get-color [key]
(get-in themes [(theme/get-theme) key]))

(defn counter
"type: default, secondary, grey
outline: true, false
value: integer"
[{:keys [type outline]} value]
(let [type (or type :default)
text-color (if (or
(= (theme/get-theme) :dark)
(and
(= type :default)
(not outline)))
colors/white
colors/black)
value (if (integer? value)
value
(js/parseInt value))
label (if (> value 99)
"99+"
(str value))
width (case (count label)
1 16
2 20
28)]
[rn/view {:style (cond-> {:align-items :center
:justify-content :center
:border-radius 6
:width width
:height 16}
outline
(merge {:border-width 1
:border-color (get-color (or type :default))})

(not outline)
(assoc :background-color (get-color (or type :default)))

(> value 99)
(assoc :padding-left 0.5))}
[text/text {:weight :medium
:size :label
:style {:color text-color}} label]]))
4 changes: 2 additions & 2 deletions src/quo2/foundations/typography.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

(def label {:font-size 11
:line-height 15.62
:letter-spacing 0.5})
:letter-spacing -0.055})

(def font-regular {:font-family "Inter-Regular"}) ; 400

Expand All @@ -28,4 +28,4 @@

(def font-bold {:font-family "Inter-Bold"}) ; 700

(def monospace {:font-family "InterStatus-Regular"})
(def monospace {:font-family "InterStatus-Regular"})
40 changes: 40 additions & 0 deletions src/quo2/screens/counter.cljs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
(ns quo2.screens.counter
(:require [quo.react-native :as rn]
[quo.previews.preview :as preview]
[reagent.core :as reagent]
[quo2.components.counter :as quo2]
[quo.design-system.colors :as colors]))

(def descriptor [{:label "Type:"
:key :type
:type :select
:options [{:key :default
:value "Default"}
{:key :secondary
:value "Secondary"}
{:key :grey
:value "Gray"}]}
{:label "Outline?:"
:key :outline
:type :boolean}
{:label "Value"
:key :value
:type :text}])

(defn cool-preview []
(let [state (reagent/atom {:value 5 :type :default})]
(fn []
[rn/view {:margin-bottom 50
:padding 16}
[preview/customizer state descriptor]
[rn/view {:padding-vertical 60
:align-items :center}
[quo2/counter @state (:value @state)]]])))

(defn preview-counter []
[rn/view {:background-color (:ui-background @colors/theme)
:flex 1}
[rn/flat-list {:flex 1
:keyboardShouldPersistTaps :always
:header [cool-preview]
:key-fn str}]])
8 changes: 6 additions & 2 deletions src/quo2/screens/main.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
[quo2.screens.button :as button]
[quo2.screens.text :as text]
[quo2.screens.tabs :as tabs]
[quo2.screens.counter :as counter]
[quo2.screens.segmented :as segmented]
[quo.core :as quo]))

Expand All @@ -20,7 +21,10 @@
:component tabs/preview-tabs}
{:name :quo2-segmented
:insets {:top false}
:component segmented/preview-segmented}])
:component segmented/preview-segmented}
{:name :quo2-counter
:insets {:top false}
:component counter/preview-counter}])

(defn theme-switcher []
[rn/view {:style {:flex-direction :row
Expand Down Expand Up @@ -60,4 +64,4 @@

(def main-screens [{:name :quo2-preview
:insets {:top false}
:component main-screen}])
:component main-screen}])
6 changes: 4 additions & 2 deletions src/status_im/chat/models/link_preview.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@
{:events [::community-resolved]}
[{:keys [db] :as cofx} community-id community]
(fx/merge cofx
{:db (community-resolved db community-id)
:dispatch [::cache-link-preview-data (community-link community-id) community]}
(cond-> {:db (community-resolved db community-id)}
(some? community)
(assoc :dispatch [::cache-link-preview-data
(community-link community-id) community]))
(models.communities/handle-community community)))

(fx/defn resolve-community-info
Expand Down
3 changes: 1 addition & 2 deletions src/status_im/chat/models/message.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,7 @@
(fx/defn update-message-status
[{:keys [db] :as cofx} chat-id message-id status]
(fx/merge cofx
(update-db-message-status chat-id message-id status)
(data-store.messages/update-outgoing-status message-id status)))
(update-db-message-status chat-id message-id status)))

(fx/defn resend-message
[{:keys [db] :as cofx} chat-id message-id]
Expand Down
3 changes: 2 additions & 1 deletion src/status_im/communities/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@

(fx/defn handle-community
[{:keys [db]} {:keys [id] :as community}]
{:db (assoc-in db [:communities id] (<-rpc community))})
(when id
{:db (assoc-in db [:communities id] (<-rpc community))}))

(fx/defn handle-communities
{:events [::fetched]}
Expand Down
3 changes: 3 additions & 0 deletions src/status_im/constants.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,6 @@
(def ^:const visibility-status-dnd 2)
(def ^:const visibility-status-always-online 3)
(def ^:const visibility-status-inactive 4)

(def ^:const wallet-connect-version-1 1)
(def ^:const wallet-connect-version-2 2)
9 changes: 0 additions & 9 deletions src/status_im/data_store/messages.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,6 @@
:outgoing (boolean (:outgoingStatus message)))
(dissoc :ensName :chatId :text :rtl :responseTo :image :sticker :lineCount :parsedText :links)))

(defn update-outgoing-status-rpc [message-id status]
{::json-rpc/call [{:method (json-rpc/call-ext-method "updateMessageOutgoingStatus")
:params [message-id status]
:on-success #(log/debug "updated message outgoing stauts" message-id status)
:on-failure #(log/error "failed to update message outgoing status" message-id status %)}]})

(defn messages-by-chat-id-rpc [chat-id
cursor
limit
Expand Down Expand Up @@ -101,8 +95,5 @@
(fx/defn mark-messages-seen [cofx chat-id ids on-success]
(mark-seen-rpc chat-id ids on-success))

(fx/defn update-outgoing-status [cofx message-id status]
(update-outgoing-status-rpc message-id status))

(fx/defn delete-messages-by-chat-id [cofx chat-id]
(delete-messages-by-chat-id-rpc chat-id))
Loading

0 comments on commit 22db84a

Please sign in to comment.