Compare commits

..
97 changed files with 754 additions and 1388 deletions
-1
View File
@@ -276,7 +276,6 @@ run-android: export TARGET := android
# Disabled for debug builds to avoid 'maximum call stack exceeded' errors.
# https://github.com/status-im/status-mobile/issues/18493
run-android: export ORG_GRADLE_PROJECT_hermesEnabled := false
run-android: export ORG_GRADLE_PROJECT_universalApk := false
run-android: ##@run Build Android APK and start it on the device
@scripts/run-android.sh
+1 -1
View File
@@ -33,7 +33,7 @@
## Misc
- [Importing assets from Figma into project](import-assets.md)
- [Importing icons from Figma into project](export-icons.md)
- [Updating Status APK builds for the F-Droid Android application catalogue](fdroid.md)
- [Troubleshooting for known errors](troubleshooting.md)
+2 -10
View File
@@ -1,6 +1,6 @@
# Importing assets from Figma into project
# new icons
## Icons
## Export icons
![](images/export-icons/export-icons.gif)
@@ -13,11 +13,3 @@
```
2x@2x
4. If you want platform specific icon use `.android` or `.ios` suffixes. Example `icon_name@2x.android.png`.:w
## Images
Make sure to compress images before using into project.
```
make shell
./scrips/compress_image.sh image_path
```
-1
View File
@@ -217,7 +217,6 @@ GEM
PLATFORMS
arm64-darwin-22
arm64-darwin-23
x86_64-darwin-22
DEPENDENCIES
+2 -2
View File
@@ -1485,7 +1485,7 @@ SPEC CHECKSUMS:
FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d
FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
glog: 36c15c01d70ed395c6e4f3619f98a23ee415b07a
hermes-engine: 1d1835b2cc54c381909d94d1b3c8e0a2f1a94a0e
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
@@ -1578,4 +1578,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 5dd4a5279260d370bcdf016158c825ceb404ee06
COCOAPODS: 1.15.2
COCOAPODS: 1.13.0
+134 -134
View File
@@ -10,8 +10,8 @@
00E356F31AD99517003FC87E /* StatusImTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* StatusImTests.m */; };
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
22A6156314445AACCFBFE214 /* libPods-Status-StatusImPR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B65AA8037F445B3B691C9ED /* libPods-Status-StatusImPR.a */; };
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */; };
2D32CCEDFF64E1C3F1FB79AF /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 6081A369F49E04EC54F77E1B /* libPods-Status-StatusIm-StatusImTests.a */; };
3870E1E692E24133A80B07DE /* Inter-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */; };
393D26E3080B443A998F4A2F /* Inter-Italic.otf in Resources */ = {isa = PBXBuildFile; fileRef = B07176ACDAA1422E8F0A3D6B /* Inter-Italic.otf */; };
3A2626CF245C3F2200D5F94B /* Dummy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A2626CE245C3F2200D5F94B /* Dummy.swift */; };
@@ -36,6 +36,7 @@
3AAD2AD324A3A60E0075D594 /* Inter-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */; };
3AAD2AD424A3A60E0075D594 /* Inter-SemiBoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */; };
3ABC7AF8245FF85900612C45 /* InterStatus-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 9C76AF5A418D4D65A4CAD1D9 /* InterStatus-Regular.otf */; };
48BD7F7AF5283037BD52E49A /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A04127DCB75F4E318A4EBEDD /* libPods-Status-StatusIm-StatusImTests.a */; };
57C854A7993C47A3B1AECD32 /* Inter-MediumItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */; };
65F6941925780A4F00A45E76 /* Bridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F6941825780A4F00A45E76 /* Bridge.swift */; };
65F6941A25780A4F00A45E76 /* Bridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65F6941825780A4F00A45E76 /* Bridge.swift */; };
@@ -57,10 +58,9 @@
C1715FFC29C0BCE80088FA8B /* launch-icon.png in Resources */ = {isa = PBXBuildFile; fileRef = C14C5F9229C0ADB5005C58A7 /* launch-icon.png */; };
CE4E31B31D8695250033ED64 /* Statusgo.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE4E31B21D8695250033ED64 /* Statusgo.xcframework */; };
D1786306E0184916B11F4C37 /* Inter-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = B2A38FC3D3954DE7B2B171F8 /* Inter-Medium.otf */; };
D791AB0467C983D226FF5713 /* libPods-Status-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E42DDCDBECE60E763EAA5042 /* libPods-Status-StatusIm.a */; };
D34A0845D23EC8E3D30E11B1 /* libPods-Status-StatusIm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 84687C28206CB8457AF2BE74 /* libPods-Status-StatusIm.a */; };
D84616FB563A48EBB1678699 /* Inter-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */; };
D99C50E5E18942A39C8DDF61 /* Inter-BoldItalic.otf in Resources */ = {isa = PBXBuildFile; fileRef = B321D25F4493470980039457 /* Inter-BoldItalic.otf */; };
F9C9188A9398D58C286A2F4B /* libPods-Status-StatusImPR.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C929A693823978C12D329338 /* libPods-Status-StatusImPR.a */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
@@ -108,36 +108,37 @@
00E356EE1AD99517003FC87E /* StatusImTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = StatusImTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* StatusImTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = StatusImTests.m; sourceTree = "<group>"; };
064C446A8C45E401B63D0B7C /* Pods-Status-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.debug.xcconfig"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* StatusIm.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = StatusIm.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = StatusIm/AppDelegate.h; sourceTree = "<group>"; };
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = StatusIm/AppDelegate.mm; sourceTree = "<group>"; };
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = StatusIm/Info.plist; sourceTree = "<group>"; };
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = StatusIm/main.m; sourceTree = "<group>"; };
1426DF592BA248FC81D955CB /* Inter-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Regular.otf"; path = "../resources/fonts/Inter-Regular.otf"; sourceTree = "<group>"; };
203C46547A6E99D27529A8AA /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.release.xcconfig"; sourceTree = "<group>"; };
24F63BCFEB33B4C969305A46 /* Pods-Status-StatusIm.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.debug.xcconfig"; sourceTree = "<group>"; };
344F43B59CCE090C3271FF08 /* Pods-Status-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.release.xcconfig"; sourceTree = "<group>"; };
337641435F36F3900FEAA11C /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.release.xcconfig"; sourceTree = "<group>"; };
3A2626CE245C3F2200D5F94B /* Dummy.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Dummy.swift; sourceTree = "<group>"; };
3A6406FB24A3ADF90046ED37 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3A8F8EA924A4D31600BF206D /* GameKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameKit.framework; path = System/Library/Frameworks/GameKit.framework; sourceTree = SDKROOT; };
3AAD2ADC24A3A60E0075D594 /* Status PR.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Status PR.app"; sourceTree = BUILT_PRODUCTS_DIR; };
3AB1C3AD245C043900098F67 /* StatusIm-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StatusIm-Bridging-Header.h"; sourceTree = "<group>"; };
415E72A662B5ABF086AB7D7B /* Pods-Status-StatusImPR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.release.xcconfig"; sourceTree = "<group>"; };
4C16DE0B1F89508700AA10DB /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
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; };
6081A369F49E04EC54F77E1B /* libPods-Status-StatusIm-StatusImTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm-StatusImTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
65F693BD2578002500A45E76 /* CoreNFC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreNFC.framework; path = System/Library/Frameworks/CoreNFC.framework; sourceTree = SDKROOT; };
65F693BF2578003600A45E76 /* CoreNFC.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreNFC.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk/System/iOSSupport/System/Library/Frameworks/CoreNFC.framework; sourceTree = DEVELOPER_DIR; };
65F6941725780A4E00A45E76 /* StatusImTests-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "StatusImTests-Bridging-Header.h"; sourceTree = "<group>"; };
65F6941825780A4F00A45E76 /* Bridge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bridge.swift; sourceTree = "<group>"; };
693A62DB37BC4CD5A30E5C96 /* Inter-SemiBold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-SemiBold.otf"; path = "../resources/fonts/Inter-SemiBold.otf"; sourceTree = "<group>"; };
70748FF05FFD3CACB6F64CE0 /* Pods-Status-StatusImPR.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.debug.xcconfig"; sourceTree = "<group>"; };
6B65AA8037F445B3B691C9ED /* libPods-Status-StatusImPR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusImPR.a"; sourceTree = BUILT_PRODUCTS_DIR; };
715D8131290BE850006F5C88 /* UbuntuMono-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = "UbuntuMono-Regular.ttf"; path = "../resources/fonts/UbuntuMono-Regular.ttf"; sourceTree = "<group>"; };
74B758FB20D7C00B003343C3 /* launch-image-universal.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "launch-image-universal.storyboard"; sourceTree = "<group>"; };
84687C28206CB8457AF2BE74 /* libPods-Status-StatusIm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = "libc++.tbd"; path = "usr/lib/libc++.tbd"; sourceTree = SDKROOT; };
8C0C93A4288955E6949CAFA7 /* Pods-Status-StatusIm.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm.release.xcconfig"; sourceTree = "<group>"; };
922C4CA61F4D5F8B0033C753 /* StatusIm.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = StatusIm.entitlements; path = StatusIm/StatusIm.entitlements; sourceTree = "<group>"; };
9C76AF5A418D4D65A4CAD1D9 /* InterStatus-Regular.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "InterStatus-Regular.otf"; path = "../resources/fonts/InterStatus-Regular.otf"; sourceTree = "<group>"; };
9C8831EF82FB144215B28760 /* Pods-Status-StatusImPR.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.release.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.release.xcconfig"; sourceTree = "<group>"; };
9EC0135C1E06FB1900155B5C /* RCTWKWebView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = RCTWKWebView.xcodeproj; path = "../node_modules/react-native-wkwebview-reborn/ios/RCTWKWebView.xcodeproj"; sourceTree = "<group>"; };
A04127DCB75F4E318A4EBEDD /* libPods-Status-StatusIm-StatusImTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm-StatusImTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
A4F2BBE8D4DD4140A6CCAC39 /* Inter-SemiBoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-SemiBoldItalic.otf"; path = "../resources/fonts/Inter-SemiBoldItalic.otf"; sourceTree = "<group>"; };
B07176ACDAA1422E8F0A3D6B /* Inter-Italic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Italic.otf"; path = "../resources/fonts/Inter-Italic.otf"; sourceTree = "<group>"; };
B24FC7FC1DE7195700D694FF /* Social.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Social.framework; path = System/Library/Frameworks/Social.framework; sourceTree = SDKROOT; };
@@ -145,15 +146,14 @@
B2A38FC3D3954DE7B2B171F8 /* Inter-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Medium.otf"; path = "../resources/fonts/Inter-Medium.otf"; sourceTree = "<group>"; };
B2F2D1BB1D9D531B00B7B453 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = StatusIm/Images.xcassets; sourceTree = "<group>"; };
B321D25F4493470980039457 /* Inter-BoldItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-BoldItalic.otf"; path = "../resources/fonts/Inter-BoldItalic.otf"; sourceTree = "<group>"; };
C1244846434197B450E92912 /* Pods-Status-StatusImPR.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusImPR.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR.debug.xcconfig"; sourceTree = "<group>"; };
C14C5F8C29C0A149005C58A7 /* launch-icon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@3x.png"; path = "StatusIm/launch-icon@3x.png"; sourceTree = "<group>"; };
C14C5F9029C0AD9C005C58A7 /* launch-icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon@2x.png"; path = "StatusIm/launch-icon@2x.png"; sourceTree = "<group>"; };
C14C5F9229C0ADB5005C58A7 /* launch-icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "launch-icon.png"; path = "StatusIm/launch-icon.png"; sourceTree = "<group>"; };
C6B1215047604CD59A4C74D6 /* Inter-MediumItalic.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-MediumItalic.otf"; path = "../resources/fonts/Inter-MediumItalic.otf"; sourceTree = "<group>"; };
C929A693823978C12D329338 /* libPods-Status-StatusImPR.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusImPR.a"; sourceTree = BUILT_PRODUCTS_DIR; };
CD4A2C27D6D5473184DC1F7E /* Inter-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Bold.otf"; path = "../resources/fonts/Inter-Bold.otf"; sourceTree = "<group>"; };
CE4E31B21D8695250033ED64 /* Statusgo.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = Statusgo.xcframework; path = "../modules/react-native-status/ios/RCTStatus/Statusgo.xcframework"; sourceTree = "<group>"; };
E42DDCDBECE60E763EAA5042 /* libPods-Status-StatusIm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Status-StatusIm.a"; sourceTree = BUILT_PRODUCTS_DIR; };
F12F9820A9DF3FE08C615B90 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; sourceTree = "<group>"; };
E15A67A7A7B33C177372338A /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; path = "Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -161,7 +161,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
2D32CCEDFF64E1C3F1FB79AF /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */,
48BD7F7AF5283037BD52E49A /* libPods-Status-StatusIm-StatusImTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -174,7 +174,7 @@
CE4E31B31D8695250033ED64 /* Statusgo.xcframework in Frameworks */,
25DC9C9DC25846BD8D084888 /* libc++.tbd in Frameworks */,
BA68A2377A20496EA737000D /* libz.tbd in Frameworks */,
D791AB0467C983D226FF5713 /* libPods-Status-StatusIm.a in Frameworks */,
D34A0845D23EC8E3D30E11B1 /* libPods-Status-StatusIm.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -188,7 +188,7 @@
3AAD2AC224A3A60E0075D594 /* Statusgo.xcframework in Frameworks */,
3AAD2AC524A3A60E0075D594 /* libc++.tbd in Frameworks */,
3AAD2AC624A3A60E0075D594 /* libz.tbd in Frameworks */,
F9C9188A9398D58C286A2F4B /* libPods-Status-StatusImPR.a in Frameworks */,
22A6156314445AACCFBFE214 /* libPods-Status-StatusImPR.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -314,9 +314,9 @@
CE4E31B21D8695250033ED64 /* Statusgo.xcframework */,
8B9A886A2CB448B1ABA0EB62 /* libc++.tbd */,
4E586E1B0E544F64AA9F5BD1 /* libz.tbd */,
E42DDCDBECE60E763EAA5042 /* libPods-Status-StatusIm.a */,
6081A369F49E04EC54F77E1B /* libPods-Status-StatusIm-StatusImTests.a */,
C929A693823978C12D329338 /* libPods-Status-StatusImPR.a */,
84687C28206CB8457AF2BE74 /* libPods-Status-StatusIm.a */,
A04127DCB75F4E318A4EBEDD /* libPods-Status-StatusIm-StatusImTests.a */,
6B65AA8037F445B3B691C9ED /* libPods-Status-StatusImPR.a */,
);
name = Frameworks;
sourceTree = "<group>";
@@ -324,12 +324,12 @@
D0D5C8D06825D33BA2D2121E /* Pods */ = {
isa = PBXGroup;
children = (
24F63BCFEB33B4C969305A46 /* Pods-Status-StatusIm.debug.xcconfig */,
344F43B59CCE090C3271FF08 /* Pods-Status-StatusIm.release.xcconfig */,
F12F9820A9DF3FE08C615B90 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */,
203C46547A6E99D27529A8AA /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */,
70748FF05FFD3CACB6F64CE0 /* Pods-Status-StatusImPR.debug.xcconfig */,
415E72A662B5ABF086AB7D7B /* Pods-Status-StatusImPR.release.xcconfig */,
064C446A8C45E401B63D0B7C /* Pods-Status-StatusIm.debug.xcconfig */,
8C0C93A4288955E6949CAFA7 /* Pods-Status-StatusIm.release.xcconfig */,
E15A67A7A7B33C177372338A /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */,
337641435F36F3900FEAA11C /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */,
C1244846434197B450E92912 /* Pods-Status-StatusImPR.debug.xcconfig */,
9C8831EF82FB144215B28760 /* Pods-Status-StatusImPR.release.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
@@ -341,12 +341,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "StatusImTests" */;
buildPhases = (
D357C5313A85261FF3DAB74E /* [CP] Check Pods Manifest.lock */,
78DBDF1BD1055E83A260EA98 /* [CP] Check Pods Manifest.lock */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
36051AE6B742BD851884AB9D /* [CP] Embed Pods Frameworks */,
3506F0F77B5DE03815A5414A /* [CP] Copy Pods Resources */,
0564BBB140EB57AD57BEEAEA /* [CP] Embed Pods Frameworks */,
ED9B7873F01EB9B1500CE371 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -362,15 +362,15 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "StatusIm" */;
buildPhases = (
D47DE8479514FAAC6B26ACD2 /* [CP] Check Pods Manifest.lock */,
410DB9615D9ED5009FD09DB3 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
20B6B6891D92C42700CC5C6A /* Embed Frameworks */,
E3914A731DF919ED00EBB515 /* Run Script */,
82219E0CC0028DA612FCC0E3 /* [CP] Embed Pods Frameworks */,
389504FC147AAF0616332C3A /* [CP] Copy Pods Resources */,
CACB1A448509663CCC23DAD5 /* [CP] Embed Pods Frameworks */,
3CD62FBC6B5F738846AA62DD /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -385,15 +385,15 @@
isa = PBXNativeTarget;
buildConfigurationList = 3AAD2AD924A3A60E0075D594 /* Build configuration list for PBXNativeTarget "StatusImPR" */;
buildPhases = (
E507D5CEF6BDEB9FBEBFA1C3 /* [CP] Check Pods Manifest.lock */,
59C011634B62CD4307167A35 /* [CP] Check Pods Manifest.lock */,
3AAD2ABB24A3A60E0075D594 /* Sources */,
3AAD2ABF24A3A60E0075D594 /* Frameworks */,
3AAD2AC924A3A60E0075D594 /* Resources */,
3AAD2AD524A3A60E0075D594 /* Bundle React Native code and images */,
3AAD2AD624A3A60E0075D594 /* Embed Frameworks */,
3AAD2AD724A3A60E0075D594 /* Run Script */,
13D9129EE9E3EFD2436F82FD /* [CP] Embed Pods Frameworks */,
E374B6B7AF37774C15097B39 /* [CP] Copy Pods Resources */,
189EFE1146C70E755688AF3D /* [CP] Embed Pods Frameworks */,
B4118C9690A731BE596936B2 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
@@ -547,49 +547,7 @@
shellPath = "/usr/bin/env sh";
shellScript = "set -o errexit\nexport NODE_BINARY=\"${NODE_BINARY:-node}\"\nexport NODE_ARGS=\"${NODE_ARGS:- --max-old-space-size=16384 }\"\n\n\"../node_modules/react-native/scripts/react-native-xcode.sh\"\n";
};
13D9129EE9E3EFD2436F82FD /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3506F0F77B5DE03815A5414A /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh",
"${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}/QBImagePicker.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNPermissionsPrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCTI18nStrings.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
36051AE6B742BD851884AB9D /* [CP] Embed Pods Frameworks */ = {
0564BBB140EB57AD57BEEAEA /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -607,28 +565,22 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
389504FC147AAF0616332C3A /* [CP] Copy Pods Resources */ = {
189EFE1146C70E755688AF3D /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh",
"${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",
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Copy Pods Resources";
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${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",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
3AAD2AD524A3A60E0075D594 /* Bundle React Native code and images */ = {
@@ -659,47 +611,31 @@
shellPath = "/usr/bin/env sh";
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ../logs/set_xcode_version.log 2>&1\n";
};
82219E0CC0028DA612FCC0E3 /* [CP] Embed Pods Frameworks */ = {
3CD62FBC6B5F738846AA62DD /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh",
"${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] Embed Pods Frameworks";
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
"${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",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-resources.sh\"\n";
showEnvVarsInLog = 0;
};
D357C5313A85261FF3DAB74E /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusIm-StatusImTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
D47DE8479514FAAC6B26ACD2 /* [CP] Check Pods Manifest.lock */ = {
410DB9615D9ED5009FD09DB3 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -721,7 +657,51 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
E374B6B7AF37774C15097B39 /* [CP] Copy Pods Resources */ = {
59C011634B62CD4307167A35 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusImPR-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
78DBDF1BD1055E83A260EA98 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusIm-StatusImTests-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
B4118C9690A731BE596936B2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
@@ -745,6 +725,24 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusImPR/Pods-Status-StatusImPR-resources.sh\"\n";
showEnvVarsInLog = 0;
};
CACB1A448509663CCC23DAD5 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-frameworks.sh",
"${PODS_XCFRAMEWORKS_BUILD_DIR}/hermes-engine/Pre-built/hermes.framework/hermes",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/hermes.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm/Pods-Status-StatusIm-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
E3914A731DF919ED00EBB515 /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 8;
@@ -759,26 +757,28 @@
shellPath = "/usr/bin/env sh";
shellScript = "\"${PROJECT_DIR}/scripts/set_xcode_version.sh\" > ../logs/set_xcode_version.log 2>&1\n";
};
E507D5CEF6BDEB9FBEBFA1C3 /* [CP] Check Pods Manifest.lock */ = {
ED9B7873F01EB9B1500CE371 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh",
"${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 = (
"$(DERIVED_FILE_DIR)/Pods-Status-StatusImPR-checkManifestLockResult.txt",
"${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",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Status-StatusIm-StatusImTests/Pods-Status-StatusIm-StatusImTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
@@ -828,7 +828,7 @@
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F12F9820A9DF3FE08C615B90 /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */;
baseConfigurationReference = E15A67A7A7B33C177372338A /* Pods-Status-StatusIm-StatusImTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_ID_SUFFIX = .debug;
@@ -865,7 +865,7 @@
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 203C46547A6E99D27529A8AA /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */;
baseConfigurationReference = 337641435F36F3900FEAA11C /* Pods-Status-StatusIm-StatusImTests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
BUNDLE_ID_SUFFIX = "";
@@ -898,7 +898,7 @@
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 24F63BCFEB33B4C969305A46 /* Pods-Status-StatusIm.debug.xcconfig */;
baseConfigurationReference = 064C446A8C45E401B63D0B7C /* Pods-Status-StatusIm.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = .debug;
@@ -980,7 +980,7 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 344F43B59CCE090C3271FF08 /* Pods-Status-StatusIm.release.xcconfig */;
baseConfigurationReference = 8C0C93A4288955E6949CAFA7 /* Pods-Status-StatusIm.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = "";
@@ -1055,7 +1055,7 @@
};
3AAD2ADA24A3A60E0075D594 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 70748FF05FFD3CACB6F64CE0 /* Pods-Status-StatusImPR.debug.xcconfig */;
baseConfigurationReference = C1244846434197B450E92912 /* Pods-Status-StatusImPR.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIcon$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = .debug;
@@ -1135,7 +1135,7 @@
};
3AAD2ADB24A3A60E0075D594 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 415E72A662B5ABF086AB7D7B /* Pods-Status-StatusImPR.release.xcconfig */;
baseConfigurationReference = 9C8831EF82FB144215B28760 /* Pods-Status-StatusImPR.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "AppIconPR$(BUNDLE_ID_SUFFIX)";
BUNDLE_ID_SUFFIX = "";
+2 -2
View File
@@ -23,7 +23,7 @@ stdenv.mkDerivation {
lib.mkFilter {
root = path;
ignoreVCS = false;
include = [
include = [
"VERSION" "BUILD_NUMBER" "scripts/version/.*"
"src/.*" "shadow-cljs.edn"
# I want to avoid including the whole .git directory
@@ -57,7 +57,7 @@ stdenv.mkDerivation {
let anchor = ''{:source-paths ["src" "test/cljs"]'';
in ''
substituteInPlace shadow-cljs.edn \
--replace-quiet '${anchor}' \
--replace '${anchor}' \
'${anchor}
:maven {:local-repo "${deps.clojure}"}'
'';
+4 -4
View File
@@ -51,11 +51,11 @@ in {
};
# Package version adjustments
gradle = super.gradle_8.override { java = super.openjdk17_headless; };
nodejs = super.nodejs_20;
gradle = super.gradle_8;
nodejs = super.nodejs-18_x;
ruby = super.ruby_3_1;
yarn = super.yarn.override { nodejs = super.nodejs_20; };
openjdk = super.openjdk17_headless;
yarn = super.yarn.override { nodejs = super.nodejs-18_x; };
openjdk = super.openjdk11_headless;
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
versions = ["15.1" "15.2" "15.3" "15.4"];
};
+4 -3
View File
@@ -6,10 +6,11 @@ let
# For testing local version of nixpkgs
#nixpkgsSrc = (import <nixpkgs> { }).lib.cleanSource "/home/jakubgs/work/nixpkgs";
# We use a commit from the unstable channel of nixpkgs for gradle 8.8
# We follow release 23-11 of nixpkgs
# https://github.com/NixOS/nixpkgs/releases/tag/23.11
nixpkgsSrc = builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/48d567fc7b299de90f70a48e4263e31f690ba03e.tar.gz";
sha256 = "sha256:0zynbk52khdfhg4qfv26h3r5156xff5p0cga2cin7b07i7lqminh";
url = "https://github.com/NixOS/nixpkgs/archive/224fd9a362487ab2894dac0df161c84ab1d8880b.tar.gz";
sha256 = "sha256:1syvl39pi1h8lf5gkd9h7ksn5hp34cj7pa3abr59217kv0bdklhy";
};
# Status specific configuration defaults
+1 -1
View File
@@ -4,7 +4,7 @@ buildGoModule rec {
pname = "go-maven-resolver";
version = "v1.1.2";
vendorHash = "sha256-dlqI+onfeo4tTwmHeq8heVKRzLU1gFEQ+4iv+8egN90=";
vendorSha256 = "1p9pl33zpbw8zc85301mnp692lkr46ppm1q99wnqwynzi7x8hnkn";
src = fetchFromGitHub rec {
name = "${repo}-${version}-source";
+1 -1
View File
@@ -10,7 +10,7 @@ writeScript "patch-maven-srcs" (''
function patchMavenSource() {
grep "$source" $1 > /dev/null && \
substituteInPlace $1 --replace-quiet "$2" "$3" 2>/dev/null
substituteInPlace $1 --replace "$2" "$3" 2>/dev/null
}
gradleFile="$1"
+1 -1
View File
@@ -7,7 +7,7 @@
go.overrideDerivation (oldAttrs: {
postPatch = (oldAttrs.postPatch or "") + ''
substituteInPlace "src/cmd/go/internal/work/action.go" --replace-quiet \
substituteInPlace "src/cmd/go/internal/work/action.go" --replace \
'tmp, err := ioutil.TempDir(os.Getenv("GOTMPDIR"), "go-build")' \
'var err error
tmp := os.Getenv("NIX_GOWORKDIR")
+1 -1
View File
@@ -68,7 +68,7 @@ findFilesNewerThan() {
\ # related code https://github.com/lugg/react-native-config/blob/v1.5.0/react-native-config.podspec#L52 \
-not -path "*/node_modules/react-native-config/ios/ReactNativeConfig/GeneratedDotEnv.m" \
\ # generated at runtime by react-native from v0.73.x onwards \
-not -path "*/node_modules/react-native/React/Fabric/RCTThirdPartyFabricComponentsProvider.mm" \
-not -path "*/node_modules/react-native/React/Fabric/*" \
-print
}
-2
View File
@@ -24,8 +24,6 @@ in mkShell {
clojure maven watchman
# other nice to have stuff
yarn nodejs python310 maestro
# Required for /scripts/compress_image.sh script
imagemagick
] # and some special cases
++ lib.optionals stdenv.isDarwin ([ cocoapods clang tcl idb-companion ] ++ appleSDKFrameworks)
++ lib.optionals (!stdenv.isDarwin) [ gcc8 ]
+2 -2
View File
@@ -10,7 +10,7 @@
, outputFileName ? "status-go-${source.shortRev}-${platform}.aar" }:
let
inherit (lib) concatStringsSep optionalString optional splitString;
inherit (lib) concatStringsSep optionalString optional;
isIOS = platform == "ios";
isAndroid = platform == "android";
enforceXCodeAvailable = callPackage ./enforceXCodeAvailable.nix { };
@@ -31,7 +31,7 @@ in buildGoPackage {
++ optional isAndroid openjdk
++ optional isIOS xcodeWrapper;
ldflags = goBuildLdFlags;
ldflags = concatStringsSep " " goBuildLdFlags;
ANDROID_HOME = optionalString isAndroid androidPkgs.sdk;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 345 KiB

-23
View File
@@ -1,23 +0,0 @@
#!/usr/bin/env bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <input_image.png>"
exit 1
fi
input_file="$1"
backup_file="${input_file%.png}.bak.png"
output_file="$input_file"
cp "$input_file" "$backup_file"
magick "$input_file" -quality 100 -define png:compression-level=9 -strip -colors 256 "$output_file"
if [ $? -eq 0 ]; then
echo "Image compression completed: $input_file"
echo "Backup created: $backup_file"
else
mv "$backup_file" "$input_file"
echo "Error during image compression"
exit 1
fi
+1 -1
View File
@@ -29,7 +29,7 @@ identify_git_sha() {
STATUS_GO_MATCHING_REFS=$(git ls-remote ${REPO_URL} ${1})
# It's possible that there's both a branch and a tag matching the given version
STATUS_GO_TAG_SHA1=$(echo "${STATUS_GO_MATCHING_REFS}" | grep "refs/tags/${1}" | cut -f1)
STATUS_GO_TAG_SHA1=$(echo "${STATUS_GO_MATCHING_REFS}" | grep 'refs/tags' | cut -f1)
STATUS_GO_BRANCH_SHA1=$(echo "${STATUS_GO_MATCHING_REFS}" | grep 'refs/heads' | cut -f1)
# Prefer tag over branch if both are found
+11 -20
View File
@@ -1,7 +1,8 @@
(ns legacy.status-im.chat.models.mentions
(:require [clojure.set :as set]
[taoensso.timbre :as log]
[utils.re-frame :as rf]))
(:require
[clojure.set :as set]
[taoensso.timbre :as log]
[utils.re-frame :as rf]))
(defn- transfer-input-segments
[segments]
@@ -58,20 +59,18 @@
(defn- transfer-mention-result
[result]
(let [{:keys [input-segments mentionable-users state chat-id new-text call-id]}
(let [{:keys [input-segments mentionable-users state chat-id new-text]}
(set/rename-keys result
{:InputSegments :input-segments
:MentionSuggestions :mentionable-users
:MentionState :state
:ChatID :chat-id
:NewText :new-text
:CallID :call-id})]
:NewText :new-text})]
{:chat-id chat-id
:input-segments (transfer-input-segments input-segments)
:mentionable-users (rename-mentionable-users mentionable-users)
:state (rename-state state)
:new-text new-text
:call-id call-id}))
:new-text new-text}))
(rf/defn on-error
{:events [:mention/on-error]}
@@ -105,12 +104,10 @@
{:events [:mention/on-change-text]}
[{:keys [db]} text]
(let [chat-id (:current-chat-id db)
call-id (inc (get-in db [:chat/inputs chat-id :current-mentions-call-id] 0))
params [chat-id text call-id]
params [chat-id text]
method "wakuext_chatMentionOnChangeText"]
(log/debug "[mentions] on-change-text" {:params params})
{:db (assoc-in db [:chat/inputs chat-id :current-mentions-call-id] call-id)
:json-rpc/call [{:method method
{:json-rpc/call [{:method method
:params params
:on-success #(rf/dispatch [:mention/on-change-text-success %])
:on-error #(rf/dispatch [:mention/on-error
@@ -121,14 +118,8 @@
{:events [:mention/on-change-text-success]}
[{:keys [db]} result]
(log/debug "[mentions] on-change-text-success" {:result result})
(let [{:keys [state chat-id mentionable-users
input-segments call-id]} (transfer-mention-result result)
current-mentions-call-id (get-in db [:chat/inputs chat-id :current-mentions-call-id])]
(when (= call-id current-mentions-call-id)
{:db (-> db
(assoc-in [:chat/inputs-with-mentions chat-id] input-segments)
(assoc-in [:chats/mention-suggestions chat-id] mentionable-users)
(assoc-in [:chats/mentions chat-id :mentions] state))})))
(let [{:keys [chat-id mentionable-users]} (transfer-mention-result result)]
{:db (assoc-in db [:chats/mention-suggestions chat-id] mentionable-users)}))
(rf/defn on-select-mention-success
{:events [:mention/on-select-mention-success]}
@@ -62,7 +62,6 @@
:chatId :chat-id
:contactVerificationStatus :contact-verification-status
:communityId :community-id
:installationId :installation-id
:membershipStatus :membership-status
:albumMessages :album-messages})
(update :last-message #(when % (messages/<-rpc %)))
@@ -117,24 +117,20 @@
(deftest parse-notification-counts-response-test
(is
(= {notification-types/one-to-one-chat 15
notification-types/private-group-chat 16
notification-types/mention 17
notification-types/reply 18
notification-types/contact-request 19
notification-types/admin 20
notification-types/contact-verification 21
notification-types/new-installation-received 22
notification-types/new-installation-created 23}
(= {notification-types/one-to-one-chat 15
notification-types/private-group-chat 16
notification-types/mention 17
notification-types/reply 18
notification-types/contact-request 19
notification-types/admin 20
notification-types/contact-verification 21}
(store/parse-notification-counts-response
{(keyword (str notification-types/one-to-one-chat)) 15
(keyword (str notification-types/private-group-chat)) 16
(keyword (str notification-types/mention)) 17
(keyword (str notification-types/reply)) 18
(keyword (str notification-types/contact-request)) 19
(keyword (str notification-types/admin)) 20
(keyword (str notification-types/contact-verification)) 21
(keyword (str notification-types/new-installation-received)) 22
(keyword (str notification-types/new-installation-created)) 23
{(keyword (str notification-types/one-to-one-chat)) 15
(keyword (str notification-types/private-group-chat)) 16
(keyword (str notification-types/mention)) 17
(keyword (str notification-types/reply)) 18
(keyword (str notification-types/contact-request)) 19
(keyword (str notification-types/admin)) 20
(keyword (str notification-types/contact-verification)) 21
;; Unsupported type in the response is ignored
:999 100}))))
:999 100}))))
-11
View File
@@ -57,11 +57,6 @@
(fn [options]
(permissions/request-permissions options)))
(re-frame/reg-fx
:request-notifications-fx
(fn [options]
(permissions/request-notifications options)))
(re-frame/reg-fx
:ui/show-error
(fn [content]
@@ -169,12 +164,6 @@
[_ options]
{:request-permissions-fx options})
(rf/reg-event-fx
:request-notifications
(fn [_ [options]]
(prn options)
{:request-notifications-fx options}))
(rf/defn update-window-dimensions
{:events [:update-window-dimensions]}
[{:keys [db]} dimensions]
-17
View File
@@ -243,23 +243,6 @@
{}
installations))})
(rf/defn finish-seed-phrase-fallback-syncing
{:events [:pairing/finish-seed-phrase-fallback-syncing]}
[{:keys [db]}]
{:fx [[:json-rpc/call
[{:method "wakuext_enableInstallationAndPair"
:params [{:installationId (:syncing/installation-id db)}]
:js-response true
:on-success [:sanitize-messages-and-process-response]}]]]})
(rf/defn pair-and-sync
{:events [:pairing/pair-and-sync]}
[cofx installation-id]
{:fx [[:json-rpc/call
[{:method "wakuext_enableInstallationAndSync"
:params [{:installationId installation-id}]
:on-success #(log/debug "successfully synced devices")}]]]})
(rf/defn enable-installation-success
{:events [:pairing.callback/enable-installation-success]}
[cofx installation-id]
+2 -22
View File
@@ -1,10 +1,7 @@
(ns react-native.permissions
(:require
["react-native-permissions" :refer
[check openSettings PERMISSIONS requestMultiple requestNotifications
RESULTS]]
[react-native.platform :as platform]
[taoensso.timbre :as log]))
["react-native-permissions" :refer (check openSettings requestMultiple PERMISSIONS RESULTS)]
[react-native.platform :as platform]))
(def permissions-map
{:read-external-storage (cond
@@ -48,20 +45,3 @@
(.catch #(on-error %))))
(def open-settings openSettings)
(defn request-notifications
"`notification-options` is only used on iOS.
A map with `:status` and `settings` (only for iOS) is passed to the callbacks.
See https://github.com/zoontek/react-native-permissions?tab=readme-ov-file#requestnotifications."
[{:keys [notification-options on-allowed on-denied]
:or {notification-options #js ["alert"]}}]
(-> (requestNotifications notification-options)
(.then (fn [js-response]
(let [response (js->clj js-response :keywordize-keys true)]
(if (= (:status response) "granted")
(do
(on-allowed response)
(log/debug "Notification permission were allowed" response))
(do
(on-denied response)
(log/debug "Notification permission were denied" response))))))))
@@ -1,23 +0,0 @@
(ns status-im.common.new-device-sheet.style
(:require [quo.foundations.colors :as colors]))
(def heading
{:padding-left 20
:padding-bottom 8})
(def message
{:padding-horizontal 20
:padding-top 4})
(def warning
{:margin-horizontal 20
:margin-top 10})
(def drawer-container
{:padding-horizontal 13
:padding-top 16})
(def settings-subtext
{:color colors/white-opa-70
:align-self :center
:margin-bottom 12})
@@ -1,75 +0,0 @@
(ns status-im.common.new-device-sheet.view
(:require
[quo.core :as quo]
[react-native.core :as rn]
[status-im.common.events-helper :as events-helper]
[status-im.common.new-device-sheet.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(defn- pair-and-sync
[installation-id]
(rf/dispatch [:pairing/pair-and-sync installation-id])
(events-helper/hide-bottom-sheet))
(defn installation-request-receiver-view
[installation-id]
(rn/use-mount events-helper/dismiss-keyboard)
[:<>
[quo/text
{:weight :semi-bold
:size :heading-2
:accessibility-label :new-device-sheet-heading
:style style/heading}
(i18n/label :t/pair-new-device-and-sync)]
[quo/text
{:weight :regular
:size :paragraph-1
:accessibility-label :new-device-sheet-message
:style style/message}
(i18n/label :t/new-device-detected-recovered-device-message)]
[quo/text
{:weight :semi-bold
:size :heading-2
:accessibility-label :new-device-installation-id
:style style/heading}
installation-id]
[quo/bottom-actions
{:actions :two-actions
:blur? true
:container-style {:margin-top 12}
:button-two-label (i18n/label :t/cancel)
:button-two-props {:type :grey
:on-press events-helper/hide-bottom-sheet}
:button-one-label (i18n/label :t/pair-and-sync)
:button-one-props {:on-press #(pair-and-sync installation-id)}}]])
(defn installation-request-creator-view
[installation-id]
(rn/use-mount events-helper/dismiss-keyboard)
[:<>
[quo/text
{:weight :semi-bold
:size :heading-2
:accessibility-label :new-device-sheet-heading
:style style/heading}
(i18n/label :t/pair-this-device-and-sync)]
[quo/text
{:weight :regular
:size :paragraph-1
:accessibility-label :new-device-sheet-message
:style style/message}
(i18n/label :t/new-device-detected-other-device-message)]
[quo/text
{:weight :semi-bold
:size :heading-2
:accessibility-label :new-device-installation-id
:style style/heading}
installation-id]
[quo/bottom-actions
{:actions :one-action
:blur? true
:container-style {:margin-top 12}
:button-one-label (i18n/label :t/close)
:button-one-props {:type :grey
:on-press events-helper/hide-bottom-sheet}}]])
-1
View File
@@ -28,7 +28,6 @@
:notifications (js/require "../resources/images/ui2/notifications.png")
:nfc-prompt (js/require "../resources/images/ui2/nfc-prompt.png")
:nfc-success (js/require "../resources/images/ui2/nfc-success.png")
:preparing-status (js/require "../resources/images/ui2/preparing-status.png")
:syncing-devices (js/require "../resources/images/ui2/syncing_devices.png")
:syncing-wrong (js/require "../resources/images/ui2/syncing_wrong.png")})
@@ -37,7 +37,6 @@
:screen/onboarding.enable-biometrics
:screen/onboarding.generating-keys
:screen/onboarding.enable-notifications
:screen/onboarding.preparing-status
:screen/onboarding.sign-in-intro
:screen/onboarding.sign-in
:screen/onboarding.syncing-progress
@@ -8,8 +8,7 @@
(h/test "joined options - Non token Gated"
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:joined true}
:profile/test-networks-enabled? false})
:communities/community {:joined true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/view-members))
(h/is-truthy (h/get-by-translation-text :t/view-community-rules))
@@ -24,8 +23,7 @@
(h/test "joined options - Token Gated"
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:joined true
:role-permissions? true}
:profile/test-networks-enabled? false})
:role-permissions? true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/view-members))
(h/is-truthy (h/get-by-translation-text :t/view-community-rules))
@@ -40,8 +38,7 @@
(h/test "admin options - Non token Gated"
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:admin true}
:profile/test-networks-enabled? false})
:communities/community {:admin true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/view-members))
(h/is-truthy (h/get-by-translation-text :t/view-community-rules))
@@ -55,8 +52,7 @@
(h/test "admin options - Token Gated"
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:admin true
:role-permissions? true}
:profile/test-networks-enabled? false})
:role-permissions? true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/view-members))
(h/is-truthy (h/get-by-translation-text :t/view-community-rules))
@@ -69,8 +65,7 @@
(h/test "request sent options - Non token Gated"
(h/setup-subs {:communities/my-pending-request-to-join "mock-id"
:communities/community {}
:profile/test-networks-enabled? false})
:communities/community {}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/view-members))
(h/is-truthy (h/get-by-translation-text :t/view-community-rules))
@@ -81,8 +76,7 @@
(h/test "request sent options - Token Gated"
(h/setup-subs {:communities/my-pending-request-to-join "mock-id"
:communities/community {:role-permissions? true}
:profile/test-networks-enabled? false})
:communities/community {:role-permissions? true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts))
;(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
@@ -92,8 +86,7 @@
(h/test "banned options - Non token Gated"
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:banList true}
:profile/test-networks-enabled? false})
:communities/community {:banList true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/view-members))
(h/is-truthy (h/get-by-translation-text :t/view-community-rules))
@@ -104,8 +97,7 @@
(h/test "banned options - Token Gated"
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:banList 100
:role-permissions? true}
:profile/test-networks-enabled? false})
:role-permissions? true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts))
;(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
@@ -115,8 +107,7 @@
(h/test "banned options - Token Gated"
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:banList 100
:role-permissions? true}
:profile/test-networks-enabled? false})
:role-permissions? true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts))
;(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
@@ -127,7 +118,6 @@
(h/setup-subs {:communities/my-pending-request-to-join nil
:communities/community {:joined true
:muted true
:role-permissions? true}
:profile/test-networks-enabled? false})
:role-permissions? true}})
(h/render [options/community-options-bottom-sheet {:id "test"}])
(h/is-truthy (h/get-by-translation-text :t/unmute-community))))
@@ -36,13 +36,14 @@
(defn view-token-gating
[id]
{:icon :i/token
:right-icon :i/chevron-right
:accessibility-label :view-token-gating
:on-press #(rf/dispatch [:show-bottom-sheet
{:content (fn [] [permissions-sheet/view id])
:padding-bottom-override 16}])
:label (i18n/label :t/view-token-gating)})
(when config/show-not-implemented-features?
{:icon :i/token
:right-icon :i/chevron-right
:accessibility-label :view-token-gating
:on-press #(rf/dispatch [:show-bottom-sheet
{:content (fn [] [permissions-sheet/view id])
:padding-bottom-override 16}])
:label (i18n/label :t/view-token-gating)}))
(defn edit-shared-addresses
[id]
@@ -55,7 +56,7 @@
(defn mark-as-read
[id]
{:icon :i/mark-as-read
{:icon :i/up-to-date
:accessibility-label :mark-as-read
:label (i18n/label :t/mark-as-read)
:on-press #(hide-sheet-and-dispatch [:chat.ui/mark-all-read-in-community-pressed id])})
@@ -135,27 +136,23 @@
request-id])}])})
(defn not-joined-options
[id token-gated? intro-message test-networks-enabled?]
(let [common [(show-qr id) (share-community id)]
specific (cond
(and token-gated? (not test-networks-enabled?))
[(invite-contacts id) (view-token-gating id)]
token-gated?
[(invite-contacts id)]
(not token-gated?)
[(view-members id) (view-rules id intro-message) (invite-contacts id)])]
[(concat specific common)]))
[id token-gated? intro-message]
[[(when-not token-gated? (view-members id))
(when-not token-gated? (view-rules id intro-message))
(mark-as-read id)
(invite-contacts id)
(when token-gated? (view-token-gating id))
(show-qr id)
(share-community id)]])
(defn join-request-sent-options
[id token-gated? request-id intro-message test-networks-enabled?]
[(conj (first (not-joined-options id token-gated? intro-message test-networks-enabled?))
[id token-gated? request-id intro-message]
[(conj (first (not-joined-options id token-gated? intro-message))
(assoc (cancel-request-to-join id request-id) :add-divider? true))])
(defn banned-options
[id token-gated? intro-message test-networks-enabled?]
(not-joined-options id token-gated? intro-message test-networks-enabled?))
[id token-gated? intro-message]
(not-joined-options id token-gated? intro-message))
(defn joined-options
[id token-gated? muted? muted-till color intro-message]
@@ -189,19 +186,13 @@
(let [{:keys [role-permissions? admin joined
muted banList muted-till color
intro-message]} (rf/sub [:communities/community id])
request-id (rf/sub [:communities/my-pending-request-to-join id])
test-networks? (rf/sub [:profile/test-networks-enabled?])]
request-id (rf/sub [:communities/my-pending-request-to-join id])]
(cond
admin
(owner-options id role-permissions? muted muted-till intro-message)
joined
(joined-options id role-permissions? muted muted-till color intro-message)
request-id
(join-request-sent-options id role-permissions? request-id intro-message test-networks?)
banList
(banned-options id role-permissions? intro-message test-networks?)
:else
(not-joined-options id role-permissions? intro-message test-networks?))))
admin (owner-options id role-permissions? muted muted-till intro-message)
joined (joined-options id role-permissions? muted muted-till color intro-message)
request-id (join-request-sent-options id role-permissions? request-id intro-message)
banList (banned-options id role-permissions? intro-message)
:else (not-joined-options id role-permissions? intro-message))))
(defn community-options-bottom-sheet
[id]
+29 -36
View File
@@ -2,7 +2,6 @@
(:require
[clojure.string :as string]
[legacy.status-im.data-store.communities :as data-store.communities]
[oops.core :as oops]
[schema.core :as schema]
[status-im.constants :as constants]
[status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview.events]
@@ -26,7 +25,7 @@
token-permissions-check id last-opened-at]
:as community} (data-store.communities/<-rpc community-js)
previous-last-opened-at (get-in db [:communities id :last-opened-at])]
(when (and id (>= clock (get-in db [:communities id :clock])))
(when (>= clock (get-in db [:communities id :clock]))
{:db (assoc-in db
[:communities id]
(assoc community :last-opened-at (max last-opened-at previous-last-opened-at)))
@@ -224,14 +223,14 @@
:fx [[:dispatch [:communities/check-permissions-to-join-community community-id]]]})))
(defn community-fetched
[{:keys [db]} [community-id community-js]]
(when community-js
[{:keys [db]} [community-id community]]
(when community
{:db (update db :communities/fetching-communities dissoc community-id)
:fx [[:dispatch [:communities/handle-community community-js]]
:fx [[:dispatch [:communities/handle-community community]]
[:dispatch [:chat.ui/spectate-community community-id]]
[:dispatch
[:chat.ui/cache-link-preview-data (link-preview.events/community-link community-id)
(data-store.communities/<-rpc community-js)]]]}))
community]]]}))
(rf/reg-event-fx :chat.ui/community-fetched community-fetched)
@@ -254,19 +253,18 @@
(not (get-in db [:communities community-id]))
(not (get-in db [:communities/fetching-communities community-id])))
{:db (assoc-in db [:communities/fetching-communities community-id] true)
:json-rpc/call [{:method "wakuext_fetchCommunity"
:params [{:CommunityKey community-id
:TryDatabase true
:WaitForResponse true}]
:js-response true
:on-success (fn [community]
(if community
(rf/dispatch [:chat.ui/community-fetched community-id
community])
(failed-to-fetch-community
community-id
"community wasn't found at the store node")))
:on-error (partial failed-to-fetch-community community-id)}]}))
:json-rpc/call [{:method "wakuext_fetchCommunity"
:params [{:CommunityKey community-id
:TryDatabase true
:WaitForResponse true}]
:on-success (fn [community]
(if community
(rf/dispatch [:chat.ui/community-fetched community-id
community])
(failed-to-fetch-community
community-id
"community wasn't found at the store node")))
:on-error (partial failed-to-fetch-community community-id)}]}))
(schema/=> fetch-community
[:=>
@@ -285,15 +283,11 @@
(rf/reg-event-fx :communities/fetch-community fetch-community)
(defn spectate-community-success
[{:keys [db]} [response-js]]
(when response-js
(let [communities (oops/oget response-js "communities")
community (first communities)
community-id (when community (oops/oget community "id"))]
(when community
{:db (-> db
(assoc-in [:communities community-id :spectated] true))
:fx [[:dispatch [:communities/handle-community community]]]}))))
[{:keys [db]} [{:keys [communities]}]]
(when-let [community (first communities)]
{:db (-> db
(assoc-in [:communities (:id community) :spectated] true))
:fx [[:dispatch [:communities/handle-community community]]]}))
(rf/reg-event-fx :chat.ui/spectate-community-success spectate-community-success)
@@ -301,14 +295,13 @@
[{:keys [db]} [community-id]]
(let [{:keys [spectated joined]} (get-in db [:communities community-id])]
(when (and (not joined) (not spectated))
{:json-rpc/call [{:method "wakuext_spectateCommunity"
:params [community-id]
:js-response true
:on-success [:chat.ui/spectate-community-success]
:on-error (fn [err]
(log/error {:message
"Failed to spectate community"
:error err}))}]})))
{:json-rpc/call [{:method "wakuext_spectateCommunity"
:params [community-id]
:on-success [:chat.ui/spectate-community-success]
:on-error (fn [err]
(log/error {:message
"Failed to spectate community"
:error err}))}]})))
(schema/=> spectate-community
[:=>
@@ -1,6 +1,5 @@
(ns status-im.contexts.communities.events-test
(:require [cljs.test :refer [deftest is testing]]
[legacy.status-im.data-store.communities :as data-store.communities]
matcher-combinators.test
[status-im.contexts.chat.messenger.messages.link-preview.events :as link-preview.events]
[status-im.contexts.communities.events :as events]))
@@ -52,7 +51,7 @@
[:dispatch [:chat.ui/spectate-community community-id]]
[:dispatch
[:chat.ui/cache-link-preview-data "community-link+community-id"
(data-store.communities/<-rpc #js {"id" community-id})]]]}
{:id community-id}]]]}
(events/community-fetched cofx arg))))))
(testing "given a joined community"
(let [cofx {:db {:communities/fetching-communities {community-id true}}}
@@ -63,7 +62,7 @@
[:dispatch [:chat.ui/spectate-community community-id]]
[:dispatch
[:chat.ui/cache-link-preview-data "community-link+community-id"
(data-store.communities/<-rpc #js {"id" community-id})]]]}
{:id community-id}]]]}
(events/community-fetched cofx arg))))))
(testing "given a token-gated community"
(let [cofx {:db {:communities/fetching-communities {community-id true}}}
@@ -74,7 +73,7 @@
[:dispatch [:chat.ui/spectate-community community-id]]
[:dispatch
[:chat.ui/cache-link-preview-data "community-link+community-id"
(data-store.communities/<-rpc #js {"id" community-id})]]]}
{:id community-id}]]]}
(events/community-fetched cofx arg))))))
(testing "given nil community"
(testing "do nothing"
@@ -104,38 +103,26 @@
(events/spectate-community {:db {:communities {community-id {}}}} [community-id]))))))
(deftest spectate-community-success-test
(let [community-id-1 1
community-id-2 2]
(testing "given communities"
(testing "mark first community spectated true"
(is (match?
{:db {:communities {community-id-1 {:spectated true}}}}
(events/spectate-community-success {}
(clj->js [{:communities [{:id community-id-1}
{:id community-id-2}]}])))))
(testing "dispatch fxs for first community"
;; Convert the JavaScript object back to a Clojure map because `match?` does not work well
;; with JavaScript objects.
(is (match?
{:fx [[:dispatch [:communities/handle-community {:id community-id-1}]]]}
(let [result (events/spectate-community-success {}
(clj->js [{:communities
[{:id community-id-1}
{:id community-id-2}]}]))]
(update-in result [:fx 0 1] #(js->clj % :keywordize-keys true)))))))
(testing "given empty community"
(testing "do nothing"
(is (match?
nil
(events/spectate-community-success {}
(clj->js [{:communities []}]))))))
(testing "given nil community"
(testing "do nothing"
(is (match?
nil
(events/spectate-community-success {}
(clj->js []))))))))
(testing "given communities"
(testing "mark first community spectated true"
(is (match?
{:db {:communities {community-id {:spectated true}}}}
(events/spectate-community-success {} [{:communities [{:id community-id}]}]))))
(testing "dispatch fxs for first community"
(is (match?
{:fx [[:dispatch [:communities/handle-community {:id community-id}]]
]}
(events/spectate-community-success {} [{:communities [{:id community-id}]}])))))
(testing "given empty community"
(testing "do nothing"
(is (match?
nil
(events/spectate-community-success {} [{:communities []}])))))
(testing "given nil community"
(testing "do nothing"
(is (match?
nil
(events/spectate-community-success {} []))))))
(deftest get-revealed-accounts-test
(let [community {:id community-id}]
@@ -209,10 +209,9 @@
(when same-passwords?
[rn/view {:style style/disclaimer-container}
[quo/disclaimer
{:blur? true
:on-change (partial set-accepts-disclaimer? not)
:checked? accepts-disclaimer?
:customization-color user-color}
{:blur? true
:on-change (partial set-accepts-disclaimer? not)
:checked? accepts-disclaimer?}
(i18n/label :t/password-creation-disclaimer)]])
(when (and (= focused-input :password) (not same-passwords?))
[help
@@ -7,6 +7,7 @@
[status-im.contexts.onboarding.enable-notifications.style :as style]
[status-im.contexts.shell.jump-to.constants :as shell.constants]
[status-im.contexts.shell.jump-to.utils :as shell.utils]
[taoensso.timbre :as log]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
@@ -19,36 +20,39 @@
:description (i18n/label :t/enable-notifications-sub-title)
:description-accessibility-label :notifications-sub-title}])
(defn- finish-onboarding
[notifications-enabled?]
(rf/dispatch [:push-notifications/switch notifications-enabled?])
(shell.utils/change-selected-stack-id shell.constants/default-selected-stack true nil)
(rf/dispatch [:update-theme-and-init-root :shell-stack])
(rf/dispatch [:profile/show-testnet-mode-banner-if-enabled])
(rf/dispatch [:universal-links/process-stored-event]))
(defn enable-notification-buttons
[{:keys [insets]}]
(let [profile-color (rf/sub [:onboarding/customization-color])
ask-permission (fn []
(rf/dispatch [:request-notifications
{:on-allowed (fn []
(js/setTimeout #(finish-onboarding true)
300))
:on-denied (fn []
(js/setTimeout #(finish-onboarding false)
300))}]))
skip-permission #(finish-onboarding false)]
(let [profile-color (rf/sub [:onboarding/customization-color])]
[rn/view {:style (style/buttons insets)}
[quo/button
{:on-press ask-permission
{:on-press (fn []
(shell.utils/change-selected-stack-id
shell.constants/default-selected-stack
true
nil)
(rf/dispatch
[:request-permissions
{:permissions [:post-notifications]
:on-allowed #(log/info "push notification permissions were allowed")
:on-denied #(log/error "user denied push notification permissions")}])
(rf/dispatch [:push-notifications/switch true])
(rf/dispatch [:navigate-to-within-stack
[:screen/onboarding.welcome
:screen/onboarding.enable-notifications]]))
:type :primary
:icon-left :i/notifications
:accessibility-label :enable-notifications-button
:customization-color profile-color}
(i18n/label :t/intro-wizard-title6)]
[quo/button
{:on-press skip-permission
{:on-press (fn []
(shell.utils/change-selected-stack-id
shell.constants/default-selected-stack
true
nil)
(rf/dispatch [:navigate-to-within-stack
[:screen/onboarding.welcome
:screen/onboarding.enable-notifications]]))
:accessibility-label :enable-notifications-later-button
:type :grey
:background :blur
+19 -32
View File
@@ -71,20 +71,17 @@
{:events [:onboarding/create-account-and-login]}
[{:keys [db] :as cofx}]
(let [{:keys [display-name seed-phrase password image-path color] :as profile}
(:onboarding/profile db)
loading-screen (if (seq (:syncing/key-uid db))
:screen/onboarding.preparing-status
:screen/onboarding.generating-keys)]
(:onboarding/profile db)]
(rf/merge cofx
{:dispatch [:navigate-to-within-stack
[loading-screen
[:screen/onboarding.generating-keys
(get db
:onboarding/navigated-to-enter-seed-phrase-from-screen
:screen/onboarding.new-to-status)]]
:dispatch-later [{:ms constants/onboarding-generating-keys-animation-duration-ms
:dispatch [:navigate-to-within-stack
[:screen/onboarding.enable-notifications
loading-screen]]}]
:screen/onboarding.generating-keys]]}]
:db (-> db
(dissoc :profile/login)
(dissoc :auth-method)
@@ -137,32 +134,22 @@
(rf/defn seed-phrase-validated
{:events [:onboarding/seed-phrase-validated]}
[{:keys [db]} seed-phrase key-uid]
(let [syncing-account-recovered? (and (seq (:syncing/key-uid db))
(= (:syncing/key-uid db) key-uid))
next-screen (if syncing-account-recovered?
:screen/onboarding.create-profile-password
:screen/onboarding.create-profile)]
(if (contains? (:profile/profiles-overview db) key-uid)
{:effects.utils/show-confirmation
{:title (i18n/label :t/multiaccount-exists-title)
:content (i18n/label :t/multiaccount-exists-content)
:confirm-button-text (i18n/label :t/unlock)
:on-accept (fn []
(re-frame/dispatch [:pop-to-root :screen/profile.profiles])
(re-frame/dispatch
[:profile/profile-selected key-uid]))
:on-cancel #(re-frame/dispatch [:pop-to-root :multiaccounts])}}
{:db (-> db
(assoc-in [:onboarding/profile :seed-phrase] seed-phrase)
(assoc-in [:onboarding/profile :color] constants/profile-default-color))
:fx [[:dispatch
[:navigate-to-within-stack
[next-screen
(get db
:onboarding/navigated-to-enter-seed-phrase-from-screen
:screen/onboarding.new-to-status)]]]
(when-not syncing-account-recovered?
[:dispatch [:syncing/clear-syncing-data]])]})))
(if (contains? (:profile/profiles-overview db) key-uid)
{:effects.utils/show-confirmation
{:title (i18n/label :t/multiaccount-exists-title)
:content (i18n/label :t/multiaccount-exists-content)
:confirm-button-text (i18n/label :t/unlock)
:on-accept (fn []
(re-frame/dispatch [:pop-to-root :screen/profile.profiles])
(re-frame/dispatch
[:profile/profile-selected key-uid]))
:on-cancel #(re-frame/dispatch [:pop-to-root :multiaccounts])}}
{:db (assoc-in db [:onboarding/profile :seed-phrase] seed-phrase)
:dispatch [:navigate-to-within-stack
[:screen/onboarding.create-profile
(get db
:onboarding/navigated-to-enter-seed-phrase-from-screen
:screen/onboarding.new-to-status)]]}))
(rf/defn navigate-to-create-profile
{:events [:onboarding/navigate-to-create-profile]}
@@ -1,11 +0,0 @@
(ns status-im.contexts.onboarding.preparing-status.style)
(defn page-container
[insets]
{:flex 1
:padding-top (:top insets)})
(defn page-illustration
[width]
{:flex 1
:width width})
@@ -1,36 +0,0 @@
(ns status-im.contexts.onboarding.preparing-status.view
(:require
[quo.core :as quo]
[react-native.core :as rn]
[react-native.safe-area :as safe-area]
[status-im.common.resources :as resources]
[status-im.contexts.onboarding.generating-keys.style :as style]
[utils.i18n :as i18n]))
(defn title
[]
[rn/view
{:style {:margin-top 56
:height 56
:margin-bottom 10}}
[quo/text-combinations
{:container-style {:margin-horizontal 20
:margin-vertical 12}
:title (i18n/label :t/preparing-app-for-you)
:description (i18n/label :t/hang-in-there)}]])
(defn content
[]
(let [width (:width (rn/get-window))]
[rn/image
{:resize-mode :stretch
:style (style/page-illustration width)
:source (resources/get-image :preparing-status)}]))
(defn view
[]
(let [insets (safe-area/get-insets)]
[rn/view {:style (style/page-container insets)}
[:<>
[title]
[content]]]))
@@ -27,3 +27,7 @@
:align-items :center
:align-self :center
:justify-content :center})
(def try-again-button
{:margin-top 20
:padding-horizontal 20})
@@ -5,7 +5,6 @@
[status-im.common.resources :as resources]
[status-im.contexts.onboarding.common.background.view :as background]
[status-im.contexts.onboarding.syncing.progress.style :as style]
[utils.debounce :as debounce]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
@@ -26,40 +25,17 @@
:title-accessibility-label :progress-screen-title
:description-accessibility-label :progress-screen-sub-title}])
(defn- navigate-to-enter-seed-phrase
[]
(debounce/debounce-and-dispatch
[:onboarding/navigate-to-sign-in-by-seed-phrase :screen/onboarding.sync-or-recover-profile]
500))
(defn- try-again
[logged-in?]
(rf/dispatch [:syncing/clear-states])
(if logged-in?
(rf/dispatch [:navigate-back])
(rf/dispatch [:navigate-back-to :screen/onboarding.sync-or-recover-profile])))
(defn try-again-button
[profile-color logged-in?]
[quo/bottom-actions
{:actions (if logged-in? :one-action :two-actions)
:blur? true
:button-one-label (i18n/label :t/recovery-phrase)
:button-one-props {:type :primary
:accessibility-label :try-seed-phrase-button
:customization-color profile-color
:container-style {:flex 1}
:size 40
:on-press navigate-to-enter-seed-phrase}
(if logged-in? :button-one-label :button-two-label)
(i18n/label :t/try-again)
(if logged-in? :button-one-props :button-two-props)
{:type (if logged-in? :primary :grey)
:accessibility-label :try-again-later-button
:customization-color profile-color
:container-style {:flex 1}
:size 40
:on-press #(try-again logged-in?)}}])
[profile-color]
[quo/button
{:on-press (fn []
(rf/dispatch [:syncing/clear-states])
(rf/dispatch [:navigate-back]))
:accessibility-label :try-again-later-button
:customization-color profile-color
:size 40
:container-style style/try-again-button}
(i18n/label :t/try-again)])
(defn- illustration
[pairing-progress?]
@@ -71,7 +47,6 @@
(defn view
[in-onboarding?]
(let [pairing-status (rf/sub [:pairing/pairing-status])
logged-in? (rf/sub [:multiaccount/logged-in?])
pairing-progress? (pairing-progress pairing-status)
profile-color (or (:color (rf/sub [:onboarding/profile]))
(rf/sub [:profile/customization-color]))]
@@ -83,7 +58,7 @@
[page-title pairing-progress?]
[illustration pairing-progress?]
(when-not (pairing-progress pairing-status)
[try-again-button profile-color logged-in?])]))
[try-again-button profile-color])]))
(defn view-onboarding
[]
@@ -0,0 +1,36 @@
(ns status-im.contexts.onboarding.welcome.style)
(def default-margin 20)
(defn page-container
[insets]
{:flex 1
:padding-top (:top insets)})
(defn page-illustration
[width]
{:width width
:aspect-ratio 0.7
:height :auto})
(def page-title
{:margin-top 12
:margin-horizontal 20
:margin-bottom 8})
(defn buttons
[insets]
{:position :absolute
:left 0
:right 0
:padding-left default-margin
:padding-right default-margin
:bottom (+ 12 (:bottom insets))})
(def bottom-shadow
{:position :absolute
:height 64
:top 0
:bottom 0
:left 0
:right 0})
@@ -0,0 +1,54 @@
(ns status-im.contexts.onboarding.welcome.view
(:require
[quo.core :as quo]
[quo.foundations.colors :as colors]
[react-native.core :as rn]
[react-native.linear-gradient :as linear-gradient]
[react-native.safe-area :as safe-area]
[status-im.common.resources :as resources]
[status-im.contexts.onboarding.welcome.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(defn page-title
[]
(let [new-account? (rf/sub [:onboarding/new-account?])]
[quo/text-combinations
{:container-style style/page-title
:title (i18n/label (if new-account?
:t/welcome-to-web3
:t/welcome-back))
:title-accessibility-label :welcome-title
:description (i18n/label :t/welcome-to-web3-sub-title)
:description-accessibility-label :welcome-sub-title}]))
(defn view
[]
(let [profile-color (rf/sub [:onboarding/customization-color])
window (rf/sub [:dimensions/window])
insets (safe-area/get-insets)]
[rn/view {:style (style/page-container insets)}
[quo/page-nav
{:type :no-title
:background :blur
:icon-name :i/arrow-left
:on-press #(rf/dispatch [:navigate-back])}]
[page-title]
[rn/image
{:style (style/page-illustration (:width window))
:resize-mode :contain
:source (resources/get-image :welcome-illustration)}]
[rn/view {:style (style/buttons insets)}
(when rn/small-screen?
[linear-gradient/linear-gradient
{:style style/bottom-shadow
:colors [colors/neutral-100-opa-0 colors/neutral-100-opa-80]}])
[quo/button
{:on-press (fn []
(rf/dispatch [:update-theme-and-init-root :shell-stack])
(rf/dispatch [:profile/show-testnet-mode-banner-if-enabled])
(rf/dispatch [:universal-links/process-stored-event]))
:type :primary
:accessibility-label :welcome-button
:customization-color profile-color}
(i18n/label :t/start-using-status)]]]))
+16 -19
View File
@@ -34,25 +34,22 @@
(defn create
[]
(let [log-enabled? (boolean (not-empty config/log-level))]
(assoc
(login)
:deviceName (native-module/get-installation-name)
:rootDataDir (native-module/backup-disabled-data-dir)
:rootKeystoreDir (native-module/keystore-dir)
:logLevel (when log-enabled? config/log-level)
:logEnabled log-enabled?
:logFilePath (native-module/log-file-directory)
:verifyTransactionURL config/verify-transaction-url
:verifyENSURL config/verify-ens-url
:verifyENSContractAddress config/verify-ens-contract-address
:verifyTransactionChainID config/verify-transaction-chain-id
:wakuV2LightClient true
:wakuV2Fleet config/fleet
;; NOTE: https://github.com/status-im/status-go/pull/5570#discussion_r1690794119
:wakuV2EnableMissingMessageVerification true
:wakuV2EnableStoreConfirmationForMessagesSent false
:previewPrivacy config/blank-preview?
:testNetworksEnabled config/test-networks-enabled?)))
(assoc (login)
:deviceName (native-module/get-installation-name)
:rootDataDir (native-module/backup-disabled-data-dir)
:rootKeystoreDir (native-module/keystore-dir)
:logLevel (when log-enabled? config/log-level)
:logEnabled log-enabled?
:logFilePath (native-module/log-file-directory)
:verifyTransactionURL config/verify-transaction-url
:verifyENSURL config/verify-ens-url
:verifyENSContractAddress config/verify-ens-contract-address
:verifyTransactionChainID config/verify-transaction-chain-id
:wakuV2LightClient true
:wakuV2Fleet config/fleet
:wakuV2EnableStoreConfirmationForMessagesSent false
:previewPrivacy config/blank-preview?
:testNetworksEnabled config/test-networks-enabled?)))
(defn strip-file-prefix
[path]
@@ -142,8 +142,6 @@
(rf/dispatch [:chats-list/load-success result])
(rf/dispatch [:communities/get-user-requests-to-join])
(rf/dispatch [:profile.login/get-chats-callback]))}]
(when (:syncing/installation-id db)
[:dispatch [:pairing/finish-seed-phrase-fallback-syncing]])
(when-not new-account?
[:dispatch [:universal-links/process-stored-event]])]})))
@@ -1,7 +1,6 @@
(ns status-im.contexts.profile.recover.events
(:require
[native-module.core :as native-module]
[status-im.constants :as constants]
[status-im.contexts.profile.config :as profile.config]
status-im.contexts.profile.recover.effects
[utils.re-frame :as rf]
@@ -17,10 +16,10 @@
(assoc-in [:syncing :login-sha3-password] login-sha3-password))
:effects.profile/restore-and-login
(assoc (profile.config/create)
:displayName display-name
:mnemonic (security/safe-unmask-data seed-phrase)
:password login-sha3-password
:imagePath (profile.config/strip-file-prefix image-path)
:customizationColor (or color constants/profile-default-color)
:fetchBackup true)}))
(merge (profile.config/create)
{:displayName display-name
:mnemonic (security/safe-unmask-data seed-phrase)
:password login-sha3-password
:imagePath (profile.config/strip-file-prefix image-path)
:customizationColor color
:fetchBackup true})}))
@@ -1,78 +0,0 @@
(ns status-im.contexts.shell.activity-center.notification.syncing.view
(:require
[quo.core :as quo]
quo.theme
[react-native.core :as rn]
[status-im.common.new-device-sheet.view :as new-device-sheet]
[status-im.contexts.shell.activity-center.notification.common.view :as common]
[utils.datetime :as datetime]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(defn- swipeable
[{:keys [extra-fn]} child]
[common/swipeable
{:left-button common/swipe-button-read-or-unread
:left-on-press common/swipe-on-press-toggle-read
:right-button common/swipe-button-delete
:right-on-press common/swipe-on-press-delete
:extra-fn extra-fn}
child])
(defn installation-created-view
[{:keys [notification extra-fn]}]
(let [{:keys [installation-id read timestamp]} notification
customization-color (rf/sub [:profile/customization-color])
theme (quo.theme/use-theme)
more-details (rn/use-callback
(fn []
(rf/dispatch [:show-bottom-sheet
{:content
(fn []
[new-device-sheet/installation-request-creator-view
installation-id])}]))
[installation-id])]
[swipeable {:extra-fn extra-fn}
[quo/activity-log
{:title (i18n/label :t/sync-your-profile)
:customization-color customization-color
:icon :i/mobile
:timestamp (datetime/timestamp->relative timestamp)
:unread? (not read)
:context [(i18n/label :t/check-other-device-for-pairing)]
:items [{:type :button
:subtype :positive
:key :review-pairing-request
:blur? true
:label (i18n/label :t/more-details)
:theme theme
:on-press more-details}]}]]))
(defn installation-received-view
[{:keys [notification extra-fn]}]
(let [{:keys [installation-id read timestamp]} notification
customization-color (rf/sub [:profile/customization-color])
theme (quo.theme/use-theme)
review-pairing-request (rn/use-callback
(fn []
(rf/dispatch [:show-bottom-sheet
{:content
(fn []
[new-device-sheet/installation-request-receiver-view
installation-id])}]))
[installation-id])]
[swipeable {:extra-fn extra-fn}
[quo/activity-log
{:title (i18n/label :t/new-device-detected)
:customization-color customization-color
:icon :i/mobile
:timestamp (datetime/timestamp->relative timestamp)
:unread? (not read)
:context [(i18n/label :t/new-device-detected)]
:items [{:type :button
:subtype :positive
:key :review-pairing-request
:blur? true
:label (i18n/label :t/review-pairing-request)
:theme theme
:on-press review-pairing-request}]}]]))
@@ -10,8 +10,6 @@
(def ^:const admin 8)
(def ^:const community-kicked 9)
(def ^:const contact-verification 10)
(def ^:const new-installation-received 23)
(def ^:const new-installation-created 24)
(def ^:const all-supported
#{one-to-one-chat
@@ -22,9 +20,7 @@
community-request
admin
community-kicked
contact-verification
new-installation-received
new-installation-created})
contact-verification})
;; TODO: Replace with correct enum values once status-go implements them.
(def ^:const tx 66612)
@@ -19,7 +19,6 @@
[status-im.contexts.shell.activity-center.notification.membership.view :as membership]
[status-im.contexts.shell.activity-center.notification.mentions.view :as mentions]
[status-im.contexts.shell.activity-center.notification.reply.view :as reply]
[status-im.contexts.shell.activity-center.notification.syncing.view :as syncing]
[status-im.contexts.shell.activity-center.style :as style]
[status-im.contexts.shell.activity-center.tabs.empty-tab.view :as empty-tab]
[utils.re-frame :as rf]))
@@ -49,12 +48,6 @@
(= notification-type types/admin)
[admin/view props]
(= notification-type types/new-installation-received)
[syncing/installation-received-view props]
(= notification-type types/new-installation-created)
[syncing/installation-created-view props]
(types/membership notification-type)
(condp = notification-type
types/private-group-chat [membership/view props]
@@ -84,7 +84,7 @@
(load-and-show-profile scanned-text)
(utils-address/supported-address? scanned-text)
(when-let [address (utils-address/supported-address->eth-address scanned-text)]
(when-let [address (utils-address/supported-address->status-address scanned-text)]
(debounce/debounce-and-dispatch [:generic-scanner/scan-success address] 300)
(debounce/debounce-and-dispatch [:navigate-change-tab :wallet-stack] 300))
+3 -32
View File
@@ -2,7 +2,6 @@
(:require
[clojure.string :as string]
[native-module.core :as native-module]
[re-frame.core :as re-frame]
[react-native.platform :as platform]
[status-im.constants :as constants]
[status-im.contexts.profile.config :as profile.config]
@@ -22,45 +21,18 @@
{:events [:syncing/clear-states]}
[{:keys [db]} role]
{:db (dissoc db :syncing)})
(defn- input-connection-string-callback
[res]
(log/info "[local-pairing] input-connection-string-for-bootstrapping callback"
{:response res
:event :syncing/input-connection-string-for-bootstrapping})
(let [response (transforms/json->clj res)
installation-id (:installationId response)
key-uid (:keyUID response)
error (:error response)]
(when (seq installation-id)
(rf/dispatch [:syncing/set-syncing-installation-id installation-id key-uid]))
(when (seq error)
(let [error (when (sync-utils/extract-error res)
(str "generic-error: " res))]
(when (some? error)
(rf/dispatch [:toasts/upsert
{:type :negative
:text error}]))))
(rf/defn initiate-pairing-process
{:events [:syncing/initiate-pairing-process]}
[{:keys [db]}]
{:db (assoc db :syncing/pairing-process-initiated? true)})
(rf/defn set-syncing-installation-id
{:events [:syncing/set-syncing-installation-id]}
[{:keys [db]} installation-id key-uid]
{:db (assoc db
:syncing/key-uid key-uid
:syncing/installation-id installation-id)})
(defn clear-syncing-data
[{:keys [db]}]
{:db (dissoc
db
:syncing/key-uid
:syncing/installation-id
:syncing/pairing-process-initiated?)})
(re-frame/reg-event-fx :syncing/clear-syncing-data clear-syncing-data)
(rf/defn preflight-outbound-check-for-local-pairing
{:events [:syncing/preflight-outbound-check]}
[_ set-checks-passed]
@@ -95,7 +67,6 @@
(when (sync-utils/valid-connection-string? response)
(on-valid-connection-string response)
(rf/dispatch [:syncing/update-role constants/local-pairing-role-sender])
(rf/dispatch [:syncing/initiate-pairing-process])
(rf/dispatch [:hide-bottom-sheet])))]
(when-not (and error (string/blank? error))
(let [key-uid (get-in db [:profile/profile :key-uid])
@@ -244,10 +244,7 @@
first
key)
ownership-status (get ownership-status-by-address owner-address)
collectibles (->> collectibles
data-store/rpc->collectibles
(map #(update % :ownership distinct))
vec)
collectibles (data-store/rpc->collectibles collectibles)
pending-requests (dec (get-in db [:wallet :ui :collectibles :pending-requests]))
;; check if collectibles are updating (never fetched and cached before) for this address
updating-chains (-> (select-keys
@@ -304,20 +301,16 @@
old-value
new-value))
(def merge-skipping-empty-values (partial merge-with keep-not-empty-value))
(rf/reg-event-fx
:wallet/get-collectible-details-done
(fn [{db :db} [{:keys [message]}]]
(let [response (cske/transform-keys transforms/->kebab-case-keyword
(transforms/json->clj message))
{[collectible] :collectibles} response
known-collectible-info (get-in db [:wallet :ui :collectible :details])
merged-collectible (as-> known-collectible-info c
(merge-with keep-not-empty-value
c
collectible)
(update c :ownership distinct))]
{[collectible] :collectibles} response]
(if collectible
{:db (assoc-in db [:wallet :ui :collectible :details] merged-collectible)}
{:db (update-in db [:wallet :ui :collectible :details] merge-skipping-empty-values collectible)}
(log/error "failed to get collectible details"
{:event :wallet/get-collectible-details-done
:response response})))))
@@ -63,9 +63,7 @@
(defn view
[collectible]
(let [owner-address (or (rf/sub [:wallet/current-viewing-account-address])
(-> collectible :ownership first :address))
owner-account (rf/sub [:wallet-connect/account-details-by-address owner-address])
(let [owner-account (rf/sub [:wallet/collectible-details-owner collectible])
traits (-> collectible :collectible-data :traits)]
[:<>
[info
@@ -15,6 +15,7 @@
(def supported-collectible-types
#{"image/jpeg"
"image/gif"
"image/bmp"
"image/png"
"image/webp"
@@ -157,10 +157,12 @@
set-title-ref (rn/use-callback #(reset! title-ref %))
animation-shared-element-id (rf/sub [:animation-shared-element-id])
collectible (rf/sub [:wallet/collectible-details])
collectible-owner (rf/sub [:wallet/current-viewing-account])
collectible-owner (rf/sub [:wallet/collectible-details-owner collectible])
aspect-ratio (rf/sub [:wallet/collectible-aspect-ratio])
gradient-color (rf/sub [:wallet/collectible-gradient-color])
total-owned (:total-owned collectible)
total-owned (rf/sub [:wallet/total-owned-collectible
(:ownership collectible)
(:address collectible-owner)])
{:keys [id
preview-url
collection-data
@@ -40,8 +40,7 @@
[quo/collectible-list-item
{:type :card
:image-src (:uri preview-url)
:avatar-image-src (when (utils/supported-file? (:image-url collection-data))
(:image-url collection-data))
:avatar-image-src (:image-url collection-data)
:collectible-name (:name collectible-data)
:supported-file? (utils/supported-file? (:animation-media-type collectible-data))
:gradient-color-index gradient-color
@@ -15,7 +15,7 @@
:error-message (i18n/label :t/oops-this-qr-does-not-contain-an-address)
:validate-fn #(utils-address/supported-address? %)
:on-success-scan (fn [result]
(let [address (utils-address/supported-address->eth-address result)]
(let [address (utils-address/supported-address->status-address result)]
(when on-result (on-result address))
(debounce/debounce-and-dispatch
[:wallet/scan-address-success address]
@@ -284,7 +284,7 @@
collectible
(str (:name collection-data) " #" collectible-id))
owner-address (-> db :wallet :current-viewing-account-address)
owner-address (-> collectible :ownership first :address)
collectible-tx (-> db
(update-in [:wallet :ui :send] dissoc :token)
(assoc-in [:wallet :ui :send :collectible] collectible)
@@ -165,12 +165,10 @@
:as
token} (rf/sub [:wallet/wallet-send-token])
send-from-locked-amounts (rf/sub [:wallet/wallet-send-from-locked-amounts])
{:keys [total-balance]
:as token-by-symbol} (rf/sub [:wallet/token-by-symbol
{token-balance :total-balance
:as token-by-symbol} (rf/sub [:wallet/token-by-symbol
(str token-symbol)
enabled-from-chain-ids])
token-balance (or default-limit-crypto total-balance)
usd-conversion-rate (utils/token-usd-price token)
currency (rf/sub [:profile/currency])
conversion-rate (-> token
:market-values-per-currency
@@ -180,7 +178,12 @@
utils/token-usd-price
utils/one-cent-value
utils/calc-max-crypto-decimals)
[input-state set-input-state] (rn/use-state controlled-input/init-state)
[input-state set-input-state] (rn/use-state
(-> controlled-input/init-state
(controlled-input/set-upper-limit
(utils/cut-crypto-decimals-to-fit-usd-cents
(or default-limit-crypto token-balance)
conversion-rate))))
clear-input! #(set-input-state controlled-input/delete-all)
currency-symbol (rf/sub [:profile/currency-symbol])
loading-routes? (rf/sub
@@ -188,14 +191,6 @@
route (rf/sub [:wallet/wallet-send-route])
on-confirm (or default-on-confirm handle-on-confirm)
crypto-decimals (or token-decimals default-crypto-decimals)
max-limit (if crypto-currency?
(utils/cut-crypto-decimals-to-fit-usd-cents
token-balance
usd-conversion-rate)
(-> (money/crypto->fiat
token-balance
conversion-rate)
utils/cut-fiat-balance-to-two-decimals))
input-value (controlled-input/input-value input-state)
valid-input? (not (or (controlled-input/empty-value? input-state)
(controlled-input/input-error input-state)))
@@ -296,10 +291,6 @@
app-keyboard-listener (.addEventListener rn/app-state "change" dismiss-keyboard-fn)]
#(.remove app-keyboard-listener))))
(hot-reload/use-safe-unmount on-navigate-back)
(rn/use-effect
(fn []
(set-input-state #(controlled-input/set-upper-limit % max-limit)))
[max-limit])
(rn/use-effect
(fn []
(when input-error (debounce/clear-all))
@@ -30,15 +30,14 @@
(let [collectibles (rf/sub [:wallet/current-viewing-account-collectibles-filtered search-text])
search-performed? (not (string/blank? search-text))]
[collectibles-tab/view
{:collectibles collectibles
:current-account-address (rf/sub [:wallet/current-viewing-account-address])
:filtered? search-performed?
:on-end-reached #(rf/dispatch [:wallet/request-collectibles-for-current-viewing-account])
:on-collectible-press (fn [{:keys [collectible]}]
(rf/dispatch [:wallet/set-collectible-to-send
{:collectible collectible
:current-screen :screen/wallet.select-asset
:entry-point :account-send-button}]))}]))
{:collectibles collectibles
:filtered? search-performed?
:on-end-reached #(rf/dispatch [:wallet/request-collectibles-for-current-viewing-account])
:on-collectible-press (fn [{:keys [collectible]}]
(rf/dispatch [:wallet/set-collectible-to-send
{:collectible collectible
:current-screen :screen/wallet.select-asset
:entry-point :account-send-button}]))}]))
(defn- tab-view
[search-text selected-tab on-change-text]
@@ -15,9 +15,7 @@
#(rf/dispatch [:wallet/collectible-amount-navigate-back]))
send-transaction-data (rf/sub [:wallet/wallet-send])
collectible (:collectible send-transaction-data)
sender-address (rf/sub [:wallet/current-viewing-account-address])
balance (rf/sub [:wallet/total-owned-collectible (:ownership collectible)
sender-address])
balance (utils/collectible-balance collectible)
[input-state set-input-state] (rn/use-state (-> controlled-input/init-state
(controlled-input/set-value-numeric 1)
(controlled-input/set-lower-limit 1)))
@@ -5,8 +5,7 @@
[react-native.core :as rn]
[status-im.constants :as const]
[status-im.contexts.wallet.sheets.account-origin.style :as style]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
[utils.i18n :as i18n]))
(defn- header
[text]
@@ -42,5 +41,5 @@
:size 24
:icon-left :i/info
:container-style style/action-container
:on-press #(rf/dispatch [:open-url const/create-account-link])}
:on-press #(rn/open-url const/create-account-link)}
(i18n/label :t/read-more)]])
@@ -9,8 +9,7 @@
(defn- crypto-on-ramp-item
[{:keys [name description fees logo-url site-url recurrent-site-url]} _ _ {:keys [tab]}]
(let [open-url (rn/use-callback (fn []
(rf/dispatch [:open-url
(if (= tab :recurrent) recurrent-site-url site-url)]))
(rn/open-url (if (= tab :recurrent) recurrent-site-url site-url)))
[site-url recurrent-site-url tab])]
[quo/settings-item
{:title name
+27 -70
View File
@@ -8,8 +8,9 @@
[taoensso.timbre :as log]
[utils.address :as address]
[utils.debounce :as debounce]
[utils.hex :as hex]
[utils.i18n :as i18n]
[utils.money :as money]
[utils.number]
[utils.number :as number]))
(rf/reg-event-fx :wallet.swap/start
@@ -46,14 +47,14 @@
(rf/reg-event-fx :wallet.swap/set-max-slippage
(fn [{:keys [db]} [max-slippage]]
{:db (assoc-in db [:wallet :ui :swap :max-slippage] (number/parse-float max-slippage))}))
{:db (assoc-in db [:wallet :ui :swap :max-slippage] (utils.number/parse-float max-slippage))}))
(rf/reg-event-fx :wallet.swap/select-asset-to-receive
(fn [{:keys [db]} [{:keys [token]}]]
{:db (assoc-in db [:wallet :ui :swap :asset-to-receive] token)}))
(rf/reg-event-fx :wallet/start-get-swap-proposal
(fn [{:keys [db]} [{:keys [amount-in amount-out clean-approval-transaction?]}]]
(fn [{:keys [db]} [{:keys [amount-in amount-out]}]]
(let [wallet-address (get-in db [:wallet :current-viewing-account-address])
{:keys [asset-to-pay asset-to-receive
network]} (get-in db [:wallet :ui :swap])
@@ -96,17 +97,12 @@
(when-let [amount (or amount-in amount-out)]
{:db (update-in db
[:wallet :ui :swap]
#(cond-> %
:always
(assoc
:last-request-uuid request-uuid
:amount amount
:amount-hex amount-in-hex
:loading-swap-proposal? true)
:always
(dissoc :error-response)
clean-approval-transaction?
(dissoc :approval-transaction-id :approved-amount :swap-proposal)))
#(-> %
(assoc
:last-request-uuid request-uuid
:amount amount
:loading-swap-proposal? true)
(dissoc :error-response)))
:json-rpc/call [{:method "wallet_getSuggestedRoutesAsync"
:params params
:on-error (fn [error]
@@ -119,30 +115,17 @@
(rf/reg-event-fx :wallet/swap-proposal-success
(fn [{:keys [db]} [swap-proposal]]
(let [last-request-uuid (get-in db [:wallet :ui :swap :last-request-uuid])
amount-hex (get-in db [:wallet :ui :swap :amount-hex])
view-id (:view-id db)
request-uuid (:uuid swap-proposal)
best-routes (:best swap-proposal)
error-response (:error-response swap-proposal)]
(when (and (= request-uuid last-request-uuid)
(or (and (empty? best-routes) error-response)
(and
(pos? (count best-routes))
(= (:amount-in (first best-routes)) amount-hex))))
(when (= request-uuid last-request-uuid)
(cond-> {:db (update-in db
[:wallet :ui :swap]
assoc
:swap-proposal (when-not (empty? best-routes)
(assoc (first best-routes) :uuid request-uuid))
:swap-proposal (first best-routes)
:error-response (when (empty? best-routes) error-response)
:loading-swap-proposal? false)}
(empty? best-routes)
(assoc :fx
[[:dispatch
[:toasts/upsert
{:id :swap-proposal-error
:type :negative
:text error-response}]]])
;; Router is unstable and it can return a swap proposal and after auto-refetching it can
;; return an error. Ideally this shouldn't happen, but adding this behavior so if the
;; user is in swap confirmation screen or in token approval confirmation screen, we
@@ -173,18 +156,16 @@
{:event :wallet/stop-get-swap-proposal
:error error}))}]}))
(rf/reg-event-fx
:wallet/clean-swap-proposal
(fn [{:keys [db]} [{:keys [clean-approval-transaction?]}]]
(let [keys-to-dissoc (cond-> [:amount
:amount-hex
:last-request-uuid
:swap-proposal
:error-response
:loading-swap-proposal?]
clean-approval-transaction? (conj :approval-transaction-id :approved-amount))]
{:db (apply update-in db [:wallet :ui :swap] dissoc keys-to-dissoc)
:fx [[:dispatch [:wallet/stop-get-swap-proposal]]]})))
(rf/reg-event-fx :wallet/clean-swap-proposal
(fn [{:keys [db]}]
{:db (update-in db
[:wallet :ui :swap]
dissoc
:last-request-uuid
:swap-proposal
:error-response
:loading-swap-proposal?
:approval-transaction-id)}))
(rf/reg-event-fx :wallet/clean-swap
(fn [{:keys [db]}]
@@ -264,8 +245,10 @@
constants/min-token-decimals-to-display)
receive-amount (when amount-out
(number/remove-trailing-zeroes
(.toFixed (number/hex->whole
amount-out
(.toFixed (number/convert-to-whole-number
(native-module/hex-to-number
(hex/normalize-hex
amount-out))
receive-token-decimals)
decimals-to-display)))]
(rf/dispatch [:wallet.swap/add-authorized-transaction
@@ -285,7 +268,7 @@
:screen/wallet.swap-confirmation)])
(when-not approval-required?
(rf/dispatch [:wallet/select-account-tab :activity])
(rf/dispatch [:wallet/clean-swap])
(debounce/debounce-and-dispatch [:wallet/clean-swap] 1000)
(debounce/debounce-and-dispatch
[:toasts/upsert
{:id :swap-transaction-pending
@@ -359,8 +342,6 @@
:token-symbol token-symbol
:provider-name provider-name
:account-name account-name}))}]]]}
transaction-confirmed?
(assoc :db (assoc-in db [:wallet :ui :swap :approved-amount] amount))
(not transaction-confirmed?)
(assoc :db (update-in db [:wallet :ui :swap] dissoc :approval-transaction-id)))))))
@@ -387,27 +368,3 @@
:receive-token-symbol receive-token-symbol
:receive-amount receive-amount})
(i18n/label :t/swap-failed))}]]]}))))
(rf/reg-event-fx :wallet.swap/flip-assets
(fn [{:keys [db]}]
(let [{:keys [asset-to-pay asset-to-receive
swap-proposal amount]} (get-in db [:wallet :ui :swap])
receive-token-decimals (:decimals asset-to-receive)
amount-out (when swap-proposal (:amount-out swap-proposal))
receive-amount (when amount-out
(-> amount-out
(number/hex->whole receive-token-decimals)
(money/to-fixed receive-token-decimals)))]
{:db (update-in db
[:wallet :ui :swap]
#(-> %
(assoc
:asset-to-pay asset-to-receive
:asset-to-receive asset-to-pay
:amount (or receive-amount amount))
(dissoc :swap-proposal
:error-response
:loading-swap-proposal?
:last-request-uuid
:approved-amount
:approval-transaction-id)))})))
@@ -212,7 +212,7 @@
(defn- slide-button
[]
(let [loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
swap-proposal (rf/sub [:wallet/swap-proposal])
account (rf/sub [:wallet/current-viewing-account])
on-auth-success (rn/use-callback #(rf/dispatch
[:wallet/swap-transaction
@@ -1,5 +1,6 @@
(ns status-im.contexts.wallet.swap.setup-swap.view
(:require [clojure.string :as string]
[native-module.core :as native-module]
[quo.core :as quo]
[react-native.core :as rn]
[react-native.platform :as platform]
@@ -10,7 +11,7 @@
[status-im.contexts.wallet.common.account-switcher.view :as account-switcher]
[status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.swap.setup-swap.style :as style]
[utils.debounce :as debounce]
[utils.hex :as hex]
[utils.i18n :as i18n]
[utils.money :as money]
[utils.number :as number]
@@ -21,18 +22,14 @@
(defn- on-close
[]
(rf/dispatch [:wallet/clean-swap-proposal {:clean-approval-transaction? true}])
(rf/dispatch [:wallet/clean-swap-proposal])
(events-helper/navigate-back))
(defn- fetch-swap-proposal
[{:keys [amount valid-input? clean-approval-transaction?]}]
[{:keys [amount valid-input?]}]
(if valid-input?
(debounce/debounce-and-dispatch [:wallet/start-get-swap-proposal
{:amount-in amount
:clean-approval-transaction? clean-approval-transaction?}]
100)
(rf/dispatch [:wallet/clean-swap-proposal
{:clean-approval-transaction? clean-approval-transaction?}])))
(rf/dispatch [:wallet/start-get-swap-proposal {:amount-in amount}])
(rf/dispatch [:wallet/clean-swap-proposal])))
(defn- data-item
[{:keys [title subtitle size subtitle-icon loading?]}]
@@ -72,13 +69,11 @@
asset-to-pay (rf/sub [:wallet/swap-asset-to-pay])
currency (rf/sub [:profile/currency])
loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
swap-proposal (rf/sub [:wallet/swap-proposal])
approval-required (rf/sub [:wallet/swap-proposal-approval-required])
approval-amount-required (rf/sub [:wallet/swap-proposal-approval-amount-required])
currency-symbol (rf/sub [:profile/currency-symbol])
approval-transaction-status (rf/sub [:wallet/swap-approval-transaction-status])
approval-transaction-id (rf/sub [:wallet/swap-approval-transaction-id])
approved-amount (rf/sub [:wallet/swap-approved-amount])
pay-input-num-value (controlled-input/value-numeric input-state)
pay-input-amount (controlled-input/input-value input-state)
pay-token-symbol (:symbol asset-to-pay)
@@ -98,16 +93,16 @@
(min pay-token-decimals
constants/min-token-decimals-to-display)))
approval-amount-required-num (when approval-amount-required
(str (number/hex->whole approval-amount-required
pay-token-decimals)))
pay-input-error? (or (and (not (string/blank? pay-input-amount))
(money/greater-than
(money/bignumber pay-input-num-value)
(money/bignumber
pay-token-balance-selected-chain)))
(money/equal-to (money/bignumber
available-crypto-limit)
(money/bignumber 0)))
(str (number/convert-to-whole-number
(native-module/hex-to-number
(hex/normalize-hex
approval-amount-required))
pay-token-decimals)))
pay-input-error? (and (not (string/blank? pay-input-amount))
(money/greater-than
(money/bignumber pay-input-num-value)
(money/bignumber
pay-token-balance-selected-chain)))
valid-pay-input? (and
(not (string/blank?
pay-input-amount))
@@ -116,9 +111,8 @@
request-fetch-swap-proposal (rn/use-callback
(fn []
(fetch-swap-proposal
{:amount pay-input-amount
:valid-input? valid-pay-input?
:clean-approval-transaction? true}))
{:amount pay-input-amount
:valid-input? valid-pay-input?}))
[pay-input-amount])]
(rn/use-effect
(fn []
@@ -129,8 +123,7 @@
:error? pay-input-error?
:token pay-token-symbol
:customization-color :blue
:show-approval-label? (or (and swap-proposal approval-required)
approval-transaction-id)
:show-approval-label? (and swap-proposal approval-required)
:auto-focus? true
:show-keyboard? false
:status (cond
@@ -152,7 +145,7 @@
:confirmed :approved
:finalised :approved
:approve)
:token-value (or approval-amount-required-num approved-amount)
:token-value approval-amount-required-num
:button-props {:on-press on-approve-press}
:customization-color account-color
:token-symbol pay-token-symbol}}]))
@@ -176,9 +169,14 @@
receive-token-symbol (:symbol asset-to-receive)
receive-token-decimals (:decimals asset-to-receive)
amount-out-whole-number (when amount-out
(number/hex->whole amount-out receive-token-decimals))
(number/convert-to-whole-number
(native-module/hex-to-number
(utils.hex/normalize-hex
amount-out))
receive-token-decimals))
amount-out-num (if amount-out-whole-number
(number/to-fixed amount-out-whole-number receive-token-decimals)
(number/remove-trailing-zeroes
(.toFixed amount-out-whole-number receive-token-decimals))
default-text-for-unfocused-input)
receive-token-fiat-value (str (utils/calculate-token-fiat-value
{:currency currency
@@ -207,7 +205,7 @@
(defn- action-button
[{:keys [on-press]}]
(let [account-color (rf/sub [:wallet/current-viewing-account-color])
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
swap-proposal (rf/sub [:wallet/swap-proposal])
loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
approval-required? (rf/sub [:wallet/swap-proposal-approval-required])
approval-transaction-status (rf/sub [:wallet/swap-approval-transaction-status])]
@@ -225,10 +223,10 @@
[]
(let [[pay-input-state set-pay-input-state] (rn/use-state controlled-input/init-state)
[pay-input-focused? set-pay-input-focused?] (rn/use-state true)
refetch-interval (rn/use-ref-atom nil)
[refetch-interval set-refetch-interval] (rn/use-state nil)
error-response (rf/sub [:wallet/swap-error-response])
loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
swap-proposal (rf/sub [:wallet/swap-proposal])
asset-to-pay (rf/sub [:wallet/swap-asset-to-pay])
network (rf/sub [:wallet/swap-network])
pay-input-amount (controlled-input/input-value pay-input-state)
@@ -272,9 +270,7 @@
(fn []
(set-pay-input-state
controlled-input/delete-last)
(rf/dispatch [:wallet/clean-swap-proposal
{:clean-approval-transaction?
true}])))
(rf/dispatch [:wallet/clean-swap-proposal])))
on-max-press (rn/use-callback
(fn [max-value]
(set-pay-input-state
@@ -284,66 +280,32 @@
max-value)))))
on-refresh-swap-proposal (rn/use-callback
(fn []
(let
[bottom-sheets (rf/sub
[:bottom-sheet-sheets])
approval-transaction-status
(rf/sub
[:wallet/swap-approval-transaction-status])]
(let [bottom-sheets (rf/sub
[:bottom-sheet-sheets])]
(when-not valid-pay-input?
(when @refetch-interval
(js/clearTimeout @refetch-interval))
(reset! refetch-interval nil))
(when @refetch-interval
(js/clearTimeout @refetch-interval))
(reset! refetch-interval nil)
(js/clearInterval refetch-interval)
(set-refetch-interval nil))
(when (and valid-pay-input?
(not loading-swap-proposal?)
(not bottom-sheets)
(not= approval-transaction-status
:pending))
(not bottom-sheets))
(fetch-swap-proposal
{:amount pay-input-amount
:valid-input? valid-pay-input?
:clean-approval-transaction? false}))))
{:amount pay-input-amount
:valid-input? valid-pay-input?}))))
[valid-pay-input? loading-swap-proposal?
pay-input-amount])
on-asset-to-pay-change (fn []
(when valid-pay-input?
(fetch-swap-proposal
{:amount pay-input-amount
:valid-input? valid-pay-input?
:clean-approval-transaction? true})))]
pay-input-amount])]
(rn/use-effect (fn []
(when @refetch-interval
(js/clearInterval @refetch-interval)
(reset! refetch-interval nil))
(when refetch-interval
(js/clearInterval refetch-interval)
(set-refetch-interval nil))
(when (or swap-proposal error-response)
(reset! refetch-interval
(js/setInterval
on-refresh-swap-proposal
constants/swap-proposal-refresh-interval-ms))))
(set-refetch-interval (js/setInterval
on-refresh-swap-proposal
constants/swap-proposal-refresh-interval-ms))))
[swap-proposal error-response])
(rn/use-unmount (fn []
(rf/dispatch [:wallet/clean-swap-proposal {:clean-approval-transaction? true}])
(when @refetch-interval
(js/clearInterval @refetch-interval)
(reset! refetch-interval nil))))
(rn/use-effect
(fn []
(when asset-to-pay
(let [swap-amount (rf/sub [:wallet/swap-amount])]
(when (and swap-amount refetch-interval)
(js/clearTimeout @refetch-interval)
(reset! refetch-interval nil))
(if (and swap-amount (not= swap-amount pay-input-amount))
(set-pay-input-state
(fn [input-state]
(controlled-input/set-input-value
input-state
swap-amount)))
(on-asset-to-pay-change)))))
[asset-to-pay])
(when refetch-interval
(js/clearInterval refetch-interval)
(set-refetch-interval nil))))
[rn/view {:style style/container}
[account-switcher/view
{:on-press on-close
@@ -360,12 +322,7 @@
:on-input-focus (fn []
(when platform/android? (rf/dispatch [:dismiss-keyboard]))
(set-pay-input-focused? true))}]
[swap-order-button
{:on-press (fn []
(when @refetch-interval
(js/clearTimeout @refetch-interval)
(reset! refetch-interval nil))
(rf/dispatch [:wallet.swap/flip-assets]))}]
[swap-order-button {:on-press #(js/alert "Swap Order Pressed")}]
[receive-token-input
{:input-focused? (not pay-input-focused?)
:on-token-press #(js/alert "Token Pressed")
@@ -157,13 +157,12 @@
(defn- slide-button
[]
(let [loading-swap-proposal? (rf/sub [:wallet/swap-loading-swap-proposal?])
swap-proposal (rf/sub [:wallet/swap-proposal-without-fees])
swap-proposal (rf/sub [:wallet/swap-proposal])
account (rf/sub [:wallet/current-viewing-account])
account-color (:color account)
on-auth-success (rn/use-callback (fn [data]
(rf/dispatch [:wallet/stop-get-swap-proposal])
(rf/dispatch [:wallet/swap-transaction
(security/safe-unmask-data data)])))]
on-auth-success (rn/use-callback #(rf/dispatch
[:wallet/swap-transaction
(security/safe-unmask-data %)]))]
[standard-auth/slide-button
{:size :size-48
:track-text (i18n/label :t/slide-to-swap)
@@ -148,7 +148,7 @@
:sessionJson
transforms/json->clj
data-store/get-dapp-redirect-url))]
{:fx [[:effects/open-url redirect-url]]})))
{:fx [[:open-url redirect-url]]})))
(rf/reg-event-fx
:wallet-connect/dismiss-request-modal
@@ -23,5 +23,5 @@
data-store/get-dapp-redirect-url
(fn [_] "native://redirect-url")]
(is (match? {:fx [[:effects/open-url "native://redirect-url"]]}
(is (match? {:fx [[:open-url "native://redirect-url"]]}
(dispatch [event-id]))))))
+1 -5
View File
@@ -146,12 +146,8 @@
(rf/reg-event-fx :open-share open-share)
(rf/reg-event-fx :open-url
(fn [_ [url]]
{:fx [[:effects/open-url url]]}))
(rf/reg-fx
:effects/open-url
:open-url
(fn [url]
(when (not (string/blank? url))
(.openURL ^js react/linking (url/normalize-url url)))))
+10 -11
View File
@@ -34,10 +34,10 @@
[status-im.contexts.onboarding.generating-keys.view :as generating-keys]
[status-im.contexts.onboarding.identifiers.view :as identifiers]
[status-im.contexts.onboarding.intro.view :as intro]
[status-im.contexts.onboarding.preparing-status.view :as preparing-status]
[status-im.contexts.onboarding.sign-in.view :as sign-in]
[status-im.contexts.onboarding.syncing.progress.view :as syncing-devices]
[status-im.contexts.onboarding.syncing.results.view :as syncing-results]
[status-im.contexts.onboarding.welcome.view :as welcome]
[status-im.contexts.preview.feature-flags.view :as feature-flags]
[status-im.contexts.preview.quo.component-preview.view :as component-preview]
[status-im.contexts.preview.quo.main :as quo.preview]
@@ -346,15 +346,6 @@
:popStackOnPress false}}
:component generating-keys/view}
{:name :screen/onboarding.preparing-status
:options {:theme :dark
:layout options/onboarding-transparent-layout
:animations transitions/push-animations-for-transparent-background
:popGesture false
:hardwareBackButton {:dismissModalOnPress false
:popStackOnPress false}}
:component preparing-status/view}
{:name :screen/onboarding.enter-seed-phrase
:options {:theme :dark
:layout options/onboarding-transparent-layout
@@ -365,7 +356,9 @@
{:name :screen/onboarding.enable-notifications
:options {:theme :dark
:layout options/onboarding-transparent-layout
:animations transitions/push-animations-for-transparent-background
:animations (merge
transitions/new-to-status-modal-animations
transitions/push-animations-for-transparent-background)
:popGesture false
:modalPresentationStyle :overCurrentContext
:hardwareBackButton {:dismissModalOnPress false
@@ -416,6 +409,12 @@
:options {:theme :dark}
:component syncing-results/view}
{:name :screen/onboarding.welcome
:options {:theme :dark
:layout options/onboarding-transparent-layout
:animations transitions/push-animations-for-transparent-background}
:component welcome/view}
{:name :emoji-picker
:options {:sheet? true}
:component emoji-picker/view}
+23 -30
View File
@@ -22,37 +22,32 @@
(testing "returns an empty set when no types have unread notifications"
(swap! rf-db/app-db assoc-in
[:activity-center :unread-counts-by-type]
{types/one-to-one-chat 0
types/private-group-chat 0
types/contact-verification 0
types/contact-request 0
types/mention 0
types/reply 0
types/admin 0
types/new-installation-received 0
types/new-installation-created 0})
{types/one-to-one-chat 0
types/private-group-chat 0
types/contact-verification 0
types/contact-request 0
types/mention 0
types/reply 0
types/admin 0})
(is (= #{} (rf/sub [sub-name]))))
(testing "returns a set with all types containing positive unread counts"
(swap! rf-db/app-db assoc-in
[:activity-center :unread-counts-by-type]
{types/one-to-one-chat 1
types/private-group-chat 0
types/contact-verification 1
types/contact-request 0
types/mention 3
types/reply 0
types/admin 2
types/new-installation-received 1
types/new-installation-created 0})
{types/one-to-one-chat 1
types/private-group-chat 0
types/contact-verification 1
types/contact-request 0
types/mention 3
types/reply 0
types/admin 2})
(let [actual (rf/sub [sub-name])]
(is (= #{types/one-to-one-chat
types/contact-verification
types/mention
types/admin
types/new-installation-received}
types/admin}
actual))
(is (set? actual)))))
@@ -60,17 +55,15 @@
[sub-name]
(swap! rf-db/app-db assoc-in
[:activity-center :unread-counts-by-type]
{types/one-to-one-chat 1
types/private-group-chat 2
types/contact-verification 3
types/contact-request 4
types/mention 5
types/reply 6
types/admin 7
types/new-installation-received 8
types/new-installation-created 9})
{types/one-to-one-chat 1
types/private-group-chat 2
types/contact-verification 3
types/contact-request 4
types/mention 5
types/reply 6
types/admin 7})
(is (= 45 (rf/sub [sub-name]))))
(is (= 28 (rf/sub [sub-name]))))
(h/deftest-sub :activity-center/unread-indicator
[sub-name]
-5
View File
@@ -266,11 +266,6 @@
(fn [{:keys [preview-privacy?]}]
(boolean preview-privacy?)))
(re-frame/reg-sub :profile/installation-id
:<- [:profile/profile]
(fn [{:keys [installation-id]}]
installation-id))
(defn- replace-multiaccount-image-uri
[profile ens-names port font-file avatar-opts theme]
(let [{:keys [key-uid ens-name? images
+8 -9
View File
@@ -1,8 +1,7 @@
(ns status-im.subs.wallet.collectibles
(:require
[clojure.string :as string]
[re-frame.core :as re-frame]
[utils.collection]))
[re-frame.core :as re-frame]))
(defn- filter-collectibles-in-chains
[collectibles chain-ids]
@@ -70,7 +69,6 @@
(->> all-collectibles
(apply interleave)
(remove nil?)
(utils.collection/distinct-by :id)
(add-collectibles-preview-url)))))
(re-frame/reg-sub
@@ -120,8 +118,8 @@
:wallet/collectible-details-owner
:<- [:wallet/accounts]
(fn [accounts [_ collectible]]
(let [owner-address (-> collectible :ownership first :address)]
(some #(when (= (:address %) owner-address)
(let [collectible-address (-> collectible :ownership first :address)]
(some #(when (= (:address %) collectible-address)
%)
accounts))))
@@ -129,11 +127,12 @@
:wallet/total-owned-collectible
:<- [:wallet/accounts-without-watched-accounts]
(fn [accounts [_ ownership address]]
(let [addresses (if address
#{address}
(set (map :address accounts)))]
(let [addresses (map :address accounts)]
(reduce (fn [acc item]
(if (contains? addresses (:address item))
(if (or
(and (not address)
(contains? (set addresses) (:address item)))
(= (:address item) address))
(+ acc (js/parseInt (:balance item)))
acc))
0
+12 -21
View File
@@ -1,9 +1,11 @@
(ns status-im.subs.wallet.swap
(:require [clojure.string :as string]
[native-module.core :as native-module]
[re-frame.core :as rf]
[status-im.constants :as constants]
[status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.send.utils :as send-utils]
[utils.hex :as hex]
[utils.money :as money]
[utils.number :as number]))
@@ -93,25 +95,6 @@
:<- [:wallet/swap]
:-> :swap-proposal)
(rf/reg-sub
:wallet/swap-proposal-without-fees
:<- [:wallet/swap]
(fn [swap]
(let [swap-proposal (:swap-proposal swap)]
(reduce dissoc
swap-proposal
[:gas-fees :gas-amount :token-fees :bonder-fees :approval-gas-fees]))))
(rf/reg-sub
:wallet/swap-amount
:<- [:wallet/swap]
:-> :amount)
(rf/reg-sub
:wallet/swap-approved-amount
:<- [:wallet/swap]
:-> :approved-amount)
(rf/reg-sub
:wallet/swap-loading-swap-proposal?
:<- [:wallet/swap]
@@ -134,7 +117,11 @@
(fn [[amount-out asset-to-receive]]
(let [receive-token-decimals (:decimals asset-to-receive)
receive-amount (when amount-out
(number/hex->whole amount-out receive-token-decimals))
(number/convert-to-whole-number
(native-module/hex-to-number
(hex/normalize-hex
amount-out))
receive-token-decimals))
receive-amount (when amount-out
(number/remove-trailing-zeroes
(.toFixed receive-amount
@@ -149,7 +136,11 @@
(fn [[amount-in asset-to-pay]]
(let [pay-token-decimals (:decimals asset-to-pay)
pay-amount (when amount-in
(number/hex->whole amount-in pay-token-decimals))
(number/convert-to-whole-number
(native-module/hex-to-number
(hex/normalize-hex
amount-in))
pay-token-decimals))
pay-amount (when amount-in
(number/remove-trailing-zeroes
(.toFixed pay-amount
+9 -18
View File
@@ -101,39 +101,30 @@
(defn eip-3770-address?
"Checks if address follows EIP-3770 format which is default for Status"
[address]
(re-find regx-eip-3770-address address))
[s]
(re-find regx-eip-3770-address s))
(defn supported-address?
[s]
(boolean (or (eip-3770-address? s)
(metamask-address? s))))
(defn metamask-address->eip-3770-address
(defn metamask-address->status-address
[metamask-address]
(when-let [[_ address metamask-network-suffix] (split-metamask-address metamask-address)]
(if-let [status-network-prefix (eip-155-suffix->eip-3770-prefix metamask-network-suffix)]
(str status-network-prefix address)
address)))
(defn extract-address-without-chains-info
[address]
(re-find regx-address-contains address))
(defn metamask-address->eth-address
[eip-3770-address]
(extract-address-without-chains-info eip-3770-address))
(defn eip-3770-address->eth-address
[eip-3770-address]
(extract-address-without-chains-info eip-3770-address))
(defn supported-address->eth-address
(defn supported-address->status-address
[address]
(cond
(eip-3770-address? address)
(eip-3770-address->eth-address address)
address
(metamask-address? address)
(metamask-address->eth-address address)))
(metamask-address->status-address address)))
(defn extract-address-without-chains-info
[address]
(re-find regx-address-contains address))
+5 -78
View File
@@ -46,19 +46,6 @@
"ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa"
"ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"])
(def valid-eip-3770-addresses
["0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
"eth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
"eth:arb1:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
"eth:arb1:oeth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"])
(def invalid-eip-3770-addresses
["0x+38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
"eth3:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
":eth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
"0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2:eth"
"eth:arb10x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"])
(def invalid-metamask-addresses
["ethe:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0x1"
":0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa4b1"
@@ -67,29 +54,13 @@
"ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd20xa4b1"
"ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2:0xa"])
(def metamask-to-eip-3770
[{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0x1"
:eip-3770 "eth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa4b1"
:eip-3770 "arb1:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa"
:eip-3770 "oeth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
:eip-3770 "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethe:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0x1" :eip-3770 nil}
{:metamask ":0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa4b1" :eip-3770 nil}
{:metamask "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa" :eip-3770 nil}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0x1d" :eip-3770 nil}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd20xa4b1" :eip-3770 nil}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2:0xa" :eip-3770 nil}])
(def metamask-to-status
[{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0x1"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
:status "eth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa4b1"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
:status "arb1:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0xa"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
:status "oeth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:metamask "ethe:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2@0x1" :status nil}
@@ -99,26 +70,6 @@
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd20xa4b1" :status nil}
{:metamask "ethereum:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2:0xa" :status nil}])
(def eip-3770-to-status
[{:eip-3770 "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:eip-3770 "eth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:eip-3770 "eth:arb1:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:eip-3770 "eth:arb1:oeth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"
:status "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:status nil
:eip-3770 "0x+38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:status nil
:eip-3770 "eth3:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:status nil
:eip-3770 ":eth:0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}
{:status nil
:eip-3770 "0x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2:eth"}
{:status nil
:eip-3770 "eth:arb10x38cf6E0Ba4C4530735616e1Ee7ff5FbCB726fBd2"}])
(deftest metamask-address?-test
(testing "Check valid metamask addresses"
(dorun
@@ -129,33 +80,9 @@
(for [address invalid-metamask-addresses]
(is (not (utils.address/metamask-address? address)))))))
(deftest eip-3770-address?-test
(testing "Check valid eip-3770 addresses"
(dorun
(for [address valid-eip-3770-addresses]
(is (utils.address/eip-3770-address? address)))))
(testing "Check invalid eip-3770 addresses"
(dorun
(for [address invalid-eip-3770-addresses]
(is (not (utils.address/metamask-address? address)))))))
(deftest metamask-address->eip-3770-address-test
(testing "Check metamask to status address conversion is valid"
(dorun
(for [{metamask-address :metamask
eip-3770-address :eip-3770} metamask-to-eip-3770]
(is (= eip-3770-address (utils.address/metamask-address->eip-3770-address metamask-address)))))))
(deftest supported-address->status-address-test
(deftest metamask-address->status-address-test
(testing "Check metamask to status address conversion is valid"
(dorun
(for [{metamask-address :metamask
status-address :status} metamask-to-status]
(is (= status-address (utils.address/supported-address->eth-address metamask-address))))))
(testing "Check eip-3770 to status address conversion is valid"
(dorun
(for [{eip-3770-address :eip-3770
status-address :status} eip-3770-to-status]
(is (= status-address (utils.address/supported-address->eth-address eip-3770-address)))))))
(is (= status-address (utils.address/metamask-address->status-address metamask-address)))))))
+3 -6
View File
@@ -44,18 +44,15 @@
(defn greater-than-or-equals
[^js bn1 ^js bn2]
(when (bignumber? bn1)
(.greaterThanOrEqualTo bn1 bn2)))
(.greaterThanOrEqualTo bn1 bn2))
(defn greater-than
[bn1 bn2]
(when (bignumber? bn1)
(.greaterThan ^js bn1 bn2)))
(.greaterThan ^js bn1 bn2))
(defn less-than
[bn1 bn2]
(when (bignumber? bn1)
(.lessThan ^js bn1 bn2)))
(.lessThan ^js bn1 bn2))
(defn equal-to
[n1 n2]
+1 -17
View File
@@ -1,8 +1,5 @@
(ns utils.number
(:require [clojure.string :as string]
[native-module.core :as native-module]
[utils.hex :as utils.hex]
[utils.money :as utils.money]))
(:require [clojure.string :as string]))
(defn naive-round
"Quickly and naively round number `n` up to `decimal-places`.
@@ -64,16 +61,3 @@
(str "." (string/replace decimals #"0+$" ""))
"")
""))))
(defn hex->whole
[num decimals]
(-> num
utils.hex/normalize-hex
native-module/hex-to-number
(convert-to-whole-number decimals)))
(defn to-fixed
[num decimals]
(-> num
(utils.money/to-fixed decimals)
remove-trailing-zeroes))
+3 -5
View File
@@ -18,7 +18,7 @@
(defn <-js-map
"Shallowly transforms JS Object keys/values with `key-fn`/`val-fn`.
Returns m if `m` is not an instance of `js/Object`.
Returns nil if `m` is not an instance of `js/Object`.
Implementation taken from `js->clj`, but with the ability to customize how
keys and/or values are transformed in one loop.
@@ -33,8 +33,7 @@
([^js m]
(<-js-map m nil))
([^js m {:keys [key-fn val-fn]}]
(assert (or (nil? m) (identical? (type m) js/Object) (map? m)))
(if (identical? (type m) js/Object)
(when (identical? (type m) js/Object)
(persistent!
(reduce (fn [r k]
(let [v (oops/oget+ m k)
@@ -42,8 +41,7 @@
new-val (if val-fn (val-fn k v) v)]
(assoc! r new-key new-val)))
(transient {})
(js-keys m)))
m)))
(js-keys m))))))
(defn js-stringify
[js-object spaces]
+1 -1
View File
@@ -13,7 +13,7 @@
(are [expected m]
(is (equals-as-json expected (sut/<-js-map m)))
nil nil
{:a 1} {:a 1}
nil #js []
#js {} #js {}
#js {"a" 1 "b" 2} #js {"a" 1 "b" 2}))
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "feat/log_and_panic",
"commit-sha1": "484f303862c4afdaf01c2f75fcf61d4f5cf11339",
"src-sha256": "06rn8995z6n5lx84imzyrapm4nl3p59j3fcka2dxpln3kcj6apyk"
"version": "f859b58c3896523b2fb9a09b3e5c1cedb04f959b",
"commit-sha1": "f859b58c3896523b2fb9a09b3e5c1cedb04f959b",
"src-sha256": "009nd47aajng5k7wrcqv5zvvzniaswqi706fpkbbjhqziympi1s1"
}
+17 -19
View File
@@ -28,31 +28,29 @@ class BaseTestReport:
file_name = "%s.json" % test_name
return os.path.join(self.TEST_REPORT_DIR, file_name)
def save_logs(self, logs: dict):
logs_paths = {}
for log in logs.keys():
log_path = os.path.join(self.TEST_REPORT_DIR, log)
result = open(log_path, 'wb')
result.write(logs[log])
def save_geth(self, geth: dict):
geth_paths = {}
for log in geth.keys():
geth_path = os.path.join(self.TEST_REPORT_DIR, log)
result = open(geth_path, 'wb')
result.write(geth[log])
result.close()
logs_paths[log] = log_path
return logs_paths
geth_paths[log] = geth_path
return geth_paths
def save_test(self, test, geth: dict = None, requests_log: dict = None):
for log in geth, requests_log:
if log:
logs_paths = self.save_logs(log)
def save_test(self, test, geth: dict = None):
if geth:
geth_paths = self.save_geth(geth)
else:
if hasattr(test, 'geth_paths'):
geth_paths = test.geth_paths
else:
if hasattr(test, 'logs_paths'):
logs_paths = test.logs_paths
else:
logs_paths = ''
geth_paths = ''
file_path = self.get_test_report_file_path(test.name)
test_dict = {
'testrail_case_id': test.testrail_case_id,
'name': test.name,
'logs_paths': logs_paths,
'geth_paths': geth_paths,
'testruns': list(),
'group_name': test.group_name,
'secured': test.secured
@@ -76,7 +74,7 @@ class BaseTestReport:
first_commands=testrun_data['first_commands'],
xfail=testrun_data['xfail']))
tests.append(SingleTestData(name=test_data['name'],
logs_paths=test_data['logs_paths'],
geth_paths=test_data['geth_paths'],
testruns=testruns,
testrail_case_id=test_data['testrail_case_id'],
grop_name=test_data['group_name'],
+2 -2
View File
@@ -2,11 +2,11 @@ from typing import Dict
class SingleTestData(object):
def __init__(self, name, testruns, testrail_case_id, logs_paths, grop_name, secured):
def __init__(self, name, testruns, testrail_case_id, geth_paths, grop_name, secured):
self.testrail_case_id = testrail_case_id
self.name = name
self.testruns = testruns
self.logs_paths = logs_paths
self.geth_paths = geth_paths
self.group_name = grop_name
self.secured = secured
+3 -2
View File
@@ -8,6 +8,7 @@ from os import environ
from sys import argv
import emoji
import pytest
import requests
from support.base_test_report import BaseTestReport
@@ -213,9 +214,9 @@ class TestrailReport(BaseTestReport):
if re.findall(pattern, res['comment']):
res_id = res['id']
try:
for log in test.logs_paths.keys():
for geth in test.geth_paths.keys():
self.add_attachment(method='add_attachment_to_result/%s' % str(res_id),
path=test.logs_paths[log])
path=test.geth_paths[geth])
except (AttributeError, FileNotFoundError):
pass
break
@@ -163,8 +163,8 @@ class TestActivityCenterContactRequestMultipleDevicePR(MultipleSharedDeviceTestC
def _device_1_creates_user():
self.home_1.just_fyi("Device 1 creates a new user")
self.home_1.reopen_app(sign_in=False)
self.device_1.create_user(username=new_username_1, first_user=False)
self.profile_1.driver.reset()
self.device_1.create_user(username=new_username_1)
def _device_2_sign_in():
self.home_2.just_fyi("Device 2 sign in, user name is " + self.username_2)
+22 -27
View File
@@ -64,14 +64,14 @@ def get_capabilities_sauce_lab():
caps = dict()
caps['platformName'] = 'Android'
caps['idleTimeout'] = 1000
caps['appium:app'] = 'storage:filename=' + test_suite_data.apk_name
caps['appium:app'] = 'sauce-storage:' + test_suite_data.apk_name
caps['appium:deviceName'] = 'Android GoogleAPI Emulator'
caps['appium:deviceOrientation'] = 'portrait'
caps['appium:platformVersion'] = '14.0'
caps['appium:automationName'] = 'UiAutomator2'
caps['appium:newCommandTimeout'] = 600
caps['appium:idleTimeout'] = 1000
caps['appium:hideKeyboard'] = True
caps['appium:unicodeKeyboard'] = True
caps['appium:automationName'] = 'UiAutomator2'
caps['appium:setWebContentDebuggingEnabled'] = True
caps['appium:ignoreUnimportantViews'] = False
@@ -81,14 +81,14 @@ def get_capabilities_sauce_lab():
caps['appium:enforceXPath1'] = True
caps['enforceXPath1'] = True
caps['sauce:options'] = dict()
caps['sauce:options']['appiumVersion'] = '2.11.0'
caps['sauce:options']['appiumVersion'] = '2.0.0'
caps['sauce:options']['username'] = sauce_username
caps['sauce:options']['accessKey'] = sauce_access_key
caps['sauce:options']['build'] = run_name
caps['sauce:options']['name'] = test_suite_data.current_test.name
caps['sauce:options']['maxDuration'] = 3600
caps['sauce:options']['idleTimeout'] = 1000
# caps['sauce:options']['android.gpu.mode'] = 'hardware'
caps['sauce:options']['android.gpu.mode'] = 'hardware'
options = AppiumOptions()
options.load_capabilities(caps)
@@ -111,13 +111,12 @@ def get_app_path():
return app_path
def get_geth_path():
return get_app_path() + 'geth.log'
def pull_geth(driver):
result = driver.pull_file(get_app_path() + 'geth.log')
return base64.b64decode(result)
def pull_requests_log(driver):
result = driver.pull_file(get_app_path() + 'requests.log')
result = driver.pull_file(get_geth_path())
return base64.b64decode(result)
@@ -378,23 +377,21 @@ class SauceSharedMultipleDeviceTestCase(AbstractTestCase):
test_suite_data.current_test.group_name = self.__class__.__name__
def teardown_method(self, method):
log_names, log_contents = [], []
geth_names, geth_contents = [], []
for driver in self.drivers:
try:
self.print_sauce_lab_info(self.drivers[driver])
self.add_alert_text_to_report(self.drivers[driver])
log_names.append(
geth_names.append(
'%s_geth%s.log' % (test_suite_data.current_test.name, str(self.drivers[driver].number)))
log_contents.append(pull_geth(self.drivers[driver]))
log_names.append(
'%s_requests%s.log' % (test_suite_data.current_test.name, str(self.drivers[driver].number)))
log_contents.append(pull_requests_log(self.drivers[driver]))
geth_contents.append(pull_geth(self.drivers[driver]))
except (WebDriverException, AttributeError, RemoteDisconnected, ProtocolError):
pass
finally:
try:
logs = {log_names[i]: log_contents[i] for i in range(len(log_names))}
test_suite_data.current_test.logs_paths = github_report.save_logs(logs)
geth = {geth_names[i]: geth_contents[i] for i in range(len(geth_names))}
test_suite_data.current_test.geth_paths = github_report.save_geth(geth)
except IndexError:
pass
@@ -416,14 +413,11 @@ class SauceSharedMultipleDeviceTestCase(AbstractTestCase):
group_setup_failed = True
else:
group_setup_failed = False
log_contents, log_names = list(), list()
geth_contents = list()
try:
for i, driver in cls.drivers.items():
for _, driver in cls.drivers.items():
if group_setup_failed:
log_contents.append(pull_geth(driver=driver))
log_names.append('%s_geth%s.log' % (cls.__name__, i))
log_contents.append(pull_requests_log(driver=driver))
log_names.append('%s_requests%s.log' % (cls.__name__, i))
geth_contents.append(pull_geth(driver=driver))
session_id = driver.session_id
try:
sauce.jobs.update_job(username=sauce_username, job_id=session_id, name=cls.__name__)
@@ -455,12 +449,13 @@ class SauceSharedMultipleDeviceTestCase(AbstractTestCase):
except AttributeError:
pass
logs = dict(zip(log_names, log_contents))
logs_paths = github_report.save_logs(logs)
geth_names = ['%s_geth%s.log' % (cls.__name__, i) for i in range(len(geth_contents))]
geth = dict(zip(geth_names, geth_contents))
geth_paths = github_report.save_geth(geth)
for test in test_suite_data.tests:
if group_setup_failed:
test.logs_paths = logs_paths
test.geth_paths = geth_paths
github_report.save_test(test)
@@ -147,8 +147,8 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
url_message = 'Test with link: https://status.im/ here should be nothing unusual.'
self.chat_1.send_message(url_message)
self.chat_2.chat_element_by_text(url_message).wait_for_element(20)
# self.chat_2.chat_element_by_text(url_message).long_press_element_by_coordinate(rel_x=0.8, rel_y=0.8)
self.chat_2.quote_message(url_message)
self.chat_2.chat_element_by_text(url_message).long_press_element_by_coordinate(rel_x=0.8, rel_y=0.8)
self.chat_2.reply_message_button.click()
self.chat_2.send_message(reply)
replied_message = self.chat_1.chat_element_by_text(reply)
if replied_message.replied_message_text != url_message:
@@ -231,10 +231,9 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
or self.chat_1.pinned_messages_list.message_element_by_text(self.message_4).is_element_displayed():
self.errors.append("Can pin more than 3 messages in chat")
else:
unpin_element = self.chat_1.element_by_translation_id('unpin-from-chat')
self.chat_1.pinned_messages_list.message_element_by_text(self.message_2).long_press_element(
element_to_release_on=unpin_element)
self.chat_1.pinned_messages_list.message_element_by_text(self.message_2).long_press_element()
self.home_1.just_fyi("Unpin one message so that another could be pinned")
unpin_element = self.chat_1.element_by_translation_id('unpin-from-chat')
unpin_element.click_until_absense_of_element(desired_element=unpin_element)
self.chat_1.pin_message(self.message_4, 'pin-to-chat')
if not (self.chat_1.chat_element_by_text(self.message_4).pinned_by_label.is_element_displayed(30) and
@@ -254,7 +253,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
pinned_message = self.chat_1.pinned_messages_list.message_element_by_text(self.message_4)
unpin_element = self.chat_1.element_by_translation_id("unpin-from-chat")
pinned_message.long_press_element(element_to_release_on=unpin_element)
pinned_message.long_press_until_element_is_shown(unpin_element)
unpin_element.click_until_absense_of_element(unpin_element)
# try:
# self.chat_2.chat_element_by_text(self.message_4).pinned_by_label.wait_for_invisibility_of_element()
@@ -267,7 +266,7 @@ class TestOneToOneChatMultipleSharedDevicesNewUi(MultipleSharedDeviceTestCase):
except Failed:
self.errors.append(
"Pinned messages count is not 2 after unpinning the last pinned message for user %s" % (
chat_number + 1)
chat_number + 1)
)
self.errors.verify_no_errors()
@@ -396,9 +396,8 @@ class TestGroupChatMultipleDeviceMergedNewUI(MultipleSharedDeviceTestCase):
self.chats[0].send_message(self.message_4)
self.chats[0].pin_message(self.message_4, 'pin-to-chat')
self.chats[0].view_pinned_messages_button.click_until_presence_of_element(self.chats[0].pinned_messages_list)
self.chats[0].pinned_messages_list.message_element_by_text(self.message_2).long_press_element()
unpin_element = self.chats[0].element_by_translation_id('unpin-from-chat')
self.chats[0].pinned_messages_list.message_element_by_text(self.message_2).long_press_element(
element_to_release_on=unpin_element)
unpin_element.click_until_absense_of_element(desired_element=unpin_element)
self.chats[0].chat_element_by_text(self.message_4).click()
self.chats[0].pin_message(self.message_4, 'pin-to-chat')
@@ -9,7 +9,7 @@ from selenium.common.exceptions import NoSuchElementException, TimeoutException,
from tests import marks, run_in_parallel, pytest_config_global, transl
from tests.base_test_case import create_shared_drivers, MultipleSharedDeviceTestCase
from views.chat_view import CommunityView, ChatView
from views.chat_view import CommunityView
from views.dbs.waku_backup import user as waku_user
from views.sign_in_view import SignInView
@@ -71,7 +71,6 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase):
self.home.get_to_community_channel_from_home(self.community_name)
message_to_delete = "message to delete and undo"
self.channel.send_message(message_to_delete)
self.channel.chat_element_by_text(message_to_delete).wait_for_sent_state()
self.channel.delete_message_in_chat(message_to_delete)
try:
self.channel.element_by_text("Undo").click()
@@ -246,7 +245,7 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase):
@marks.testrail_id(703503)
def test_community_discovery(self):
try:
# workaround for case if a user is logged out in the previous test
# workaround for case if a user is logged out in the previous test
self.sign_in.get_user_profile_by_index(index=1).click()
self.sign_in.sign_in()
except NoSuchElementException:
@@ -285,11 +284,9 @@ class TestCommunityOneDeviceMerged(MultipleSharedDeviceTestCase):
# if community_name == 'Status':
self.home.just_fyi("Check Status community screen")
card.click()
self.community_view.join_button.save_new_screenshot_of_element('status_community_join_button_aaa.png')
if self.community_view.join_button.is_element_differs_from_template(
'status_community_join_button.png'):
self.errors.append("Status community Join button is different from expected template.")
self.community_view.community_logo.save_new_screenshot_of_element('status_community_logo_aaa.png')
if self.community_view.community_logo.is_element_differs_from_template('status_community_logo.png'):
self.errors.append("Status community logo is different from expected template.")
@@ -327,8 +324,7 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.home_1.get_chat(self.username_2).wait_for_visibility_of_element()
self.chat_1 = self.home_1.get_chat(self.username_2).click()
self.chat_1.send_message('hey')
self.chat_2 = self.home_2.get_chat(self.username_1).click_until_presence_of_element(
ChatView(self.drivers[1]).chat_message_input)
self.chat_2 = self.home_2.get_chat(self.username_1).click()
# self.chat_2.send_message(self.text_message)
# [home.click_system_back_button_until_element_is_shown() for home in self.homes]
self.home_1.navigate_back_to_home_view()
@@ -507,9 +503,8 @@ class TestCommunityMultipleDeviceMerged(MultipleSharedDeviceTestCase):
self.channel_2.navigate_back_to_chat_view()
self.channel_2.just_fyi("Can reply to images")
# self.channel_2.chat_element_by_text(image_description).long_press_element_by_coordinate(rel_x=0.8, rel_y=0.8)
# self.channel_2.reply_message_button.click()
self.channel_2.quote_message(image_description)
self.channel_2.chat_element_by_text(image_description).long_press_element_by_coordinate(rel_x=0.8, rel_y=0.8)
self.channel_2.reply_message_button.click()
message_text = 'reply to image'
self.channel_2.chat_message_input.send_keys(message_text)
self.channel_2.send_message_button.click()
@@ -913,7 +908,7 @@ class TestCommunityMultipleDeviceMergedTwo(MultipleSharedDeviceTestCase):
self.device_2.just_fyi("Sender edits the message with a mention")
chat_element = self.channel_2.chat_element_by_text(self.username_1)
chat_element.wait_for_sent_state()
chat_element.long_press_element()
chat_element.long_press_element_by_coordinate()
edit_done = False
expected_message = ""
try:
+15 -28
View File
@@ -8,8 +8,8 @@ import emoji
import imagehash
from PIL import Image, ImageChops, ImageStat
from appium.webdriver.common.mobileby import MobileBy
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException, TimeoutException
from selenium.webdriver import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
@@ -317,25 +317,18 @@ class BaseElement(object):
x, y = location['x'], location['y']
self.driver.swipe(start_x=x, start_y=y, end_x=x, end_y=depth)
def long_press_element(self, element_to_release_on=None):
def long_press_element(self):
element = self.find_element()
self.driver.info("Long press on `%s`" % self.name)
action = ActionChains(self.driver)
action.click_and_hold(element).perform()
time.sleep(2)
if element_to_release_on:
action.release(element_to_release_on.find_element()).perform()
else:
action.release(element).perform()
action = TouchAction(self.driver)
action.long_press(element).release().perform()
def long_press_until_element_is_shown(self, expected_element):
element = self.find_element()
self.driver.info("Long press on `%s` until expected element is shown" % self.name)
action = ActionChains(self.driver)
action = TouchAction(self.driver)
for _ in range(3):
action.click_and_hold(element).perform()
time.sleep(2)
action.release(element).perform()
action.long_press(element).release().perform()
if expected_element.is_element_displayed():
return
@@ -345,9 +338,8 @@ class BaseElement(object):
size = element.size
x = int(location['x'] + size['width'] * rel_x)
y = int(location['y'] + size['height'] * rel_y)
action = ActionChains(self.driver)
action.move_to_element_with_offset(to_element=element, xoffset=x, yoffset=y).click_and_hold().perform()
action.release(element).perform()
action = TouchAction(self.driver)
action.long_press(x=x, y=y).release().perform()
def measure_time_before_element_appears(self, max_wait_time=30):
def wrapper():
@@ -403,24 +395,19 @@ class EditBox(BaseElement):
self.driver.info("Paste text from clipboard into `%s`" % self.name)
self.long_press_element()
time.sleep(2)
action = ActionChains(self.driver)
element = self.find_element()
location = element.location
action = TouchAction(self.driver)
location = self.find_element().location
x, y = location['x'], location['y']
action.move_by_offset(xoffset=x + 25, yoffset=y - 50).click().perform()
action.release(element).perform()
action.press(x=x + 25, y=y - 50).release().perform()
def cut_text(self):
self.driver.info("Cut text in `%s`" % self.name)
element = self.find_element()
location = element.location
location = self.find_element().location
x, y = location['x'], location['y']
action = ActionChains(self.driver)
action.move_by_offset(xoffset=x, yoffset=y).click_and_hold().perform()
action.release(element).perform()
action = TouchAction(self.driver)
action.long_press(x=x, y=y).release().perform()
time.sleep(2)
action.move_by_offset(xoffset=x + 50, yoffset=y - 50).click().perform()
action.release(element).perform()
action.press(x=x + 50, y=y - 50).release().perform()
class Text(BaseElement):
+5 -4
View File
@@ -7,8 +7,8 @@ from datetime import datetime
from appium.webdriver import WebElement
from appium.webdriver.applicationstate import ApplicationState
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, TimeoutException
from selenium.webdriver import ActionChains
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait
@@ -221,7 +221,7 @@ class AirplaneModeButton(Button):
super().__init__(driver, accessibility_id="Airplane mode")
def open_quick_action_menu(self):
action = ActionChains(self.driver)
action = TouchAction(self.driver)
action.press(None, 200, 0).move_to(None, 200, 300).perform()
def click(self):
@@ -713,7 +713,7 @@ class BaseView(object):
def close_share_popup(self):
self.driver.info("Closing share popup")
ActionChains(self.driver).tap(None, 255, 104, 1).perform()
TouchAction(self.driver).tap(None, 255, 104, 1).perform()
time.sleep(3)
def tap_mutual_cr_switcher(self):
@@ -855,7 +855,8 @@ class BaseView(object):
send_transaction.sign_transaction(keycard=keycard)
def tap_by_coordinates(self, x, y):
self.driver.tap(positions=[(x, y)])
action = TouchAction(self.driver)
action.press(None, x, y).release().perform()
# Method-helper
def write_page_source_to_file(self, full_path_to_file):
+12 -14
View File
@@ -4,9 +4,9 @@ from datetime import datetime, timedelta
from time import sleep
import dateutil.parser
from appium.webdriver.common.touch_action import TouchAction
from selenium.common.exceptions import NoSuchElementException, TimeoutException, StaleElementReferenceException, \
InvalidElementStateException
from selenium.webdriver import ActionChains
from tests import emojis, common_password
from views.base_element import Button, EditBox, Text, BaseElement, SilentButton
@@ -711,22 +711,17 @@ class ChatMessageInput(EditBox):
super().__init__(driver, accessibility_id="chat-message-input")
def paste_text_from_clipboard(self):
action = ActionChains(self.driver)
element = self.find_element()
location = element.location
action = TouchAction(self.driver)
location = self.find_element().location
x, y = location['x'], location['y']
action.move_by_offset(xoffset=x + 250, yoffset=y).click_and_hold().perform() # long press
action.release(element).perform()
action.move_by_offset(xoffset=x + 50, yoffset=y - 50).click().perform() # tap Paste
action.release(element).perform()
action.long_press(x=x + 250, y=y).release().perform() # long press
action.tap(x=x + 50, y=y - 50).release().perform() # tap Paste
def click_inside(self):
action = ActionChains(self.driver)
element = self.find_element()
location = element.location
x, y = location['x'] + 250, location['y']
action.move_to_element_with_offset(to_element=element, xoffset=x, yoffset=y).click().perform()
action.release(element).perform()
action = TouchAction(self.driver)
location = self.find_element().location
x, y = location['x'], location['y']
action.tap(x=x + 250, y=y).release().perform()
class ChatView(BaseView):
@@ -1198,6 +1193,9 @@ class ChatView(BaseView):
def mention_user(self, user_name: str):
self.driver.info("Mention user %s in the chat" % user_name)
# gboard = self.driver.available_ime_engines[0]
# self.driver.activate_ime_engine(gboard) # workaround to get mentions list expanded
self.chat_message_input.click_inside()
self.chat_message_input.send_keys("@")
try:
self.mentions_list.wait_for_element()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 KiB

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

+12 -23
View File
@@ -191,6 +191,7 @@ class SignInView(BaseView):
self.reset_database_checkbox = Button(self.driver, translation_id="reset-database")
self.move_and_reset_button = MoveAndResetButton(self.driver)
self.choose_storage_button = Button(self.driver, translation_id="choose-storage")
self.enter_seed_phrase_next_button = Button(self.driver, translation_id="enter-seed-phrase")
self.keycard_required_option = Button(self.driver, translation_id="empty-keycard-required")
# errors
@@ -263,20 +264,15 @@ class SignInView(BaseView):
# self.identifiers_button.wait_and_click(30)
if enable_notifications:
self.enable_notifications_button.wait_and_click()
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
for _ in range(3):
self.allow_button.click_if_shown(sec=10)
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.enable_notifications_button.click_if_shown()
if self.chats_tab.is_element_displayed():
if self.start_button.is_element_displayed():
break
else:
self.maybe_later_button.wait_and_click()
for _ in range(3):
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.maybe_later_button.click_if_shown()
if self.chats_tab.is_element_displayed():
break
self.maybe_later_button.click_until_presence_of_element(self.start_button)
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.start_button.click()
self.chats_tab.wait_for_visibility_of_element(30)
self.driver.info("## New multiaccount is created successfully!", device=False)
return self.get_home_view()
@@ -298,22 +294,15 @@ class SignInView(BaseView):
self.continue_button.click_until_presence_of_element(self.profile_title_input)
self.set_profile(username, set_image)
self.set_password(password)
# if self.enable_biometric_maybe_later_button.is_element_displayed(10):
# self.enable_biometric_maybe_later_button.click()
# self.identifiers_button.wait_and_click(30)
if enable_notifications:
self.enable_notifications_button.wait_and_click()
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
for _ in range(3):
self.allow_button.click_if_shown(sec=10)
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.enable_notifications_button.click_if_shown()
if self.chats_tab.is_element_displayed():
break
self.enable_notifications_button.click_until_presence_of_element(self.start_button)
else:
self.maybe_later_button.wait_and_click()
for _ in range(3):
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.maybe_later_button.click_if_shown()
if self.chats_tab.is_element_displayed():
break
self.maybe_later_button.click_until_presence_of_element(self.start_button)
self.cancel_button.click_if_shown() # TODO: remove when issue 20806 is fixed
self.start_button.click()
self.chats_tab.wait_for_visibility_of_element(30)
self.driver.info("## Multiaccount is recovered successfully!", device=False)
return self.get_home_view()
+2 -13
View File
@@ -363,7 +363,6 @@
"check-before-syncing-doc-description": "To sync your devices successfully, make sure to check and complete these steps:",
"check-on-block-explorer": "Check on block explorer",
"check-on-opensea": "Check on opensea",
"check-other-device-for-pairing": "Check your other device for a pairing request.",
"check-your-account-balance-and-activity": "Check your account balance and activity",
"check-your-recovery-phrase": "Check your seed phrase",
"choose-actions": "Choose actions",
@@ -965,6 +964,7 @@
"enter-puk-code-description": "6-digit passcode has been blocked.\n Please enter PUK code to unblock passcode.",
"enter-recipient-address-or-username": "Enter address or username of the recipient",
"enter-recovery-phrase": "Enter recovery phrase",
"enter-seed-phrase": "Enter seed phrase",
"enter-sync-code": "Enter sync code",
"enter-url": "Enter URL",
"enter-user-pk": "Enter user public key",
@@ -1111,7 +1111,6 @@
"group-membership-request": "Group membership request",
"groups": "Groups",
"gwei": "Gwei",
"hang-in-there": "Hang in there! Just a few more seconds!",
"has-permissions": "has permission to access",
"hash": "Hash",
"have-a-sync-code?": "Have a sync code?",
@@ -1583,7 +1582,6 @@
"mobile-syncing-sheet-title": "Sync using mobile data?",
"mon": "Mon",
"more": "more",
"more-details": "More details",
"more-details-in-privacy-policy-1": "For more details refer to our ",
"more-details-in-privacy-policy-2": "Privacy Policy",
"more-details-in-privacy-policy-settings-1": "For details on this and other potential limited data processing by Status, see our ",
@@ -1652,9 +1650,6 @@
"new-community-title": "New community",
"new-contact": "New contact",
"new-contract": "New Contract",
"new-device-detected": "New device detected",
"new-device-detected-other-device-message": "Check your other device for a pairing request. Ensure that the this device ID displayed on your other device. Only proceed with pairing and syncing if the IDs are identical.",
"new-device-detected-recovered-device-message": "A new device has been detected. You can see device ID below and on your other device. Only confirm the request if device ID matches.",
"new-favourite": "New favourite",
"new-group": "New group",
"new-group-chat": "New group chat",
@@ -1822,17 +1817,14 @@
"page-camera-request-blocked": "camera requests blocked. To enable camera requests go to Settings",
"page-would-like-to-use-camera": "would like to use your camera",
"pair": "Pair",
"pair-and-sync": "Pair and Sync",
"pair-card": "Pair to this device",
"pair-code": "Pair code",
"pair-code-explanation": "Pairs card to a different device (up to 5) to unlock keys and sign transactions with the same Keycard",
"pair-code-placeholder": "Pair code...",
"pair-device-toast": "Device successfully paired",
"pair-devices": "Pair devices",
"pair-new-device-and-sync": "Pair new device and sync profile",
"pair-this-card": "Pair this card",
"pair-this-device": "Advertise device",
"pair-this-device-and-sync": "Pair this device and sync profile",
"pair-this-device-description": "Pair your devices to sync contacts and chats between them",
"paired-devices": "Paired devices",
"paired-with-this-device": "Paired with this device",
@@ -1928,7 +1920,6 @@
"powered-by-paraswap": "Powered by Paraswap",
"preference": "Preference",
"preferred-by-receiver": "Preferred by receiver",
"preparing-app-for-you": "Preparing app for you...",
"press": "Press",
"preview-privacy": "Preview privacy mode",
"previewing-may-share-metadata": "Previewing links from these websites may share your metadata with their owners",
@@ -2015,7 +2006,7 @@
"recover-with-seed-phrase": "Recover with seed phrase",
"recovering-key": "Accessing keys...",
"recovery-confirm-phrase": "Confirm seed phrase",
"recovery-phrase": "Recovery phrase",
"recovery-phrase": "Seed phrase",
"recovery-success-text": "You will have to create a new code or password to re-encrypt your keys",
"recovery-typo-dialog-description": "Please note, your seed phrase must use the exact same words and order as you received it",
"recovery-typo-dialog-title": "Is the seed phrase correct?",
@@ -2098,7 +2089,6 @@
"reveal-qr-code": "Reveal QR code",
"reveal-sync-code": "Reveal sync code",
"review-bridge": "Review bridge",
"review-pairing-request": "Review pairing request",
"review-send": "Review send",
"review-swap": "Review swap",
"revoke-access": "Revoke access",
@@ -2410,7 +2400,6 @@
"sync-or-recover-profile": "Sync or recover profile",
"sync-settings": "Sync settings",
"sync-synced": "In sync",
"sync-your-profile": "Sync your profile",
"synced-devices": "Synced Devices",
"synced-with": "Synced with",
"synchronise-your-data-across-your-devices": "Synchronise your data across your devices",