Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into cl-21618-dapps-key…
Browse files Browse the repository at this point in the history
…card-signing
  • Loading branch information
clauxx committed Jan 17, 2025
2 parents 6be8ed4 + 174e44c commit 3c8d497
Show file tree
Hide file tree
Showing 20 changed files with 141 additions and 59 deletions.
2 changes: 1 addition & 1 deletion ci/Jenkinsfile.ios
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ library '[email protected]'
def isPRBuild = utils.isPRBuild()

pipeline {
agent { label 'macos && arm64 && nix-2.24 && xcode-15.1' }
agent { label 'macos && arm64 && nix-2.24 && xcode-16.2' }

parameters {
string(
Expand Down
39 changes: 21 additions & 18 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,18 @@ PODS:
- secp256k1
- SSZipArchive
- libevent (2.1.12)
- libwebp (1.2.4):
- libwebp/demux (= 1.2.4)
- libwebp/mux (= 1.2.4)
- libwebp/webp (= 1.2.4)
- libwebp/demux (1.2.4):
- libwebp (1.3.2):
- libwebp/demux (= 1.3.2)
- libwebp/mux (= 1.3.2)
- libwebp/sharpyuv (= 1.3.2)
- libwebp/webp (= 1.3.2)
- libwebp/demux (1.3.2):
- libwebp/webp
- libwebp/mux (1.2.4):
- libwebp/mux (1.3.2):
- libwebp/demux
- libwebp/webp (1.2.4)
- libwebp/sharpyuv (1.3.2)
- libwebp/webp (1.3.2):
- libwebp/sharpyuv
- RCT-Folly (2022.05.16.00):
- boost
- DoubleConversion
Expand Down Expand Up @@ -1152,15 +1155,15 @@ PODS:
- glog
- RCT-Folly (= 2022.05.16.00)
- React-Core
- RNImageCropPicker (0.40.0):
- RNImageCropPicker (0.41.2):
- React-Core
- React-RCTImage
- RNImageCropPicker/QBImagePickerController (= 0.40.0)
- TOCropViewController
- RNImageCropPicker/QBImagePickerController (0.40.0):
- RNImageCropPicker/QBImagePickerController (= 0.41.2)
- TOCropViewController (~> 2.7.4)
- RNImageCropPicker/QBImagePickerController (0.41.2):
- React-Core
- React-RCTImage
- TOCropViewController
- TOCropViewController (~> 2.7.4)
- RNKeychain (8.1.2):
- React-Core
- RNLinearGradient (3.0.0-alpha.1):
Expand Down Expand Up @@ -1189,7 +1192,7 @@ PODS:
- secp256k1 (0.1.6)
- SocketRocket (0.6.1)
- SSZipArchive (2.4.3)
- TOCropViewController (2.6.1)
- TOCropViewController (2.7.4)
- Yoga (1.14.0)

DEPENDENCIES:
Expand Down Expand Up @@ -1489,7 +1492,7 @@ CHECKOUT OPTIONS:
:git: https://github.com/status-im/Keycard.swift.git
:tag: 3.1.1
secp256k1:
:commit: 46a1fa30d9b8babeae85ff519050f42394ab5fcc
:commit: 4ab977cc2b2d7319be858bcb30a5d189bb149884
:git: https://github.com/status-im/secp256k1.swift.git
:submodules: true

Expand All @@ -1506,7 +1509,7 @@ SPEC CHECKSUMS:
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
Keycard: 3bd24405b9a875b3b3cf1ab1be69b5c30c5f28bc
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009
RCT-Folly: 7169b2b1c44399c76a47b5deaaba715eeeb476c0
RCTRequired: 2544c0f1081a5fa12e108bb8cb40e5f4581ccd87
RCTTypeSafety: 50efabe2b115c11ed03fbf3fd79e2f163ddb5d7c
Expand Down Expand Up @@ -1577,7 +1580,7 @@ SPEC CHECKSUMS:
RNFastImage: 1f2cab428712a4baaf78d6169eaec7f622556dd7
RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df
RNGestureHandler: 15c6ef51acba34c49ff03003806cf5dd6098f383
RNImageCropPicker: 486e2f7e2b0461ce24321f751410dce1b3b49e6d
RNImageCropPicker: 771e2ca319d2cf92e04ebf334ece892ee9a6728f
RNKeychain: a65256b6ca6ba6976132cc4124b238a5b13b3d9c
RNLinearGradient: ccaaebce083b54180da61d992e7fa56abfe000d6
RNPermissions: 08e619529cced22695f4b6d0efcc0a233e278903
Expand All @@ -1590,9 +1593,9 @@ SPEC CHECKSUMS:
secp256k1: f61d67e6fdcb85fd727acf1bf35ace6036db540c
SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17
SSZipArchive: fe6a26b2a54d5a0890f2567b5cc6de5caa600aef
TOCropViewController: edfd4f25713d56905ad1e0b9f5be3fbe0f59c863
TOCropViewController: 80b8985ad794298fb69d3341de183f33d1853654
Yoga: a716eea57d0d3430219c0a5a233e1e93ee931eb7

PODFILE CHECKSUM: 81a66b45adddb083171ade882c343deb4faf2a8b
PODFILE CHECKSUM: 56d9f695324306d6db368d1172d211dfab55b7cb

COCOAPODS: 1.15.2
6 changes: 6 additions & 0 deletions ios/StatusIm.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -572,13 +572,15 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/RNImageCropPickerPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNPermissions/RNPermissionsPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNImageCropPickerPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNPermissionsPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
Expand Down Expand Up @@ -614,13 +616,15 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/RNImageCropPickerPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNPermissions/RNPermissionsPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNImageCropPickerPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNPermissionsPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
Expand Down Expand Up @@ -728,13 +732,15 @@
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/RNImageCropPickerPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker/QBImagePicker.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/RNPermissions/RNPermissionsPrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/React-Core/RCTI18nStrings.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNImageCropPickerPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNPermissionsPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
Expand Down
2 changes: 1 addition & 1 deletion nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ in {
yarn = super.yarn.override { nodejs = super.nodejs_20; };
openjdk = super.openjdk17_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
versions = ["15.1" "15.2" "15.3" "15.4"];
versions = ["16.0" "16.1" "16.2"];
};
go = super.go_1_21;
clang = super.clang_15;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"react-native-get-random-values": "^1.11.0",
"react-native-gifted-charts": "^1.3.2",
"react-native-hole-view": "^3.0.0-alpha4",
"react-native-image-crop-picker": "0.40.0",
"react-native-image-crop-picker": "0.41.2",
"react-native-image-resizer": "^1.2.3",
"react-native-keychain": "8.1.2",
"react-native-linear-gradient": "3.0.0-alpha.1",
Expand Down
8 changes: 8 additions & 0 deletions src/react_native/wallet_connect.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,11 @@
event
#(-> (bean/->clj %)
handler)))

(defn unregister-handler
[{:keys [web3-wallet event handler]}]
(oops/ocall web3-wallet
"off"
event
#(-> (bean/->clj %)
handler)))
3 changes: 1 addition & 2 deletions src/status_im/common/universal_links.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@
(rf/defn handle-wallet-connect
[_ uri]
(log/info "universal-links: handle-wallet-connect" uri)
{:dispatch-later {:ms 1500
:dispatch [:wallet-connect/on-scan-connection uri]}})
{:dispatch [:wallet-connect/process-deeplink uri]})

(defn dispatch-url
"Dispatch url so we can get access to re-frame/db"
Expand Down
1 change: 1 addition & 0 deletions src/status_im/contexts/profile/logout/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
{:db (assoc db :profile/logging-out? true)
;; We need to disable notifications before starting the logout process
:fx [[:dispatch [:profile.logout/disable-notifications]]
[:dispatch [:wallet-connect/unregister-event-listeners]]
[:dispatch-later
{:ms 100
:dispatch [:profile.logout/reset-state]}]]}))
3 changes: 2 additions & 1 deletion src/status_im/contexts/wallet/account/tabs/about/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[status-im.contexts.profile.utils :as profile.utils]
[status-im.contexts.shell.constants :as constants]
[status-im.contexts.wallet.account.tabs.about.style :as style]
[status-im.contexts.wallet.add-account.create-account.utils :as create-account.utils]
[status-im.contexts.wallet.common.utils :as utils]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
Expand Down Expand Up @@ -103,5 +104,5 @@
:stored (if keypair-keycard? :on-keycard :on-device)
:profile-picture (profile.utils/photo profile)
:customization-color customization-color
:derivation-path path
:derivation-path (create-account.utils/normalize-path path)
:keypair-name keypair-name}])]))
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns status-im.contexts.wallet.add-account.create-account.utils
(:require [status-im.constants :as constants]))
(:require [clojure.string :as string]
[status-im.constants :as constants]))

(defn first-derived-account
[account-data keypair-type]
Expand Down Expand Up @@ -56,3 +57,13 @@
:derived-from address
:last-used-derivation-index 0
:accounts [account-config]}))

(defn legacy-path?
[s]
(re-matches #"m/\d+" s))

(defn normalize-path
[path]
(if (legacy-path? path)
(str constants/path-wallet-root "/" (last (string/split path "/")))
path))
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
[status-im.common.standard-authentication.core :as standard-auth]
[status-im.constants :as constants]
[status-im.contexts.wallet.add-account.create-account.style :as style]
[status-im.contexts.wallet.add-account.create-account.utils :as create-account.utils]
[status-im.contexts.wallet.common.utils :as common.utils]
[status-im.contexts.wallet.sheets.account-origin.view :as account-origin]
[status-im.feature-flags :as ff]
Expand Down Expand Up @@ -255,11 +256,12 @@
{:on-complete
#(rf/dispatch
[:keycard/connect-derive-address-and-add-account
{:pin %
{:pin %
:derived-from-address derived-from
:key-uid key-uid
:derivation-path @derivation-path
:account-preferences preferences}])}])))
:key-uid key-uid
:derivation-path (create-account.utils/normalize-path
@derivation-path)
:account-preferences preferences}])}])))
[derived-from])]
(rn/use-effect
#(rf/dispatch
Expand Down
2 changes: 1 addition & 1 deletion src/status_im/contexts/wallet/collectible/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@
;; By doing it, we skip a blink while visiting the collectible detail page.
[:dispatch-later
{:ms 17
:dispatch [:navigate-to :screen/wallet.collectible]}]]})))
:dispatch [:open-modal :screen/wallet.collectible]}]]})))

(defn- keep-not-empty-value
[old-value new-value]
Expand Down
6 changes: 3 additions & 3 deletions src/status_im/contexts/wallet/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@
(rf/reg-event-fx :wallet/navigate-to-account
(fn [{:keys [db]} [address]]
{:db (assoc-in db [:wallet :current-viewing-account-address] address)
:fx [[:dispatch [:navigate-to :screen/wallet.accounts address]]]}))
:fx [[:dispatch [:navigate-to :screen/wallet.accounts]]]}))

(rf/reg-event-fx :wallet/navigate-to-account-within-stack
(fn [{:keys [db]} [address]]
{:db (assoc-in db [:wallet :current-viewing-account-address] address)
:fx [[:dispatch [:navigate-to-within-stack [:screen/wallet.accounts :shell-stack] address]]]}))
:fx [[:dispatch [:navigate-to-within-stack [:screen/wallet.accounts :shell-stack]]]]}))

(rf/reg-event-fx :wallet/navigate-to-new-account
(fn [{:keys [db]} [address]]
{:db (assoc-in db [:wallet :current-viewing-account-address] address)
:fx [[:dispatch [:hide-bottom-sheet]]
[:dispatch [:navigate-to :screen/wallet.accounts address]]
[:dispatch [:navigate-to :screen/wallet.accounts]]
[:dispatch [:wallet/show-account-created-toast address]]]}))

(rf/reg-event-fx :wallet/select-account-tab
Expand Down
31 changes: 13 additions & 18 deletions src/status_im/contexts/wallet/home/view.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,19 @@

(defn new-account
[]
(let [keycard? (rf/sub [:keycard/keycard-profile?])]
[quo/action-drawer
[[{:icon :i/add
:accessibility-label :start-a-new-chat
:label (i18n/label :t/add-account)
:sub-label (i18n/label :t/add-account-description)
:on-press (fn []
(if keycard?
(rf/dispatch [:keycard/feature-unavailable-show
{:feature-name :wallet.new-account}])
(rf/dispatch [:navigate-to :screen/wallet.create-account])))}
(when (ff/enabled? ::ff/wallet.add-watched-address)
{:icon :i/reveal
:accessibility-label :add-a-contact
:label (i18n/label :t/add-address-to-watch)
:sub-label (i18n/label :t/add-address-to-watch-description)
:on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch])
:add-divider? true})]]]))
[quo/action-drawer
[[{:icon :i/add
:accessibility-label :start-a-new-chat
:label (i18n/label :t/add-account)
:sub-label (i18n/label :t/add-account-description)
:on-press #(rf/dispatch [:navigate-to :screen/wallet.create-account])}
(when (ff/enabled? ::ff/wallet.add-watched-address)
{:icon :i/reveal
:accessibility-label :add-a-contact
:label (i18n/label :t/add-address-to-watch)
:sub-label (i18n/label :t/add-address-to-watch-description)
:on-press #(rf/dispatch [:navigate-to :screen/wallet.add-address-to-watch])
:add-divider? true})]]])

(defn- new-account-card-data
[]
Expand Down
1 change: 1 addition & 0 deletions src/status_im/contexts/wallet/send/events.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,7 @@
(rf/reg-event-fx :wallet/clean-up-transaction-flow
(fn [_]
{:fx [[:dispatch [:dismiss-modal :screen/wallet.transaction-confirmation]]
[:dispatch [:dismiss-modal :screen/wallet.collectible]]
[:dispatch [:wallet/clean-scanned-address]]
[:dispatch [:wallet/clean-local-suggestions]]
[:dispatch [:wallet/clean-send-address]]
Expand Down
Loading

0 comments on commit 3c8d497

Please sign in to comment.