Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
166de36195 | ||
|
|
b83fe64b0f | ||
|
|
4909ec9854 | ||
|
|
09d393dabe | ||
|
|
8d62680abe | ||
|
|
6448c24e14 | ||
|
|
1f164c811d | ||
|
|
b1606704f7 | ||
|
|
81a8ed95a7 | ||
|
|
2a81814992 | ||
|
|
bcdb3c4194 | ||
|
|
54c3030971 | ||
|
|
d765dd1f60 | ||
|
|
777d0581ce | ||
|
|
6f45b5c8e8 | ||
|
|
e219aaf2b0 | ||
|
|
44a449660a | ||
|
|
9891469c6f | ||
|
|
5e9738bb7d | ||
|
|
39e3a82228 | ||
|
|
23a3825237 | ||
|
|
98f78ba50b | ||
|
|
1b5f08d680 | ||
|
|
411fd843ca | ||
|
|
1e8d85983e | ||
|
|
960e338f48 | ||
|
|
8ac0823eef | ||
|
|
1964200332 |
@@ -34,3 +34,4 @@ COLLECTIBLES_ENABLED=1
|
||||
COMMANDS_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
SWAP_ENABLED=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
|
||||
@@ -34,3 +34,4 @@ COMMUNITIES_MANAGEMENT_ENABLED=1
|
||||
METRICS_ENABLED=0
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
@@ -37,3 +37,4 @@ METRICS_ENABLED=0
|
||||
DELETE_MESSAGE_ENABLED=1
|
||||
TWO_MINUTES_SYNCING=1
|
||||
ENABLE_QUO_PREVIEW=1
|
||||
STICKERS_TEST_ENABLED=1
|
||||
@@ -41,6 +41,7 @@ local.properties
|
||||
# VS Code
|
||||
.vscode/ipch/
|
||||
.vscode/settings.json
|
||||
workspace.code-workspace
|
||||
|
||||
# node.js
|
||||
#
|
||||
|
||||
@@ -125,13 +125,15 @@ public class MainActivity extends NavigationActivity
|
||||
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
|
||||
case Configuration.UI_MODE_NIGHT_YES:
|
||||
setTheme(R.style.DarkTheme);
|
||||
|
||||
SplashScreen.show(this, R.style.DarkTheme, false);
|
||||
break;
|
||||
case Configuration.UI_MODE_NIGHT_NO:
|
||||
setTheme(R.style.LightTheme);
|
||||
SplashScreen.show(this, R.style.LightTheme, false);
|
||||
break;
|
||||
default:
|
||||
setTheme(R.style.LightTheme);
|
||||
SplashScreen.show(this, R.style.LightTheme, false);
|
||||
}
|
||||
// Make sure we get an Alert for every uncaught exceptions
|
||||
registerUncaughtExceptionHandler(MainActivity.this);
|
||||
@@ -141,7 +143,7 @@ public class MainActivity extends NavigationActivity
|
||||
Log.v("RNBootstrap", "Available system memory "+getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.getLargeMemoryClass()+"M");
|
||||
|
||||
setSecureFlag();
|
||||
SplashScreen.show(this, true);
|
||||
|
||||
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
|
||||
super.onCreate(null);
|
||||
|
||||
|
||||
@@ -17,12 +17,12 @@ buildscript {
|
||||
repositories {
|
||||
flatDir { dirs "libs", "${rootDir}/app/libs" }
|
||||
google()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31"
|
||||
classpath "com.android.tools.build:gradle:${project.ext.gradlePluginVersion}"
|
||||
classpath "com.google.gms:google-services:4.3.10"
|
||||
classpath "com.google.gms:google-services:4.3.10"
|
||||
// WARNING: Do not place your application dependencies here!
|
||||
// They belong in the individual module build.gradle files.
|
||||
}
|
||||
@@ -45,27 +45,22 @@ subprojects {
|
||||
|
||||
allprojects {
|
||||
beforeEvaluate {
|
||||
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
|
||||
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
|
||||
}
|
||||
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
|
||||
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
maven {
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
url("$rootDir/../node_modules/react-native/android")
|
||||
}
|
||||
maven {
|
||||
// Android JSC is installed from npm
|
||||
url("$rootDir/../node_modules/jsc-android/dist")
|
||||
}
|
||||
|
||||
google()
|
||||
jcenter()
|
||||
|
||||
// for geth, function, and status-go
|
||||
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
||||
maven { url("$rootDir/../node_modules/react-native/android") }
|
||||
// Android JSC is installed from npm
|
||||
maven { url("$rootDir/../node_modules/jsc-android/dist") }
|
||||
// For geth, function, and status-go
|
||||
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
|
||||
// Everything Else
|
||||
google()
|
||||
mavenCentral()
|
||||
maven { url "https://www.jitpack.io" }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
library 'status-jenkins-lib@v1.4.1'
|
||||
library 'status-jenkins-lib@v1.4.2'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux && x86_64 && nix-2.6' }
|
||||
agent { label 'linux && x86_64 && nix-2.8' }
|
||||
|
||||
options {
|
||||
timestamps()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.4.1'
|
||||
library 'status-jenkins-lib@v1.4.2'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
library 'status-jenkins-lib@v1.4.1'
|
||||
library 'status-jenkins-lib@v1.4.2'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos && x86_64 && nix-2.6 && xcode-12.5' }
|
||||
agent { label 'macos && x86_64 && nix-2.8 && xcode-13.3' }
|
||||
|
||||
parameters {
|
||||
string(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.4.1'
|
||||
library 'status-jenkins-lib@v1.4.2'
|
||||
|
||||
pipeline {
|
||||
agent { label params.AGENT_LABEL }
|
||||
@@ -98,8 +98,8 @@ pipeline {
|
||||
nix.shell("""
|
||||
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
|
||||
-not -name '*.links' -and -not -name '*-status-react-*' \
|
||||
| xargs nix-copy-closure -v \
|
||||
--to ${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}
|
||||
| xargs nix copy \
|
||||
--to ssh-ng://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}
|
||||
""",
|
||||
pure: false
|
||||
)
|
||||
|
||||
@@ -58,7 +58,7 @@ pipeline {
|
||||
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
|
||||
sh """
|
||||
python3 -m pytest \
|
||||
--numprocesses 15 \
|
||||
--numprocesses 9 \
|
||||
--rerun_count=2 \
|
||||
--testrail_report=True \
|
||||
-m testrail_id \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.4.1'
|
||||
library 'status-jenkins-lib@v1.4.2'
|
||||
|
||||
pipeline {
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.4.1'
|
||||
library 'status-jenkins-lib@v1.4.2'
|
||||
|
||||
pipeline {
|
||||
agent { label 'macos' }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
library 'status-jenkins-lib@v1.4.1'
|
||||
library 'status-jenkins-lib@v1.4.2'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
||||
@@ -22,6 +22,7 @@ PODS:
|
||||
- DoubleConversion
|
||||
- glog
|
||||
- glog (0.3.5)
|
||||
- HMSegmentedControl (1.5.6)
|
||||
- Keycard (3.0.5):
|
||||
- CryptoSwift
|
||||
- secp256k1
|
||||
@@ -235,8 +236,8 @@ PODS:
|
||||
- React
|
||||
- react-native-slider (3.0.0):
|
||||
- React
|
||||
- react-native-splash-screen (3.2.0):
|
||||
- React
|
||||
- react-native-splash-screen (3.3.0):
|
||||
- React-Core
|
||||
- react-native-status (1.0.0):
|
||||
- React
|
||||
- react-native-status-keycard (2.5.37):
|
||||
@@ -306,12 +307,14 @@ PODS:
|
||||
- React-jsi (= 0.63.4)
|
||||
- ReactNativeAudioToolkit (2.0.3):
|
||||
- React
|
||||
- ReactNativeNavigation (7.13.0):
|
||||
- ReactNativeNavigation (7.27.1):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-RCTImage
|
||||
- React-RCTText
|
||||
- ReactNativeNavigation/Core (= 7.13.0)
|
||||
- ReactNativeNavigation/Core (7.13.0):
|
||||
- ReactNativeNavigation/Core (= 7.27.1)
|
||||
- ReactNativeNavigation/Core (7.27.1):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-RCTImage
|
||||
- React-RCTText
|
||||
@@ -480,6 +483,7 @@ SPEC REPOS:
|
||||
trunk:
|
||||
- boost-for-react-native
|
||||
- CryptoSwift
|
||||
- HMSegmentedControl
|
||||
- libwebp
|
||||
- SDWebImage
|
||||
- SDWebImageWebPCoder
|
||||
@@ -645,6 +649,7 @@ SPEC CHECKSUMS:
|
||||
FBReactNativeSpec: f2c97f2529dd79c083355182cc158c9f98f4bd6e
|
||||
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
|
||||
glog: 61334f8bdb4deea07543d4fbac3fb5948e78a7a5
|
||||
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
|
||||
Keycard: 07f1b4d4fadcf1218084cb3e1bb3a8bac3870c5a
|
||||
libwebp: 98a37e597e40bfdb4c911fc98f2c53d0b12d05fc
|
||||
Permission-Camera: afad27bf90337684d4a86f3825112d648c8c4d3b
|
||||
@@ -673,7 +678,7 @@ SPEC CHECKSUMS:
|
||||
react-native-safe-area-context: 60f654e00b6cc416573f6d5dbfce3839958eb57a
|
||||
react-native-shake: de052eaa3eadc4a326b8ddd7ac80c06e8d84528c
|
||||
react-native-slider: 12bd76d3d568c9c5500825db54123d44b48e4ad4
|
||||
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
|
||||
react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457
|
||||
react-native-status: 45dbf1302ce3c258b459dfab137cd1c2c68c295d
|
||||
react-native-status-keycard: 961d01ca190889ddf220206822fd752f8f4f3f7a
|
||||
react-native-webview: 28a8636d97ee641f2ee8f20492d7a6c269c1d703
|
||||
@@ -688,7 +693,7 @@ SPEC CHECKSUMS:
|
||||
React-RCTVibration: ae4f914cfe8de7d4de95ae1ea6cc8f6315d73d9d
|
||||
ReactCommon: 73d79c7039f473b76db6ff7c6b159c478acbbb3b
|
||||
ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06
|
||||
ReactNativeNavigation: 4c4ca87edc0da4ee818158a62cb6188088454e5c
|
||||
ReactNativeNavigation: 94979dd1572a3f093fc85d4599360530a1bed8c8
|
||||
RNCAsyncStorage: d059c3ee71738c39834a627476322a5a8cd5bf36
|
||||
RNCClipboard: 8148e21ac347c51fd6cd4b683389094c216bb543
|
||||
RNCMaskedView: 71fc32d971f03b7f03d6ab6b86b730c4ee64f5b6
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Lsa-QA-3zn">
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="Lsa-QA-3zn">
|
||||
<device id="retina4_7" orientation="portrait" appearance="light"/>
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15510"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
|
||||
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
||||
<capability name="System colors in document resources" minToolsVersion="11.0"/>
|
||||
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
@@ -19,11 +20,11 @@
|
||||
<imageView userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="launch_image" translatesAutoresizingMaskIntoConstraints="NO" id="cqW-9w-FC0">
|
||||
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<viewLayoutGuide key="safeArea" id="2aN-f8-qiu"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="hOp-FG-FML" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
@@ -33,5 +34,8 @@
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="launch_image" width="90" height="101"/>
|
||||
<systemColor name="systemBackgroundColor">
|
||||
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</systemColor>
|
||||
</resources>
|
||||
</document>
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
androidx.activity:activity:1.0.0
|
||||
androidx.annotation:annotation-experimental:1.0.0
|
||||
androidx.activity:activity:1.2.4
|
||||
androidx.annotation:annotation-experimental:1.1.0
|
||||
androidx.annotation:annotation:1.0.0
|
||||
androidx.annotation:annotation:1.1.0
|
||||
androidx.annotation:annotation:1.2.0
|
||||
androidx.appcompat:appcompat-resources:1.1.0
|
||||
androidx.appcompat:appcompat-resources:1.2.0
|
||||
androidx.appcompat:appcompat-resources:1.3.1
|
||||
androidx.appcompat:appcompat:1.0.2
|
||||
androidx.appcompat:appcompat:1.1.0
|
||||
androidx.appcompat:appcompat:1.2.0
|
||||
androidx.appcompat:appcompat:1.3.1
|
||||
androidx.arch.core:core-common:2.0.0
|
||||
androidx.arch.core:core-common:2.1.0
|
||||
androidx.arch.core:core-runtime:2.0.0
|
||||
androidx.arch.core:core-runtime:2.1.0
|
||||
androidx.asynclayoutinflater:asynclayoutinflater:1.0.0
|
||||
androidx.cardview:cardview:1.0.0
|
||||
androidx.collection:collection:1.0.0
|
||||
@@ -18,10 +21,10 @@ androidx.constraintlayout:constraintlayout-solver:2.0.4
|
||||
androidx.constraintlayout:constraintlayout:2.0.4
|
||||
androidx.coordinatorlayout:coordinatorlayout:1.0.0
|
||||
androidx.coordinatorlayout:coordinatorlayout:1.1.0
|
||||
androidx.core:core-ktx:1.3.2
|
||||
androidx.core:core-ktx:1.6.0
|
||||
androidx.core:core:1.0.1
|
||||
androidx.core:core:1.1.0
|
||||
androidx.core:core:1.3.2
|
||||
androidx.core:core:1.6.0
|
||||
androidx.cursoradapter:cursoradapter:1.0.0
|
||||
androidx.customview:customview:1.0.0
|
||||
androidx.databinding:databinding-common:3.2.1
|
||||
@@ -37,18 +40,24 @@ androidx.exifinterface:exifinterface:1.1.0-rc01
|
||||
androidx.exifinterface:exifinterface:1.2.0
|
||||
androidx.fragment:fragment:1.0.0
|
||||
androidx.fragment:fragment:1.1.0
|
||||
androidx.fragment:fragment:1.3.6
|
||||
androidx.interpolator:interpolator:1.0.0
|
||||
androidx.legacy:legacy-support-core-ui:1.0.0
|
||||
androidx.legacy:legacy-support-core-utils:1.0.0
|
||||
androidx.legacy:legacy-support-v4:1.0.0
|
||||
androidx.lifecycle:lifecycle-common:2.0.0
|
||||
androidx.lifecycle:lifecycle-common:2.1.0
|
||||
androidx.lifecycle:lifecycle-common:2.3.1
|
||||
androidx.lifecycle:lifecycle-livedata-core:2.0.0
|
||||
androidx.lifecycle:lifecycle-livedata-core:2.3.1
|
||||
androidx.lifecycle:lifecycle-livedata:2.0.0
|
||||
androidx.lifecycle:lifecycle-runtime:2.0.0
|
||||
androidx.lifecycle:lifecycle-runtime:2.1.0
|
||||
androidx.lifecycle:lifecycle-runtime:2.3.1
|
||||
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.0.0
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.1.0
|
||||
androidx.lifecycle:lifecycle-viewmodel:2.3.1
|
||||
androidx.loader:loader:1.0.0
|
||||
androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
|
||||
androidx.media:media:1.0.0
|
||||
@@ -57,11 +66,12 @@ androidx.print:print:1.0.0
|
||||
androidx.recyclerview:recyclerview:1.0.0
|
||||
androidx.recyclerview:recyclerview:1.1.0
|
||||
androidx.savedstate:savedstate:1.0.0
|
||||
androidx.savedstate:savedstate:1.1.0
|
||||
androidx.slidingpanelayout:slidingpanelayout:1.0.0
|
||||
androidx.swiperefreshlayout:swiperefreshlayout:1.0.0
|
||||
androidx.swiperefreshlayout:swiperefreshlayout:1.1.0
|
||||
androidx.test:monitor:1.2.0
|
||||
androidx.test:monitor:1.3.0-rc03
|
||||
androidx.tracing:tracing:1.0.0
|
||||
androidx.transition:transition:1.2.0
|
||||
androidx.transition:transition:1.2.0-rc01
|
||||
androidx.vectordrawable:vectordrawable-animated:1.0.0
|
||||
@@ -70,6 +80,7 @@ androidx.vectordrawable:vectordrawable:1.0.1
|
||||
androidx.vectordrawable:vectordrawable:1.1.0
|
||||
androidx.versionedparcelable:versionedparcelable:1.0.0
|
||||
androidx.versionedparcelable:versionedparcelable:1.1.0
|
||||
androidx.versionedparcelable:versionedparcelable:1.1.1
|
||||
androidx.viewpager2:viewpager2:1.0.0
|
||||
androidx.viewpager:viewpager:1.0.0
|
||||
androidx.webkit:webkit:1.4.0
|
||||
@@ -371,7 +382,6 @@ com.google.android.gms:play-services-tasks:17.0.0
|
||||
com.google.android.gms:strict-version-matcher-plugin:1.2.2
|
||||
com.google.android.material:material:1.2.0-alpha03
|
||||
com.google.auto.service:auto-service:1.0-rc4
|
||||
com.google.auto.value:auto-value-annotations:1.6.2
|
||||
com.google.auto.value:auto-value:1.5.2
|
||||
com.google.auto:auto-common:0.8
|
||||
com.google.code.findbugs:jsr305:1.3.9
|
||||
@@ -424,7 +434,6 @@ com.google.protobuf:protobuf-java:3.4.0
|
||||
com.google.zxing:core:3.3.0
|
||||
com.ibm.icu:icu4j:53.1
|
||||
com.intellij:annotations:12.0
|
||||
com.nhaarman.mockitokotlin2:mockito-kotlin:2.2.0
|
||||
com.parse.bolts:bolts-applinks:1.4.0
|
||||
com.parse.bolts:bolts-tasks:1.4.0
|
||||
com.squareup.assertj:assertj-android:1.1.1
|
||||
@@ -511,7 +520,6 @@ org.bouncycastle:bcprov-jdk15on:1.48
|
||||
org.bouncycastle:bcprov-jdk15on:1.52
|
||||
org.bouncycastle:bcprov-jdk15on:1.56
|
||||
org.bouncycastle:bcprov-jdk15on:1.60
|
||||
org.bouncycastle:bcprov-jdk15on:1.65
|
||||
org.checkerframework:checker-qual:2.5.2
|
||||
org.codehaus.groovy:groovy-all:2.4.15
|
||||
org.codehaus.mojo:animal-sniffer-annotations:1.14
|
||||
@@ -532,8 +540,8 @@ org.jacoco:org.jacoco.core:0.7.4.201502262128
|
||||
org.jacoco:org.jacoco.report:0.7.4.201502262128
|
||||
org.jdom:jdom2:2.0.6
|
||||
org.jetbrains.intellij.deps:trove4j:1.0.20181211
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.3
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.3
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.5.2
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.1.1
|
||||
org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.8
|
||||
org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.4.31
|
||||
@@ -578,16 +586,17 @@ org.jetbrains.kotlin:kotlin-stdlib-common:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib-common:1.5.30
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.30
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jre7:1.2.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib-jre8:1.2.0
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.1.3-2
|
||||
@@ -596,8 +605,7 @@ org.jetbrains.kotlin:kotlin-stdlib:1.2.71
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.20
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-test-common:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-test:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-stdlib:1.5.30
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.3.50
|
||||
org.jetbrains.kotlin:kotlin-util-io:1.4.31
|
||||
org.jetbrains.kotlin:kotlin-util-klib:1.4.31
|
||||
@@ -615,45 +623,29 @@ org.ow2.asm:asm-analysis:5.0.3
|
||||
org.ow2.asm:asm-analysis:5.1
|
||||
org.ow2.asm:asm-analysis:6.0
|
||||
org.ow2.asm:asm-analysis:7.0
|
||||
org.ow2.asm:asm-analysis:7.2
|
||||
org.ow2.asm:asm-commons:5.1
|
||||
org.ow2.asm:asm-commons:6.0
|
||||
org.ow2.asm:asm-commons:7.0
|
||||
org.ow2.asm:asm-commons:7.2
|
||||
org.ow2.asm:asm-debug-all:5.0.1
|
||||
org.ow2.asm:asm-tree:5.0.3
|
||||
org.ow2.asm:asm-tree:5.1
|
||||
org.ow2.asm:asm-tree:6.0
|
||||
org.ow2.asm:asm-tree:7.0
|
||||
org.ow2.asm:asm-tree:7.2
|
||||
org.ow2.asm:asm-util:5.1
|
||||
org.ow2.asm:asm-util:6.0
|
||||
org.ow2.asm:asm-util:7.0
|
||||
org.ow2.asm:asm-util:7.2
|
||||
org.ow2.asm:asm:5.0.3
|
||||
org.ow2.asm:asm:5.1
|
||||
org.ow2.asm:asm:6.0
|
||||
org.ow2.asm:asm:7.0
|
||||
org.ow2.asm:asm:7.2
|
||||
org.robolectric:annotations:4.3
|
||||
org.robolectric:annotations:4.4
|
||||
org.robolectric:junit:4.3
|
||||
org.robolectric:junit:4.4
|
||||
org.robolectric:pluginapi:4.3
|
||||
org.robolectric:pluginapi:4.4
|
||||
org.robolectric:plugins-maven-dependency-resolver:4.3
|
||||
org.robolectric:plugins-maven-dependency-resolver:4.4
|
||||
org.robolectric:resources:4.3
|
||||
org.robolectric:resources:4.4
|
||||
org.robolectric:robolectric:4.3
|
||||
org.robolectric:robolectric:4.4
|
||||
org.robolectric:sandbox:4.3
|
||||
org.robolectric:sandbox:4.4
|
||||
org.robolectric:shadowapi:4.3
|
||||
org.robolectric:shadowapi:4.4
|
||||
org.robolectric:shadows-framework:4.3
|
||||
org.robolectric:shadows-framework:4.4
|
||||
org.robolectric:utils-reflector:4.3
|
||||
org.robolectric:utils-reflector:4.4
|
||||
org.robolectric:utils:4.3
|
||||
org.robolectric:utils:4.4
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
https://dl.google.com/dl/android/maven2/androidx/activity/activity/1.0.0/activity-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/activity/activity/1.2.4/activity-1.2.4.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation-experimental/1.0.0/annotation-experimental-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation-experimental/1.1.0/annotation-experimental-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.0.0/annotation-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.0.1/annotation-1.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.0.2/annotation-1.0.2.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.1.0/annotation-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/annotation/annotation/1.2.0/annotation-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.1.0/appcompat-resources-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.2.0/appcompat-resources-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat-resources/1.3.1/appcompat-resources-1.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.0/appcompat-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.1.0/appcompat-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.3.1/appcompat-1.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-common/2.0.0/core-common-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-common/2.0.1/core-common-2.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-common/2.1.0/core-common-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.0.0/core-runtime-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/arch/core/core-runtime/2.1.0/core-runtime-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/asynclayoutinflater/asynclayoutinflater/1.0.0/asynclayoutinflater-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/cardview/cardview/1.0.0/cardview-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/collection/collection/1.0.0/collection-1.0.0.pom
|
||||
@@ -22,13 +28,15 @@ https://dl.google.com/dl/android/maven2/androidx/constraintlayout/constraintlayo
|
||||
https://dl.google.com/dl/android/maven2/androidx/constraintlayout/constraintlayout/2.0.4/constraintlayout-2.0.4.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.0.0/coordinatorlayout-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.1.0/coordinatorlayout-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core-ktx/1.3.2/core-ktx-1.3.2.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core-ktx/1.6.0/core-ktx-1.6.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.0/core-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.0.1/core-1.0.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.1.0/core-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.2.0/core-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.3.0/core-1.3.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.3.1/core-1.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.3.2/core-1.3.2.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.5.0/core-1.5.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/core/core/1.6.0/core-1.6.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/cursoradapter/cursoradapter/1.0.0/cursoradapter-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/customview/customview/1.0.0/customview-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/databinding/databinding-common/3.2.1/databinding-common-3.2.1.pom
|
||||
@@ -44,18 +52,24 @@ https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.1
|
||||
https://dl.google.com/dl/android/maven2/androidx/exifinterface/exifinterface/1.2.0/exifinterface-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.0.0/fragment-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.1.0/fragment-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/fragment/fragment/1.3.6/fragment-1.3.6.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/interpolator/interpolator/1.0.0/interpolator-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-core-ui/1.0.0/legacy-support-core-ui-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-core-utils/1.0.0/legacy-support-core-utils-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/legacy/legacy-support-v4/1.0.0/legacy-support-v4-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.0.0/lifecycle-common-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.1.0/lifecycle-common-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-common/2.3.1/lifecycle-common-2.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.0.0/lifecycle-livedata-core-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata-core/2.3.1/lifecycle-livedata-core-2.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-livedata/2.0.0/lifecycle-livedata-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.0.0/lifecycle-runtime-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.1.0/lifecycle-runtime-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-runtime/2.3.1/lifecycle-runtime-2.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel-savedstate/2.3.1/lifecycle-viewmodel-savedstate-2.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.0.0/lifecycle-viewmodel-2.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.1.0/lifecycle-viewmodel-2.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/lifecycle/lifecycle-viewmodel/2.3.1/lifecycle-viewmodel-2.3.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/loader/loader/1.0.0/loader-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/localbroadcastmanager/localbroadcastmanager/1.0.0/localbroadcastmanager-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/media/media/1.0.0/media-1.0.0.pom
|
||||
@@ -64,11 +78,12 @@ https://dl.google.com/dl/android/maven2/androidx/print/print/1.0.0/print-1.0.0.p
|
||||
https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.0.0/recyclerview-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/recyclerview/recyclerview/1.1.0/recyclerview-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/savedstate/savedstate/1.0.0/savedstate-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/savedstate/savedstate/1.1.0/savedstate-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/slidingpanelayout/slidingpanelayout/1.0.0/slidingpanelayout-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.0.0/swiperefreshlayout-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/swiperefreshlayout/swiperefreshlayout/1.1.0/swiperefreshlayout-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/test/monitor/1.2.0/monitor-1.2.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/test/monitor/1.3.0-rc03/monitor-1.3.0-rc03.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/tracing/tracing/1.0.0/tracing-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/transition/transition/1.0.0/transition-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/transition/transition/1.2.0-rc01/transition-1.2.0-rc01.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/transition/transition/1.2.0/transition-1.2.0.pom
|
||||
@@ -79,6 +94,7 @@ https://dl.google.com/dl/android/maven2/androidx/vectordrawable/vectordrawable/1
|
||||
https://dl.google.com/dl/android/maven2/androidx/vectordrawable/vectordrawable/1.1.0/vectordrawable-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/versionedparcelable/versionedparcelable/1.0.0/versionedparcelable-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/versionedparcelable/versionedparcelable/1.1.0/versionedparcelable-1.1.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/versionedparcelable/versionedparcelable/1.1.1/versionedparcelable-1.1.1.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/viewpager2/viewpager2/1.0.0/viewpager2-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/viewpager/viewpager/1.0.0/viewpager-1.0.0.pom
|
||||
https://dl.google.com/dl/android/maven2/androidx/webkit/webkit/1.4.0/webkit-1.4.0.pom
|
||||
@@ -449,11 +465,8 @@ https://repo.maven.apache.org/maven2/com/google/android/apps/common/testing/acce
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-common/0.8/auto-common-0.8.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/3/auto-parent-3.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/5/auto-parent-5.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/auto-parent/6/auto-parent-6.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/service/auto-service/1.0-rc4/auto-service-1.0-rc4.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.6.2/auto-value-annotations-1.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-annotations/1.9/auto-value-annotations-1.9.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.6.2/auto-value-parent-1.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value-parent/1.9/auto-value-parent-1.9.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/auto/value/auto-value/1.5.2/auto-value-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/1.3.9/jsr305-1.3.9.pom
|
||||
@@ -520,7 +533,6 @@ https://repo.maven.apache.org/maven2/com/google/zxing/core/3.3.0/core-3.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/google/zxing/zxing-parent/3.3.0/zxing-parent-3.3.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/ibm/icu/icu4j/53.1/icu4j-53.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/intellij/annotations/12.0/annotations-12.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/nhaarman/mockitokotlin2/mockito-kotlin/2.2.0/mockito-kotlin-2.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-applinks/1.4.0/bolts-applinks-1.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/parse/bolts/bolts-tasks/1.4.0/bolts-tasks-1.4.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/assertj/assertj-android/1.1.1/assertj-android-1.1.1.pom
|
||||
@@ -531,13 +543,12 @@ https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-urlconnection/3
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.9.1/okhttp-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.12/okhttp-3.12.12.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/5.0.0-alpha.6/okhttp-5.0.0-alpha.6.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/5.0.0-alpha.7/okhttp-5.0.0-alpha.7.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.9.1/parent-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.1/parent-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.12/parent-3.12.12.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.15.0/okio-parent-1.15.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.0.0/okio-3.0.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.1.0/okio-3.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.0/all-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/javax.activation/1.2.0/javax.activation-1.2.0.pom
|
||||
@@ -588,13 +599,10 @@ https://repo.maven.apache.org/maven2/junit/junit/4.13.2/junit-4.13.2.pom
|
||||
https://repo.maven.apache.org/maven2/me/zhanghai/android/materialprogressbar/library/1.4.2/library-1.4.2.pom
|
||||
https://repo.maven.apache.org/maven2/nekohtml/nekohtml/1.9.6.2/nekohtml-1.9.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/nekohtml/xercesMinimal/1.9.6.2/xercesMinimal-1.9.6.2.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.9.0/byte-buddy-agent-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.9.10/byte-buddy-agent-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-agent/1.10.18/byte-buddy-agent-1.10.18.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.9.0/byte-buddy-parent-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.9.10/byte-buddy-parent-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy-parent/1.10.18/byte-buddy-parent-1.10.18.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.9.0/byte-buddy-1.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.9.10/byte-buddy-1.9.10.pom
|
||||
https://repo.maven.apache.org/maven2/net/bytebuddy/byte-buddy/1.10.18/byte-buddy-1.10.18.pom
|
||||
https://repo.maven.apache.org/maven2/net/java/jvnet-parent/1/jvnet-parent-1.pom
|
||||
@@ -766,10 +774,9 @@ https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.48/bcprov
|
||||
https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.52/bcprov-jdk15on-1.52.pom
|
||||
https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.56/bcprov-jdk15on-1.56.pom
|
||||
https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.60/bcprov-jdk15on-1.60.pom
|
||||
https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.65/bcprov-jdk15on-1.65.pom
|
||||
https://repo.maven.apache.org/maven2/org/bouncycastle/bcprov-jdk15on/1.70/bcprov-jdk15on-1.70.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/2.5.2/checker-qual-2.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.21.4/checker-qual-3.21.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/checkerframework/checker-qual/3.22.0/checker-qual-3.22.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/codehaus-parent/4/codehaus-parent-4.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.pom
|
||||
https://repo.maven.apache.org/maven2/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.pom
|
||||
@@ -857,9 +864,9 @@ https://repo.maven.apache.org/maven2/org/jboss/weld/weld-parent/36/weld-parent-3
|
||||
https://repo.maven.apache.org/maven2/org/jdom/jdom2/2.0.6/jdom2-2.0.6.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/annotations/13.0/annotations-13.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/intellij/deps/trove4j/1.0.20181211/trove4j-1.0.20181211.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-android/1.4.3/kotlinx-coroutines-android-1.4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-android/1.5.2/kotlinx-coroutines-android-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-common/1.1.1/kotlinx-coroutines-core-common-1.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.4.3/kotlinx-coroutines-core-jvm-1.4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core-jvm/1.5.2/kotlinx-coroutines-core-jvm-1.5.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.1.1/kotlinx-coroutines-core-1.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-coroutines-core/1.3.8/kotlinx-coroutines-core-1.3.8.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlinx/kotlinx-metadata-jvm/0.1.0/kotlinx-metadata-jvm-0.1.0.pom
|
||||
@@ -908,21 +915,21 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.50/kotlin-stdlib-common-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.3.71/kotlin-stdlib-common-1.3.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.4.10/kotlin-stdlib-common-1.4.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.4.30/kotlin-stdlib-common-1.4.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.4.31/kotlin-stdlib-common-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.31/kotlin-stdlib-common-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.10/kotlin-stdlib-common-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.10/kotlin-stdlib-common-1.5.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.5.30/kotlin-stdlib-common-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.20/kotlin-stdlib-common-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-common/1.6.21/kotlin-stdlib-common-1.6.21.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.2.71/kotlin-stdlib-jdk7-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.20/kotlin-stdlib-jdk7-1.3.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.3.50/kotlin-stdlib-jdk7-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.4.10/kotlin-stdlib-jdk7-1.4.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.4.31/kotlin-stdlib-jdk7-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5.30/kotlin-stdlib-jdk7-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.2.71/kotlin-stdlib-jdk8-1.2.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.20/kotlin-stdlib-jdk8-1.3.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.50/kotlin-stdlib-jdk8-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.10/kotlin-stdlib-jdk8-1.4.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.31/kotlin-stdlib-jdk8-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.30/kotlin-stdlib-jdk8-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.2.0/kotlin-stdlib-jre7-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre8/1.2.0/kotlin-stdlib-jre8-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.1.3-2/kotlin-stdlib-1.1.3-2.pom
|
||||
@@ -935,10 +942,9 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.31/k
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.50/kotlin-stdlib-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.3.71/kotlin-stdlib-1.3.71.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.10/kotlin-stdlib-1.4.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.30/kotlin-stdlib-1.4.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.4.31/kotlin-stdlib-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-test-common/1.4.31/kotlin-test-common-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-test/1.4.31/kotlin-test-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.10/kotlin-stdlib-1.5.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib/1.5.30/kotlin-stdlib-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.3.50/kotlin-util-io-1.3.50.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-io/1.4.31/kotlin-util-io-1.4.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-util-klib/1.4.31/kotlin-util-klib-1.4.31.pom
|
||||
@@ -951,7 +957,6 @@ https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter-api/5.7.0/j
|
||||
https://repo.maven.apache.org/maven2/org/junit/platform/junit-platform-commons/1.7.0/junit-platform-commons-1.7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/1.7.7/stax-ex-1.7.7.pom
|
||||
https://repo.maven.apache.org/maven2/org/jvnet/staxex/stax-ex/2.1.0/stax-ex-2.1.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/2.23.0/mockito-core-2.23.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/2.28.2/mockito-core-2.28.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/mockito/mockito-core/3.6.28/mockito-core-3.6.28.pom
|
||||
https://repo.maven.apache.org/maven2/org/objenesis/objenesis-parent/2.6/objenesis-parent-2.6.pom
|
||||
@@ -965,12 +970,10 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.0.3/asm-analysis
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/5.1/asm-analysis-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/6.0/asm-analysis-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/7.0/asm-analysis-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/7.2/asm-analysis-7.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-analysis/9.3/asm-analysis-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/5.1/asm-commons-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/6.0/asm-commons-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.0/asm-commons-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/7.2/asm-commons-7.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-commons/9.3/asm-commons-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/5.0.1/asm-debug-all-5.0.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-debug-all/6.0_BETA/asm-debug-all-6.0_BETA.pom
|
||||
@@ -983,42 +986,28 @@ https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.p
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/5.1/asm-tree-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/6.0/asm-tree-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/7.0/asm-tree-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/7.2/asm-tree-7.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-tree/9.3/asm-tree-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/5.1/asm-util-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/6.0/asm-util-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/7.0/asm-util-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm-util/7.2/asm-util-7.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/5.1/asm-5.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/6.0/asm-6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/7.0/asm-7.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/7.2/asm-7.2.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/asm/asm/9.3/asm-9.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.3/ow2-1.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/ow2/ow2/1.5/ow2-1.5.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/annotations/4.3/annotations-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/annotations/4.4/annotations-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/junit/4.3/junit-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/junit/4.4/junit-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/pluginapi/4.3/pluginapi-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/pluginapi/4.4/pluginapi-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/plugins-maven-dependency-resolver/4.3/plugins-maven-dependency-resolver-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/plugins-maven-dependency-resolver/4.4/plugins-maven-dependency-resolver-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/resources/4.3/resources-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/resources/4.4/resources-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/robolectric/4.3/robolectric-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/robolectric/4.4/robolectric-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/sandbox/4.3/sandbox-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/sandbox/4.4/sandbox-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/shadowapi/4.3/shadowapi-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/shadowapi/4.4/shadowapi-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/shadows-framework/4.3/shadows-framework-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/shadows-framework/4.4/shadows-framework-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/utils-reflector/4.3/utils-reflector-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/utils-reflector/4.4/utils-reflector-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/utils/4.3/utils-4.3.pom
|
||||
https://repo.maven.apache.org/maven2/org/robolectric/utils/4.4/utils-4.4.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/jcl-over-slf4j/2.0.0-alpha7/jcl-over-slf4j-2.0.0-alpha7.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/jul-to-slf4j/2.0.0-alpha7/jul-to-slf4j-2.0.0-alpha7.pom
|
||||
https://repo.maven.apache.org/maven2/org/slf4j/slf4j-api/2.0.0-alpha7/slf4j-api-2.0.0-alpha7.pom
|
||||
|
||||
@@ -8,7 +8,7 @@ Modules provided by `yarn2nix` are normally fine, but we use `react-native-*` pa
|
||||
```js
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
maven { url "https://www.jitpack.io" }
|
||||
}
|
||||
```
|
||||
And these need to be patched and replaced with `mavenLocal()` to make sure Gradle doesn't try to fetch dependencies from remote repos.
|
||||
|
||||
@@ -11,3 +11,5 @@ keep-derivations = true
|
||||
keep-outputs = true
|
||||
# Extra isolation for network and filesystem, doesn't work on MacOS
|
||||
build-use-sandbox = false
|
||||
# Enable Nix v2 interface.
|
||||
experimental-features = nix-command
|
||||
|
||||
@@ -33,12 +33,12 @@ in {
|
||||
gradlePropParser = callPackage ./tools/gradlePropParser.nix { };
|
||||
|
||||
# Package version adjustments
|
||||
go = super.pkgs.go_1_16;
|
||||
go = super.pkgs.go_1_17;
|
||||
gradle = super.pkgs.gradle_5;
|
||||
nodejs = super.pkgs.nodejs-12_x;
|
||||
nodejs = super.pkgs.nodejs-16_x;
|
||||
openjdk = super.pkgs.openjdk8_headless;
|
||||
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
|
||||
version = "11.5";
|
||||
version = "13.3";
|
||||
allowHigher = true;
|
||||
};
|
||||
gomobile = super.gomobile.override {
|
||||
|
||||
@@ -13,8 +13,8 @@ let
|
||||
name = "nixpkgs-source";
|
||||
owner = "status-im";
|
||||
repo = "nixpkgs";
|
||||
rev = "15111f8a9ad423d300886b537647691c2faa28cd";
|
||||
sha256 = "05ny644x3dpxigljnb4rmams5vrs5gkbcyqjfamvlqm8rdmsi0kn";
|
||||
rev = "4ba5f26780e7a27aa2e97676603cd9ef04f11e74";
|
||||
sha256 = "sha256-ZpHXUuF9bvHooKwGuR1Mr/n2mE/LJ6/MCdCk2AfdD9M=";
|
||||
# To get the compressed Nix sha256, use:
|
||||
# nix-prefetch-url --unpack https://github.com/${ORG}/nixpkgs/archive/${REV}.tar.gz
|
||||
};
|
||||
|
||||
@@ -6,9 +6,9 @@ GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
||||
source "${GIT_ROOT}/nix/scripts/lib.sh"
|
||||
source "${GIT_ROOT}/scripts/colors.sh"
|
||||
|
||||
NIX_VERSION="2.6.1"
|
||||
NIX_VERSION="2.8.0"
|
||||
NIX_INSTALL_URL="https://nixos.org/releases/nix/nix-${NIX_VERSION}/install"
|
||||
NIX_INSTALL_SHA256="a63732b4f3628ce97e096dbda88e3cb9851ff6b4f94b5cd43feb257126437b9d"
|
||||
NIX_INSTALL_SHA256="f43bfedfca9151479462d8bc11f238615a2d52f19b14894d8e2b59980e75ef72"
|
||||
NIX_INSTALL_PATH="/tmp/nix-install-${NIX_VERSION}"
|
||||
|
||||
install_nix() {
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"react-native-languages": "^3.0.2",
|
||||
"react-native-linear-gradient": "^2.5.6",
|
||||
"react-native-mail": "^6.1.1",
|
||||
"react-native-navigation": "^7.13.0",
|
||||
"react-native-navigation": "^7.27.1",
|
||||
"react-native-notifications": "^4.1.3",
|
||||
"react-native-permissions": "^2.1.5",
|
||||
"react-native-randombytes": "^3.6.1",
|
||||
@@ -66,7 +66,7 @@
|
||||
"react-native-safe-area-context": "^2.0.0",
|
||||
"react-native-shake": "^3.3.1",
|
||||
"react-native-share": "^7.0.1",
|
||||
"react-native-splash-screen": "^3.2.0",
|
||||
"react-native-splash-screen": "3.3.0",
|
||||
"react-native-status-keycard": "git+https://github.com/status-im/react-native-status-keycard.git#refs/tags/v2.5.37",
|
||||
"react-native-svg": "^9.8.4",
|
||||
"react-native-touch-id": "^4.4.1",
|
||||
|
||||
|
After Width: | Height: | Size: 396 B |
|
After Width: | Height: | Size: 608 B |
|
After Width: | Height: | Size: 518 B |
|
After Width: | Height: | Size: 679 B |
|
After Width: | Height: | Size: 610 B |
|
After Width: | Height: | Size: 941 B |
|
After Width: | Height: | Size: 836 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 813 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 735 B |
|
After Width: | Height: | Size: 1.0 KiB |
@@ -47,6 +47,7 @@
|
||||
:ValueXY (fn [])
|
||||
:View {}
|
||||
:FlatList {}
|
||||
:Image {}
|
||||
:ScrollView {}
|
||||
:Text {}}
|
||||
:Easing {:bezier (fn [])
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
["@react-native-community/hooks" :as hooks]
|
||||
["react-native-navigation" :refer (Navigation)]
|
||||
["rn-emoji-keyboard" :refer (EmojiKeyboard)]
|
||||
["react-native-draggable-flatlist" :default DraggableFlatList]))
|
||||
["react-native-draggable-flatlist" :default DraggableFlatList]
|
||||
[status-im.utils.config :as config]))
|
||||
|
||||
(def rn-draggable-flatlist (reagent/adapt-react-class DraggableFlatList))
|
||||
|
||||
@@ -74,6 +75,9 @@
|
||||
(def animated-view
|
||||
(reagent/adapt-react-class (.-View ^js animated)))
|
||||
|
||||
(def animated-image-view
|
||||
(reagent/adapt-react-class (.-Image ^js animated)))
|
||||
|
||||
(def ui-manager (.-UIManager ^js rn))
|
||||
|
||||
(def layout-animation (.-LayoutAnimation ^js rn))
|
||||
@@ -103,6 +107,10 @@
|
||||
:delete #js {:type (:ease-in-ease-out layout-animation-types)
|
||||
:property (:opacity layout-animation-properties)}}})
|
||||
|
||||
(defonce enable-layout-animations
|
||||
(when (and platform/android? config/quo-preview-enabled?)
|
||||
(.setLayoutAnimationEnabledExperimental ^js ui-manager true)))
|
||||
|
||||
(def activity-indicator (reagent/adapt-react-class (.-ActivityIndicator ^js rn)))
|
||||
|
||||
;; Flat-list
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
[_ _]
|
||||
(let [pressed (reagent/atom false)]
|
||||
(fn [{:keys [on-press disabled type size before after above width
|
||||
on-long-press accessibility-label icon]
|
||||
on-long-press accessibility-label icon style]
|
||||
:or {type :primary
|
||||
size 40}}
|
||||
children]
|
||||
@@ -126,17 +126,19 @@
|
||||
{:on-press-out (fn []
|
||||
(reset! pressed nil))})
|
||||
|
||||
[rn/view {:style (style-container
|
||||
type
|
||||
size
|
||||
disabled
|
||||
(get background-color state)
|
||||
(get border-color state)
|
||||
icon
|
||||
above
|
||||
width
|
||||
before
|
||||
after)}
|
||||
[rn/view {:style (merge
|
||||
(style-container
|
||||
type
|
||||
size
|
||||
disabled
|
||||
(get background-color state)
|
||||
(get border-color state)
|
||||
icon
|
||||
above
|
||||
width
|
||||
before
|
||||
after)
|
||||
style)}
|
||||
(when above
|
||||
[rn/view
|
||||
[quo2.icons/icon above {:container-style {:margin-bottom 2}
|
||||
@@ -168,4 +170,4 @@
|
||||
[quo2.icons/icon after {:container-style {:margin-left 4
|
||||
:margin-right (if (= size 40) 12 8)}
|
||||
:color icon-color
|
||||
:size icon-size}]])]]))))
|
||||
:size icon-size}]])]]))))
|
||||
|
||||
@@ -29,5 +29,6 @@
|
||||
(let [this (reagent/current-component)
|
||||
props (reagent/props this)
|
||||
style (text-style props)]
|
||||
(into [rn/text {:style style}]
|
||||
(reagent/children this))))
|
||||
(into [rn/text (merge {:style style}
|
||||
(dissoc props :style :size :align :weight :color))]
|
||||
(reagent/children this))))
|
||||
|
||||
@@ -34,6 +34,13 @@
|
||||
(def neutral-50-opa-30 (alpha neutral-50 0.3))
|
||||
(def neutral-50-opa-40 (alpha neutral-50 0.4))
|
||||
|
||||
;;70 with transparency
|
||||
(def neutral-70-opa-60 (alpha neutral-70 0.6))
|
||||
(def neutral-70-opa-70 (alpha neutral-70 0.7))
|
||||
(def neutral-70-opa-80 (alpha neutral-70 0.8))
|
||||
(def neutral-70-opa-90 (alpha neutral-70 0.9))
|
||||
(def neutral-70-opa-95 (alpha neutral-70 0.95))
|
||||
|
||||
;;80 with transparency
|
||||
(def neutral-80-opa-60 (alpha neutral-80 0.6))
|
||||
(def neutral-80-opa-70 (alpha neutral-80 0.7))
|
||||
@@ -176,5 +183,15 @@
|
||||
(def info-50-opa-30 (alpha info-50 0.3))
|
||||
(def info-50-opa-40 (alpha info-50 0.4))
|
||||
|
||||
;;;;Switcher
|
||||
(def switcher-background "#040B14")
|
||||
|
||||
;;switcher-screen with transparency
|
||||
(def switcher-background-opa-60 (alpha switcher-background 0.6))
|
||||
(def switcher-background-opa-70 (alpha switcher-background 0.7))
|
||||
(def switcher-background-opa-80 (alpha switcher-background 0.8))
|
||||
(def switcher-background-opa-90 (alpha switcher-background 0.9))
|
||||
(def switcher-background-opa-95 (alpha switcher-background 0.95))
|
||||
|
||||
(defn theme-colors [light dark]
|
||||
(if (theme/dark?) dark light))
|
||||
(if (theme/dark?) dark light))
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
network (ethereum/chain-keyword db)]
|
||||
{:db (assoc-in db [:acquisition :network-status]
|
||||
(get network-statuses :initiated))
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "signMessageWithChatKey")
|
||||
::json-rpc/call [{:method "wakuext_signMessageWithChatKey"
|
||||
:params [msg]
|
||||
:on-error #(re-frame/dispatch [::on-error (i18n/label :t/sign-request-failed)])
|
||||
:on-success #(re-frame/dispatch [::call-acquisition-gateway
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
(fx/defn qr-code-handled
|
||||
{:events [::qr-code-handled]}
|
||||
[{:keys [db] :as cofx} {:keys [type public-key chat-id data ens-name]} {:keys [new-contact?] :as opts}]
|
||||
[{:keys [db] :as cofx} {:keys [type public-key chat-id data ens-name]} {:keys [new-contact? nickname] :as opts}]
|
||||
(let [public-key? (and (string? data)
|
||||
(string/starts-with? data "0x"))
|
||||
chat-key (cond
|
||||
@@ -80,7 +80,7 @@
|
||||
(if-not validation-result
|
||||
(if new-contact?
|
||||
(fx/merge cofx
|
||||
(contact/add-contact chat-key nil ens-name)
|
||||
(contact/add-contact chat-key nickname ens-name)
|
||||
(navigation/navigate-to-cofx :contacts-list {}))
|
||||
(chat/start-chat cofx chat-key ens-name))
|
||||
{:utils/show-popup {:title (i18n/label :t/unable-to-read-this-code)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{:events [:multiaccounts.ui/perform-backup-pressed]}
|
||||
[{:keys [db]}]
|
||||
{:db (assoc db :backup/performing-backup true)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "backupData")
|
||||
::json-rpc/call [{:method "wakuext_backupData"
|
||||
:params []
|
||||
:on-error #(do
|
||||
(log/error "failed to perfom backup" %)
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
[status-im.native-module.core :as status]
|
||||
[status-im.ui.components.list-selection :as list-selection]
|
||||
[status-im.navigation :as navigation]
|
||||
[status-im.utils.contenthash :as contenthash]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.utils.http :as http]
|
||||
[status-im.utils.platform :as platform]
|
||||
@@ -182,20 +181,6 @@
|
||||
:history new-history
|
||||
:history-index new-index))))))
|
||||
|
||||
(defmulti storage-gateway :namespace)
|
||||
|
||||
(defmethod storage-gateway :ipns
|
||||
[{:keys [hash]}]
|
||||
(str "https://" hash))
|
||||
|
||||
(defmethod storage-gateway :ipfs
|
||||
[{:keys [hash]}]
|
||||
(contenthash/ipfs-url hash))
|
||||
|
||||
(defmethod storage-gateway :swarm
|
||||
[{:keys [hash]}]
|
||||
(str "https://gateway.ethswarm.org/bzz/" hash))
|
||||
|
||||
(fx/defn resolve-ens-multihash-success
|
||||
{:events [:browser.callback/resolve-ens-multihash-success]}
|
||||
[{:keys [db] :as cofx} url]
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
[quo.design-system.colors :as colors]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.navigation :as navigation]
|
||||
[status-im.navigation2 :as navigation2]
|
||||
[status-im.utils.clocks :as utils.clocks]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.utils.utils :as utils]
|
||||
@@ -263,6 +264,15 @@
|
||||
(navigation/pop-to-root-tab % :chat-stack))
|
||||
(navigation/navigate-to-cofx :chat nil))))
|
||||
|
||||
(fx/defn navigate-to-chat-nav2
|
||||
"Takes coeffects map and chat-id, returns effects necessary for navigation and preloading data"
|
||||
{:events [:chat.ui/navigate-to-chat-nav2]}
|
||||
[{db :db :as cofx} chat-id from-switcher?]
|
||||
(fx/merge cofx
|
||||
{:db (assoc db :current-chat-id chat-id)}
|
||||
(preload-chat-data chat-id)
|
||||
(navigation2/navigate-to-nav2 :chat chat-id nil from-switcher?)))
|
||||
|
||||
(fx/defn handle-clear-history-response
|
||||
{:events [::history-cleared]}
|
||||
[{:keys [db]} chat-id response]
|
||||
@@ -383,9 +393,9 @@
|
||||
(fx/defn mute-chat
|
||||
{:events [::mute-chat-toggled]}
|
||||
[{:keys [db] :as cofx} chat-id muted?]
|
||||
(let [method (if muted? "muteChat" "unmuteChat")]
|
||||
(let [method (if muted? "wakuext_muteChat" "wakuext_unmuteChat")]
|
||||
{:db (assoc-in db [:chats chat-id :muted] muted?)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method method)
|
||||
::json-rpc/call [{:method method
|
||||
:params [chat-id]
|
||||
:on-error #(re-frame/dispatch [::mute-chat-failed chat-id muted? %])
|
||||
:on-success #(log/debug "muted chat successfully")}]}))
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
[status-im.utils.fx :as fx]
|
||||
["emojilib" :as emojis]
|
||||
[status-im.chat.models.mentions :as mentions]
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im.multiaccounts.update.core :as multiaccounts.update]))
|
||||
[status-im.utils.utils :as utils]))
|
||||
|
||||
(defn text->emoji
|
||||
"Replaces emojis in a specified `text`"
|
||||
@@ -230,12 +229,12 @@
|
||||
:text (i18n/label :t/update-to-listen-audio {"locale" "en"})})))
|
||||
|
||||
(fx/defn send-sticker-message
|
||||
[cofx {:keys [hash pack]} current-chat-id]
|
||||
(when-not (string/blank? hash)
|
||||
[cofx {:keys [hash packID]} current-chat-id]
|
||||
(when-not (or (string/blank? hash) (string/blank? packID))
|
||||
(chat.message/send-message cofx {:chat-id current-chat-id
|
||||
:content-type constants/content-type-sticker
|
||||
:sticker {:hash hash
|
||||
:pack pack}
|
||||
:pack (int packID)}
|
||||
:text (i18n/label :t/update-to-see-sticker {"locale" "en"})})))
|
||||
|
||||
(fx/defn send-edited-message [{:keys [db] :as cofx} text {:keys [message-id]}]
|
||||
@@ -265,13 +264,16 @@
|
||||
|
||||
(fx/defn chat-send-sticker
|
||||
{:events [:chat/send-sticker]}
|
||||
[{{:keys [current-chat-id multiaccount]} :db :as cofx} {:keys [hash] :as sticker}]
|
||||
[{{:keys [current-chat-id] :as db} :db :as cofx} {:keys [hash packID] :as sticker}]
|
||||
(fx/merge
|
||||
cofx
|
||||
(multiaccounts.update/multiaccount-update
|
||||
:stickers/recent-stickers
|
||||
(conj (remove #(= hash %) (:stickers/recent-stickers multiaccount)) hash)
|
||||
{})
|
||||
{:db (update db
|
||||
:stickers/recent-stickers
|
||||
(fn [recent]
|
||||
(conj (remove #(= hash (:hash %)) recent) sticker)))
|
||||
::json-rpc/call [{:method "stickers_addRecent"
|
||||
:params [(int packID) hash]
|
||||
:on-success #()}]}
|
||||
(send-sticker-message sticker current-chat-id)))
|
||||
|
||||
(fx/defn chat-send-audio
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
{:events [::resolve-community-info]}
|
||||
[{:keys [db]} community-id]
|
||||
{:db (community-resolving db community-id)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "requestCommunityInfoFromMailserver")
|
||||
::json-rpc/call [{:method "wakuext_requestCommunityInfoFromMailserver"
|
||||
:params [community-id]
|
||||
:on-success #(re-frame/dispatch [::community-resolved community-id %])
|
||||
:on-error #(do
|
||||
@@ -69,7 +69,7 @@
|
||||
(fx/defn load-link-preview-data
|
||||
{:events [::load-link-preview-data]}
|
||||
[cofx link]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "getLinkPreviewData")
|
||||
{::json-rpc/call [{:method "wakuext_getLinkPreviewData"
|
||||
:params [link]
|
||||
:on-success #(re-frame/dispatch [::cache-link-preview-data link %])
|
||||
:on-error #(re-frame/dispatch [::cache-link-preview-data
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
(fx/defn request-link-preview-whitelist
|
||||
[_]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "getLinkPreviewWhitelist")
|
||||
{::json-rpc/call [{:method "wakuext_getLinkPreviewWhitelist"
|
||||
:params []
|
||||
:on-success #(re-frame/dispatch [::link-preview-whitelist-received %])
|
||||
:on-error #(log/error "Failed to get link preview whitelist")}]})
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
(fx/defn load-chat
|
||||
[_ chat-id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "chat")
|
||||
{::json-rpc/call [{:method "wakuext_chat"
|
||||
:params [chat-id]
|
||||
:on-success #(re-frame/dispatch [:chats-list/load-chat-success %])
|
||||
:on-failure #(log/error "failed to fetch chats" 0 -1 %)}]})
|
||||
@@ -84,7 +84,7 @@
|
||||
[{db :db} chat-id]
|
||||
{:clear-message-notifications [[chat-id]
|
||||
(get-in db [:multiaccount :remote-push-notifications-enabled?])]
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "markAllRead")
|
||||
::json-rpc/call [{:method "wakuext_markAllRead"
|
||||
:params [chat-id]
|
||||
:on-success #(re-frame/dispatch [::mark-all-read-successful chat-id])}]})
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
(keys (get-in db [:communities community-id :chats])))]
|
||||
{:clear-message-notifications [community-chat-ids
|
||||
(get-in db [:multiaccount :remote-push-notifications-enabled?])]
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "markAllReadInCommunity")
|
||||
::json-rpc/call [{:method "wakuext_markAllReadInCommunity"
|
||||
:params [community-id]
|
||||
:on-success #(re-frame/dispatch [::mark-all-read-in-community-successful %])}]}))
|
||||
|
||||
|
||||
@@ -174,7 +174,7 @@
|
||||
(fx/defn resend-message
|
||||
[{:keys [db] :as cofx} chat-id message-id]
|
||||
(fx/merge cofx
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "reSendChatMessage")
|
||||
{::json-rpc/call [{:method "wakuext_reSendChatMessage"
|
||||
:params [message-id]
|
||||
:on-success #(log/debug "re-sent message successfully")
|
||||
:on-error #(log/error "failed to re-send message" %)}]}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
{:events [::accept-request-address-for-transaction]}
|
||||
[{:keys [db]} message-id address]
|
||||
{:db (dissoc db :commands/select-account)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "acceptRequestAddressForTransaction")
|
||||
::json-rpc/call [{:method "wakuext_acceptRequestAddressForTransaction"
|
||||
:params [message-id address]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:transport/message-sent %])}]})
|
||||
@@ -31,7 +31,7 @@
|
||||
(fx/defn handle-decline-request-address-for-transaction
|
||||
{:events [::decline-request-address-for-transaction]}
|
||||
[_ message-id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "declineRequestAddressForTransaction")
|
||||
{::json-rpc/call [{:method "wakuext_declineRequestAddressForTransaction"
|
||||
:params [message-id]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:transport/message-sent %])}]})
|
||||
@@ -39,7 +39,7 @@
|
||||
(fx/defn handle-decline-request-transaction
|
||||
{:events [::decline-request-transaction]}
|
||||
[cofx message-id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "declineRequestTransaction")
|
||||
{::json-rpc/call [{:method "wakuext_declineRequestTransaction"
|
||||
:params [message-id]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:transport/message-sent %])}]})
|
||||
|
||||
@@ -171,4 +171,8 @@
|
||||
(def ^:const visibility-status-inactive 4)
|
||||
|
||||
(def ^:const wallet-connect-version-1 1)
|
||||
(def ^:const wallet-connect-version-2 2)
|
||||
(def ^:const wallet-connect-version-2 2)
|
||||
|
||||
(def ^:const sticker-pack-status-installed 1)
|
||||
(def ^:const sticker-pack-status-pending 2)
|
||||
(def ^:const sticker-pack-status-owned 3)
|
||||
@@ -70,7 +70,7 @@
|
||||
{:events [::send-contact-request]}
|
||||
[{:keys [db] :as cofx} public-key]
|
||||
(let [{:keys [name profile-image]} (own-info db)]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "sendContactUpdate")
|
||||
{::json-rpc/call [{:method "wakuext_sendContactUpdate"
|
||||
:params [public-key name profile-image]
|
||||
:on-success #(log/debug "contact request sent" public-key)}]}))
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
unmarshal-members))
|
||||
|
||||
(fx/defn fetch-chats-rpc [_ {:keys [on-success]}]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "chatsPreview")
|
||||
{::json-rpc/call [{:method "wakuext_chatsPreview"
|
||||
:params []
|
||||
:js-response true
|
||||
:on-success #(on-success ^js %)
|
||||
|
||||
@@ -15,14 +15,14 @@
|
||||
|
||||
(fx/defn fetch-contacts-rpc
|
||||
[_ on-success]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "contacts")
|
||||
{::json-rpc/call [{:method "wakuext_contacts"
|
||||
:params []
|
||||
:on-success #(on-success (map <-rpc %))
|
||||
:on-failure #(log/error "failed to fetch contacts" %)}]})
|
||||
|
||||
(fx/defn add
|
||||
[_ public-key nickname ens-name on-success]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "addContact")
|
||||
{::json-rpc/call [{:method "wakuext_addContact"
|
||||
:params [{:id public-key :nickname nickname :ensName ens-name}]
|
||||
:js-response true
|
||||
:on-success #(do
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
(fx/defn set-nickname
|
||||
[_ public-key nickname on-success]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "setContactLocalNickname")
|
||||
{::json-rpc/call [{:method "wakuext_setContactLocalNickname"
|
||||
:params [{:id public-key :nickname nickname}]
|
||||
:js-response true
|
||||
:on-success #(do
|
||||
@@ -43,14 +43,14 @@
|
||||
:on-failure #(log/error "failed to set contact nickname " public-key nickname %)}]})
|
||||
|
||||
(fx/defn block [_ contact-id on-success]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "blockContact")
|
||||
{::json-rpc/call [{:method "wakuext_blockContact"
|
||||
:params [contact-id]
|
||||
:js-response true
|
||||
:on-success on-success
|
||||
:on-failure #(log/error "failed to block contact" % contact-id)}]})
|
||||
|
||||
(fx/defn unblock [_ contact-id on-success]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "unblockContact")
|
||||
{::json-rpc/call [{:method "wakuext_unblockContact"
|
||||
:params [contact-id]
|
||||
:on-success on-success
|
||||
:js-response true
|
||||
|
||||
@@ -54,14 +54,14 @@
|
||||
limit
|
||||
on-success
|
||||
on-failure]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "chatMessages")
|
||||
{::json-rpc/call [{:method "wakuext_chatMessages"
|
||||
:params [chat-id cursor limit]
|
||||
:on-success (fn [result]
|
||||
(on-success (update result :messages #(map <-rpc %))))
|
||||
:on-failure on-failure}]})
|
||||
|
||||
(defn mark-seen-rpc [chat-id ids on-success]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "markMessagesSeen")
|
||||
{::json-rpc/call [{:method "wakuext_markMessagesSeen"
|
||||
:params [chat-id ids]
|
||||
:on-success #(do
|
||||
(log/debug "successfully marked as seen" %)
|
||||
@@ -69,19 +69,19 @@
|
||||
:on-failure #(log/error "failed to get messages" %)}]})
|
||||
|
||||
(defn delete-message-rpc [id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "deleteMessage")
|
||||
{::json-rpc/call [{:method "wakuext_deleteMessage"
|
||||
:params [id]
|
||||
:on-success #(log/debug "successfully deleted message" id)
|
||||
:on-failure #(log/error "failed to delete message" % id)}]})
|
||||
|
||||
(defn delete-messages-from-rpc [author]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "deleteMessagesFrom")
|
||||
{::json-rpc/call [{:method "wakuext_deleteMessagesFrom"
|
||||
:params [author]
|
||||
:on-success #(log/debug "successfully deleted messages from" author)
|
||||
:on-failure #(log/error "failed to delete messages from" % author)}]})
|
||||
|
||||
(defn delete-messages-by-chat-id-rpc [chat-id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "deleteMessagesByChatID")
|
||||
{::json-rpc/call [{:method "wakuext_deleteMessagesByChatID"
|
||||
:params [chat-id]
|
||||
:on-success #(log/debug "successfully deleted messages by chat-id" chat-id)
|
||||
:on-failure #(log/error "failed to delete messages by chat-id" % chat-id)}]})
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
limit
|
||||
on-success
|
||||
on-failure]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "chatPinnedMessages")
|
||||
{::json-rpc/call [{:method "wakuext_chatPinnedMessages"
|
||||
:params [chat-id cursor limit]
|
||||
:on-success (fn [result]
|
||||
(let [result (clojure.set/rename-keys result {:pinnedMessages :pinned-messages})]
|
||||
@@ -25,7 +25,7 @@
|
||||
:on-failure on-failure}]})
|
||||
|
||||
(fx/defn send-pin-message [cofx pin-message]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "sendPinMessage")
|
||||
{::json-rpc/call [{:method "wakuext_sendPinMessage"
|
||||
:params [(messages/->rpc pin-message)]
|
||||
:on-success #(log/debug "successfully pinned message" pin-message)
|
||||
:on-failure #(log/error "failed to pin message" % pin-message)}]})
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
limit
|
||||
on-success
|
||||
on-failure]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "emojiReactionsByChatID")
|
||||
{::json-rpc/call [{:method "wakuext_emojiReactionsByChatID"
|
||||
:params [chat-id cursor limit]
|
||||
:on-success (fn [result]
|
||||
(on-success (map <-rpc result)))
|
||||
|
||||
@@ -46,8 +46,6 @@
|
||||
config/default-network))
|
||||
(update :wallet/visible-tokens rpc->visible-tokens)
|
||||
(update :pinned-mailservers rpc->pinned-mailservers)
|
||||
(update :stickers/packs-installed rpc->stickers-packs)
|
||||
(update :stickers/packs-pending set)
|
||||
(update :link-previews-enabled-sites set)
|
||||
(update :custom-bootnodes rpc->custom-bootnodes)
|
||||
(update :custom-bootnodes-enabled? rpc->custom-bootnodes)
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
:dimensions/window (dimensions/window)
|
||||
:registry {}
|
||||
:visibility-status-updates {}
|
||||
:stickers/packs-owned #{}
|
||||
:stickers/packs-pending #{}
|
||||
:keycard {:nfc-enabled? false
|
||||
:pin {:original []
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
#(re-frame/dispatch [::name-resolved username
|
||||
(cond
|
||||
(not public-key) :owned
|
||||
(string/ends-with? % "0000000000000000000000000000000000000000000000000000000000000000")
|
||||
(and (string/ends-with? % "0000000000000000000000000000000000000000000000000000000000000000") (not custom-domain?))
|
||||
:invalid-ens
|
||||
(= % public-key) :connected
|
||||
:else :connected-with-different-key)
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
(ns status-im.ethereum.eip165
|
||||
"Utility function related to [EIP165](https://eips.ethereum.org/EIPS/eip-165)"
|
||||
(:require [status-im.ethereum.abi-spec :as abi-spec]
|
||||
[status-im.ethereum.json-rpc :as json-rpc]))
|
||||
|
||||
(def supports-interface-hash "0x01ffc9a7")
|
||||
(def marker-hash "0xffffffff")
|
||||
|
||||
(defn supports-interface?
|
||||
[contract hash cb]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
:method "supportsInterface(bytes4)"
|
||||
:params [hash]
|
||||
:on-success cb}))
|
||||
|
||||
(defn supports?
|
||||
"Calls cb with true if `supportsInterface` is supported by this contract.
|
||||
See EIP for details."
|
||||
[contract cb]
|
||||
(supports-interface?
|
||||
contract
|
||||
supports-interface-hash
|
||||
#(if (true? (abi-spec/hex-to-boolean %))
|
||||
(supports-interface? contract
|
||||
marker-hash
|
||||
(fn [response]
|
||||
(cb (false? (abi-spec/hex-to-boolean response)))))
|
||||
(cb false))))
|
||||
@@ -1,23 +0,0 @@
|
||||
(ns status-im.ethereum.erc721
|
||||
"
|
||||
Helper functions to interact with [ERC721](https://eips.ethereum.org/EIPS/eip-721) smart contract
|
||||
"
|
||||
(:require [status-im.ethereum.json-rpc :as json-rpc]))
|
||||
|
||||
(defn token-of-owner-by-index
|
||||
[contract address index cb]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
:method "tokenOfOwnerByIndex(address,uint256)"
|
||||
:params [address index]
|
||||
:outputs ["uint256"]
|
||||
:on-success (fn [[token]] (cb token))}))
|
||||
|
||||
(defn token-uri
|
||||
[contract tokenId cb]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
:method "tokenURI(uint256)"
|
||||
:params [tokenId]
|
||||
:outputs ["string"]
|
||||
:on-success (fn [[uri]] (cb uri))}))
|
||||
@@ -2,247 +2,11 @@
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.ethereum.abi-spec :as abi-spec]
|
||||
[status-im.ethereum.decode :as decode]
|
||||
[status-im.native-module.core :as status]
|
||||
[status-im.utils.money :as money]
|
||||
[status-im.utils.types :as types]
|
||||
[status-im.utils.utils :as utils]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(def json-rpc-api
|
||||
{"eth_call" {}
|
||||
"eth_getBalance"
|
||||
{:on-result money/bignumber}
|
||||
"eth_estimateGas"
|
||||
{:on-result #(money/bignumber (if (= (int %) 21000) % (int (* % 1.2))))}
|
||||
"eth_gasPrice"
|
||||
{:on-result money/bignumber}
|
||||
"eth_getBlockByHash"
|
||||
{:on-result #(-> (update % :number decode/uint)
|
||||
(update :timestamp decode/uint))}
|
||||
"eth_getTransactionByHash" {}
|
||||
"eth_getTransactionReceipt" {}
|
||||
"eth_getBlockByNumber" {}
|
||||
"eth_maxPriorityFeePerGas" {}
|
||||
"eth_newBlockFilter" {:subscription? true}
|
||||
"eth_newFilter" {:subscription? true}
|
||||
"eth_getCode" {}
|
||||
"eth_syncing" {}
|
||||
"eth_feeHistory" {}
|
||||
"ens_publicKeyOf" {}
|
||||
"ens_addressOf" {}
|
||||
"ens_expireAt" {}
|
||||
"ens_ownerOf" {}
|
||||
"ens_contentHash" {}
|
||||
"ens_resourceURL" {}
|
||||
"ens_registerPrepareTx" {}
|
||||
"ens_setPubKeyPrepareTx" {}
|
||||
"net_version" {}
|
||||
"web3_clientVersion" {}
|
||||
"shh_generateSymKeyFromPassword" {}
|
||||
"shh_getSymKey" {}
|
||||
"shh_markTrustedPeer" {}
|
||||
"waku_generateSymKeyFromPassword" {}
|
||||
"waku_getSymKey" {}
|
||||
"waku_markTrustedPeer" {}
|
||||
"wakuext_post" {}
|
||||
"wakuext_requestAllHistoricMessagesWithRetries" {}
|
||||
"wakuext_toggleUseMailservers" {}
|
||||
"wakuext_editMessage" {}
|
||||
"wakuext_deleteMessageAndSend" {}
|
||||
"wakuext_fillGaps" {}
|
||||
"wakuext_syncChatFromSyncedFrom" {}
|
||||
"wakuext_createPublicChat" {}
|
||||
"wakuext_createOneToOneChat" {}
|
||||
"wakuext_createProfileChat" {}
|
||||
"wakuext_startMessenger" {}
|
||||
"wakuext_sendPairInstallation" {}
|
||||
"wakuext_syncDevices" {}
|
||||
"wakuext_syncBookmark" {}
|
||||
"wakuext_requestMessages" {}
|
||||
"wakuext_sendDirectMessage" {}
|
||||
"wakuext_sendPublicMessage" {}
|
||||
"wakuext_enableInstallation" {}
|
||||
"wakuext_disableInstallation" {}
|
||||
"wakuext_sendChatMessage" {}
|
||||
"wakuext_sendChatMessages" {}
|
||||
"wakuext_backupData" {}
|
||||
"wakuext_confirmJoiningGroup" {}
|
||||
"wakuext_addAdminsToGroupChat" {}
|
||||
"wakuext_addMembersToGroupChat" {}
|
||||
"wakuext_removeMemberFromGroupChat" {}
|
||||
"wakuext_leaveGroupChat" {}
|
||||
"wakuext_changeGroupChatName" {}
|
||||
"wakuext_createGroupChatWithMembers" {}
|
||||
"wakuext_createGroupChatFromInvitation" {}
|
||||
"wakuext_reSendChatMessage" {}
|
||||
"wakuext_getOurInstallations" {}
|
||||
"wakuext_setInstallationMetadata" {}
|
||||
"wakuext_loadFilters" {}
|
||||
"wakuext_loadFilter" {}
|
||||
"wakuext_removeFilters" {}
|
||||
"wakuext_sendContactUpdate" {}
|
||||
"wakuext_sendContactUpdates" {}
|
||||
"wakuext_chatsPreview" {}
|
||||
"wakuext_activeChats" {}
|
||||
"wakuext_chat" {}
|
||||
"wakuext_addSystemMessages" {}
|
||||
"wakuext_deleteMessagesFrom" {}
|
||||
"wakuext_deleteMessagesByChatID" {}
|
||||
"wakuext_deleteMessage" {}
|
||||
"wakuext_markMessagesSeen" {}
|
||||
"wakuext_markAllRead" {}
|
||||
"wakuext_markAllReadInCommunity" {}
|
||||
"wakuext_confirmMessagesProcessedByID" {}
|
||||
"wakuext_chatMessages" {}
|
||||
"wakuext_saveChat" {}
|
||||
"wakuext_muteChat" {}
|
||||
"wakuext_unmuteChat" {}
|
||||
"wakuext_contacts" {}
|
||||
"wakuext_removeContact" {}
|
||||
"wakuext_setContactLocalNickname" {}
|
||||
"wakuext_clearHistory" {}
|
||||
"wakuext_prepareContent" {}
|
||||
"wakuext_blockContact" {}
|
||||
"wakuext_unblockContact" {}
|
||||
"wakuext_addContact" {}
|
||||
"wakuext_updateMailservers" {}
|
||||
"wakuext_sendEmojiReaction" {}
|
||||
"wakuext_disconnectActiveMailserver" {}
|
||||
"wakuext_sendEmojiReactionRetraction" {}
|
||||
"wakuext_emojiReactionsByChatID" {}
|
||||
"wakuext_getLinkPreviewWhitelist" {}
|
||||
"wakuext_getLinkPreviewData" {}
|
||||
"wakuext_requestCommunityInfoFromMailserver" {}
|
||||
"wakuext_deactivateChat" {}
|
||||
"wakuext_sendPinMessage" {}
|
||||
"wakuext_setPinnedMailservers" {}
|
||||
"wakuext_chatPinnedMessages" {}
|
||||
;;TODO not used anywhere?
|
||||
"wakuext_deleteChat" {}
|
||||
"wakuext_saveContact" {}
|
||||
"wakuext_verifyENSNames" {}
|
||||
"wakuext_requestAddressForTransaction" {}
|
||||
"wakuext_requestTransaction" {}
|
||||
"wakuext_acceptRequestAddressForTransaction" {}
|
||||
"wakuext_declineRequestAddressForTransaction" {}
|
||||
"wakuext_declineRequestTransaction" {}
|
||||
"wakuext_sendTransaction" {}
|
||||
"wakuext_acceptRequestTransaction" {}
|
||||
"wakuext_signMessageWithChatKey" {}
|
||||
"wakuext_sendGroupChatInvitationRequest" {}
|
||||
"wakuext_sendGroupChatInvitationRejection" {}
|
||||
"wakuext_getGroupChatInvitations" {}
|
||||
"wakuext_registerForPushNotifications" {}
|
||||
"wakuext_unregisterFromPushNotifications" {}
|
||||
"wakuext_enablePushNotificationsFromContactsOnly" {}
|
||||
"wakuext_disablePushNotificationsFromContactsOnly" {}
|
||||
"wakuext_startPushNotificationsServer" {}
|
||||
"wakuext_stopPushNotificationsServer" {}
|
||||
"wakuext_disableSendingNotifications" {}
|
||||
"wakuext_enableSendingNotifications" {}
|
||||
"wakuext_addPushNotificationsServer" {}
|
||||
"wakuext_getPushNotificationsServers" {}
|
||||
"wakuext_enablePushNotificationsBlockMentions" {}
|
||||
"wakuext_disablePushNotificationsBlockMentions" {}
|
||||
"wakuext_unreadActivityCenterNotificationsCount" {}
|
||||
"wakuext_setUserStatus" {}
|
||||
"wakuext_statusUpdates" {}
|
||||
"multiaccounts_getIdentityImages" {}
|
||||
"multiaccounts_getIdentityImage" {}
|
||||
"multiaccounts_storeIdentityImage" {}
|
||||
"multiaccounts_storeIdentityImageFromURL" {}
|
||||
"multiaccounts_deleteIdentityImage" {}
|
||||
"wakuext_changeIdentityImageShowTo" {}
|
||||
"wakuext_createCommunity" {}
|
||||
"wakuext_editCommunity" {}
|
||||
"wakuext_createCommunityChat" {}
|
||||
"wakuext_editCommunityChat" {}
|
||||
"wakuext_inviteUsersToCommunity" {}
|
||||
"wakuext_shareCommunity" {}
|
||||
"wakuext_removeUserFromCommunity" {}
|
||||
"wakuext_banUserFromCommunity" {}
|
||||
"wakuext_requestToJoinCommunity" {}
|
||||
"wakuext_acceptRequestToJoinCommunity" {}
|
||||
"wakuext_declineRequestToJoinCommunity" {}
|
||||
"wakuext_pendingRequestsToJoinForCommunity" {}
|
||||
"wakuext_joinCommunity" {}
|
||||
"wakuext_leaveCommunity" {}
|
||||
"wakuext_communities" {}
|
||||
"wakuext_importCommunity" {}
|
||||
"wakuext_exportCommunity" {}
|
||||
"wakuext_createCommunityCategory" {}
|
||||
"wakuext_reorderCommunityCategories" {}
|
||||
"wakuext_reorderCommunityChat" {}
|
||||
"wakuext_editCommunityCategory" {}
|
||||
"wakuext_deleteCommunityCategory" {}
|
||||
"wakuext_deleteCommunityChat" {}
|
||||
"wakuext_ensVerified" {}
|
||||
"wakuext_dismissActivityCenterNotifications" {}
|
||||
"wakuext_acceptActivityCenterNotifications" {}
|
||||
"wakuext_dismissAllActivityCenterNotifications" {}
|
||||
"wakuext_acceptAllActivityCenterNotifications" {}
|
||||
"wakuext_markAllActivityCenterNotificationsRead" {}
|
||||
"wakuext_activityCenterNotifications" {}
|
||||
"status_chats" {}
|
||||
"rpcstats_getStats" {}
|
||||
"rpcstats_reset" {}
|
||||
"localnotifications_switchWalletNotifications" {}
|
||||
"localnotifications_notificationPreferences" {}
|
||||
"wallet_setInitialBlocksRange" {}
|
||||
"wallet_getTransfersByAddress" {}
|
||||
"wallet_watchTransaction" {}
|
||||
"wallet_checkRecentHistory" {}
|
||||
"wallet_getCachedBalances" {}
|
||||
"wallet_storePendingTransaction" {}
|
||||
"wallet_deletePendingTransaction" {}
|
||||
"wallet_getPendingTransactions" {}
|
||||
"wallet_getTokensBalances" {}
|
||||
"wallet_getCustomTokens" {}
|
||||
"wallet_addCustomToken" {}
|
||||
"wallet_addFavourite" {}
|
||||
"wallet_getFavourites" {}
|
||||
"wallet_deleteCustomToken" {}
|
||||
"wallet_getCryptoOnRamps" {}
|
||||
"wallet_getOpenseaCollectionsByOwner" {}
|
||||
"wallet_getOpenseaAssetsByOwnerAndCollection" {}
|
||||
"wallet_loadTransferByHash" {}
|
||||
"wallet_getTokens" {};, %* [chainId]}
|
||||
"wallet_getTokensBalancesForChainIDs" {};, %* [@[chainId], accounts, tokens]
|
||||
"browsers_getBrowsers" {}
|
||||
"browsers_addBrowser" {}
|
||||
"browsers_deleteBrowser" {}
|
||||
"browsers_getBookmarks" {}
|
||||
"browsers_storeBookmark" {}
|
||||
"browsers_updateBookmark" {}
|
||||
"browsers_removeBookmark" {}
|
||||
"mailservers_getMailserverRequestGaps" {}
|
||||
"mailservers_addMailserverRequestGaps" {}
|
||||
"mailservers_deleteMailserverRequestGaps" {}
|
||||
"mailservers_deleteMailserverRequestGapsByChatID" {}
|
||||
"permissions_addDappPermissions" {}
|
||||
"permissions_getDappPermissions" {}
|
||||
"permissions_deleteDappPermissions" {}
|
||||
"settings_saveSetting" {}
|
||||
"settings_getSettings" {}
|
||||
"accounts_getAccounts" {}
|
||||
"accounts_saveAccounts" {}
|
||||
"accounts_deleteAccount" {}
|
||||
"mailservers_ping" {}
|
||||
"mailservers_addMailserver" {}
|
||||
"mailservers_getMailservers" {}
|
||||
"mailservers_deleteMailserver" {}
|
||||
"mailservers_addMailserverTopic" {}
|
||||
"mailservers_addMailserverTopics" {}
|
||||
"mailservers_getMailserverTopics" {}
|
||||
"mailservers_deleteMailserverTopic" {}
|
||||
"mailservers_addChatRequestRange" {}
|
||||
"mailservers_addChatRequestRanges" {}
|
||||
"mailservers_getChatRequestRanges" {}
|
||||
"mailservers_deleteChatRequestRange" {}
|
||||
"appmetrics_saveAppMetrics" {}
|
||||
"appmetrics_getAppMetrics" {}})
|
||||
|
||||
(defn on-error-retry
|
||||
[call-method {:keys [method number-of-retries delay on-error] :as arg}]
|
||||
(if (pos? number-of-retries)
|
||||
@@ -250,62 +14,35 @@
|
||||
(let [updated-delay (if delay
|
||||
(min 2000 (* 2 delay))
|
||||
50)]
|
||||
(log/debug "[on-error-retry]" method
|
||||
"number-of-retries" number-of-retries
|
||||
"delay" delay
|
||||
"error" error)
|
||||
(log/debug "[on-error-retry]" method "number-of-retries" number-of-retries "delay" delay "error" error)
|
||||
(utils/set-timeout #(call-method (-> arg
|
||||
(update :number-of-retries dec)
|
||||
(assoc :delay updated-delay)))
|
||||
updated-delay)))
|
||||
on-error))
|
||||
|
||||
(defn call-ext-method [method]
|
||||
(str "wakuext_" method))
|
||||
|
||||
(defn call
|
||||
[{:keys [method params on-success on-error js-response] :as arg}]
|
||||
(if-let [method-options (json-rpc-api method)]
|
||||
(let [params (or params [])
|
||||
{:keys [id on-result subscription?]
|
||||
:or {on-result identity
|
||||
id 1}} method-options
|
||||
on-error (or
|
||||
on-error
|
||||
(on-error-retry call arg)
|
||||
#(log/warn :json-rpc/error method :error % :params params))]
|
||||
(if (nil? method)
|
||||
(do
|
||||
(log/error :json-rpc/method-not-found method)
|
||||
(on-error :json-rpc/method-not-found))
|
||||
(status/call-private-rpc
|
||||
(types/clj->json {:jsonrpc "2.0"
|
||||
:id id
|
||||
:method (if subscription?
|
||||
"eth_subscribeSignal"
|
||||
method)
|
||||
:params (if subscription?
|
||||
[method params]
|
||||
params)})
|
||||
(fn [response]
|
||||
(if (string/blank? response)
|
||||
(on-error {:message "Blank response"})
|
||||
(let [response-js (types/json->js response)]
|
||||
(if (.-error response-js)
|
||||
(on-error (types/js->clj (.-error response-js)))
|
||||
(if subscription?
|
||||
(re-frame/dispatch
|
||||
[:ethereum.callback/subscription-success
|
||||
(types/js->clj (.-result response-js)) on-success])
|
||||
(on-success (on-result (if js-response
|
||||
(.-result response-js)
|
||||
(types/js->clj (.-result response-js)))))))))))))
|
||||
(log/warn "method" method "not found" arg)))
|
||||
(let [params (or params [])
|
||||
on-error (or on-error (on-error-retry call arg) #(log/warn :json-rpc/error method :error % :params params))]
|
||||
(status/call-private-rpc
|
||||
(types/clj->json {:jsonrpc "2.0"
|
||||
:id 1
|
||||
:method method
|
||||
:params params})
|
||||
(fn [response]
|
||||
(if (string/blank? response)
|
||||
(on-error {:message "Blank response"})
|
||||
(let [response-js (types/json->js response)]
|
||||
(if (.-error response-js)
|
||||
(on-error (types/js->clj (.-error response-js)))
|
||||
(on-success (if js-response
|
||||
(.-result response-js)
|
||||
(types/js->clj (.-result response-js)))))))))))
|
||||
|
||||
(defn eth-call
|
||||
[{:keys [contract method params outputs on-success block]
|
||||
:or {block "latest"
|
||||
params []}
|
||||
:or {block "latest" params []}
|
||||
:as arg}]
|
||||
(call {:method "eth_call"
|
||||
:params [{:to contract
|
||||
@@ -320,15 +57,8 @@
|
||||
:on-error
|
||||
(on-error-retry eth-call arg)}))
|
||||
|
||||
;; effects
|
||||
(re-frame/reg-fx
|
||||
::call
|
||||
(fn [params]
|
||||
(doseq [param params]
|
||||
(call param))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::eth-call
|
||||
(fn [params]
|
||||
(doseq [param params]
|
||||
(eth-call param))))
|
||||
(call param))))
|
||||
@@ -6,23 +6,8 @@
|
||||
[status-im.utils.fx :as fx]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(fx/defn handle-signal
|
||||
[cofx {:keys [subscription_id data] :as event}]
|
||||
(if-let [handler (get-in cofx [:db :ethereum/subscriptions subscription_id])]
|
||||
(handler data)
|
||||
(log/warn ::unknown-subscription :event event)))
|
||||
|
||||
(fx/defn handle-error
|
||||
[cofx {:keys [subscription_id data] :as event}]
|
||||
(log/error ::error event))
|
||||
|
||||
(fx/defn register-subscription
|
||||
{:events [:ethereum.callback/subscription-success]}
|
||||
[{:keys [db]} id handler]
|
||||
{:db (assoc-in db [:ethereum/subscriptions id] handler)})
|
||||
|
||||
(fx/defn new-transfers
|
||||
[{:keys [db] :as cofx} block-number accounts]
|
||||
[cofx block-number accounts]
|
||||
(log/debug "[wallet-subs] new-transfers"
|
||||
"accounts" accounts
|
||||
"block" block-number)
|
||||
@@ -41,7 +26,7 @@
|
||||
(assoc :dispatch event))))
|
||||
|
||||
(fx/defn recent-history-fetching-ended
|
||||
[{:keys [db] :as cofx} {:keys [accounts blockNumber]}]
|
||||
[{:keys [db]} {:keys [accounts blockNumber]}]
|
||||
(log/debug "[wallet-subs] recent-history-fetching-ended"
|
||||
"accounts" accounts
|
||||
"block" blockNumber)
|
||||
@@ -76,11 +61,11 @@
|
||||
(wallet.core/after-checking-history)))
|
||||
|
||||
(fx/defn non-archival-node-detected
|
||||
[{:keys [db] :as cofx} _]
|
||||
[{:keys [db]} _]
|
||||
{:db (assoc db :wallet/non-archival-node true)})
|
||||
|
||||
(fx/defn new-wallet-event
|
||||
[cofx {:keys [type blockNumber accounts newTransactions] :as event}]
|
||||
[cofx {:keys [type blockNumber accounts] :as event}]
|
||||
(log/info "[wallet-subs] new-wallet-event"
|
||||
"event-type" type
|
||||
"blockNumber" blockNumber
|
||||
|
||||
@@ -63,7 +63,9 @@
|
||||
[status-im.multiaccounts.login.core :as login.core]
|
||||
[status-im.signing.core :as signing]
|
||||
status-im.wallet-connect.core
|
||||
status-im.wallet-connect-legacy.core))
|
||||
status-im.wallet-connect-legacy.core
|
||||
status-im.navigation2
|
||||
status-im.navigation2.core))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:dismiss-keyboard
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"Format group update message and sign membership"
|
||||
{:events [:group-chats.ui/remove-member-pressed]}
|
||||
[_ chat-id member]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "removeMemberFromGroupChat")
|
||||
{::json-rpc/call [{:method "wakuext_removeMemberFromGroupChat"
|
||||
:params [nil chat-id member]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]})
|
||||
@@ -45,7 +45,7 @@
|
||||
(fx/defn join-chat
|
||||
{:events [:group-chats.ui/join-pressed]}
|
||||
[_ chat-id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "confirmJoiningGroup")
|
||||
{::json-rpc/call [{:method "wakuext_confirmJoiningGroup"
|
||||
:params [chat-id]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]})
|
||||
@@ -55,7 +55,7 @@
|
||||
:interceptors [(re-frame/inject-cofx :random-guid-generator)]}
|
||||
[{:keys [db] :as cofx} group-name]
|
||||
(let [selected-contacts (:group/selected-contacts db)]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "createGroupChatWithMembers")
|
||||
{::json-rpc/call [{:method "wakuext_createGroupChatWithMembers"
|
||||
:params [nil group-name (into [] selected-contacts)]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]}))
|
||||
@@ -65,7 +65,7 @@
|
||||
(if (get-in cofx [:db :chats chat-id])
|
||||
{:dispatch-n [[:accept-all-activity-center-notifications-from-chat chat-id]
|
||||
[:chat.ui/navigate-to-chat chat-id]]}
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "createGroupChatFromInvitation")
|
||||
{::json-rpc/call [{:method "wakuext_createGroupChatFromInvitation"
|
||||
:params [chat-name chat-id invitation-admin]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]}))
|
||||
@@ -73,7 +73,7 @@
|
||||
(fx/defn make-admin
|
||||
{:events [:group-chats.ui/make-admin-pressed]}
|
||||
[_ chat-id member]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "addAdminsToGroupChat")
|
||||
{::json-rpc/call [{:method "wakuext_addAdminsToGroupChat"
|
||||
:params [nil chat-id [member]]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]})
|
||||
@@ -82,7 +82,7 @@
|
||||
"Add members to a group chat"
|
||||
{:events [:group-chats.ui/add-members-pressed]}
|
||||
[{{:keys [current-chat-id selected-participants]} :db :as cofx}]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "addMembersToGroupChat")
|
||||
{::json-rpc/call [{:method "wakuext_addMembersToGroupChat"
|
||||
:params [nil current-chat-id selected-participants]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]})
|
||||
@@ -92,7 +92,7 @@
|
||||
{:events [:group-chats.ui/add-members-from-invitation]}
|
||||
[{{:keys [current-chat-id] :as db} :db :as cofx} id participant]
|
||||
{:db (assoc-in db [:group-chat/invitations id :state] constants/invitation-state-approved)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "addMembersToGroupChat")
|
||||
::json-rpc/call [{:method "wakuext_addMembersToGroupChat"
|
||||
:params [nil current-chat-id [participant]]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]})
|
||||
@@ -101,7 +101,7 @@
|
||||
"Leave chat"
|
||||
{:events [:group-chats.ui/leave-chat-confirmed]}
|
||||
[{:keys [db] :as cofx} chat-id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "leaveGroupChat")
|
||||
{::json-rpc/call [{:method "wakuext_leaveGroupChat"
|
||||
:params [nil chat-id true]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-removed %])}]})
|
||||
@@ -126,7 +126,7 @@
|
||||
[{:keys [db] :as cofx} chat-id new-name]
|
||||
(when (valid-name? new-name)
|
||||
{:db (assoc-in db [:chats chat-id :name] new-name)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "changeGroupChatName")
|
||||
::json-rpc/call [{:method "wakuext_changeGroupChatName"
|
||||
:params [nil chat-id new-name]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:chat-updated %])}]}))
|
||||
@@ -148,7 +148,7 @@
|
||||
(let [{:keys [invitation-admin]} (get chats current-chat-id)
|
||||
message (get-in db [:chat/memberships current-chat-id :message])]
|
||||
{:db (assoc-in db [:chat/memberships current-chat-id] nil)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "sendGroupChatInvitationRequest")
|
||||
::json-rpc/call [{:method "wakuext_sendGroupChatInvitationRequest"
|
||||
:params [nil current-chat-id invitation-admin message]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])}]}))
|
||||
@@ -157,7 +157,7 @@
|
||||
"Send group chat membership rejection"
|
||||
{:events [:send-group-chat-membership-rejection]}
|
||||
[cofx invitation-id]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "sendGroupChatInvitationRejection")
|
||||
{::json-rpc/call [{:method "wakuext_sendGroupChatInvitationRejection"
|
||||
:params [nil invitation-id]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])}]})
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
[status-im.popover.core :as popover]
|
||||
[status-im.communities.core :as communities]
|
||||
[status-im.transport.core :as transport]
|
||||
[status-im.stickers.core :as stickers]
|
||||
[status-im.mobile-sync-settings.core :as mobile-network]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.utils.keychain.core :as keychain]
|
||||
@@ -347,7 +346,7 @@
|
||||
|
||||
(fx/defn get-group-chat-invitations [_]
|
||||
{::json-rpc/call
|
||||
[{:method (json-rpc/call-ext-method "getGroupChatInvitations")
|
||||
[{:method "wakuext_getGroupChatInvitations"
|
||||
:on-success #(re-frame/dispatch [::initialize-invitations %])}]})
|
||||
|
||||
(fx/defn initialize-communities-enabled
|
||||
@@ -445,7 +444,6 @@
|
||||
(initialize-transactions-management-enabled)
|
||||
(check-network-version network-id)
|
||||
(contact/initialize-contacts)
|
||||
(stickers/init-stickers-packs)
|
||||
(initialize-browser)
|
||||
(mobile-network/on-network-status-change)
|
||||
(get-group-chat-invitations)
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
(ns status-im.multiaccounts.update.core
|
||||
(:require [status-im.ethereum.json-rpc :as json-rpc]
|
||||
(:require [status-im.constants :as constants]
|
||||
[status-im.ethereum.json-rpc :as json-rpc]
|
||||
[status-im.utils.fx :as fx]
|
||||
[taoensso.timbre :as log]))
|
||||
|
||||
(fx/defn send-multiaccount-update [{:keys [db] :as cofx}]
|
||||
(let [multiaccount (:multiaccount db)
|
||||
{:keys [name preferred-name address]} multiaccount]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "sendContactUpdates")
|
||||
{::json-rpc/call [{:method "wakuext_sendContactUpdates"
|
||||
:params [(or preferred-name name) ""]
|
||||
:on-success #(log/debug "sent contact update")}]}))
|
||||
|
||||
@@ -42,7 +43,15 @@
|
||||
|
||||
(fx/defn optimistic
|
||||
[{:keys [db] :as cofx} setting setting-value]
|
||||
(let [current-multiaccount (:multiaccount db)]
|
||||
(let [current-multiaccount (:multiaccount db)
|
||||
setting-value (if (= :currency setting)
|
||||
(keyword setting-value)
|
||||
setting-value)
|
||||
db (if (= :stickers/packs-installed setting)
|
||||
;;updating :stickers/packs for installed stickers
|
||||
(let [packs-installed-keys (keys (js->clj setting-value))]
|
||||
(reduce #(assoc-in %1 [:stickers/packs %2 :status] constants/sticker-pack-status-installed) db packs-installed-keys))
|
||||
db)]
|
||||
{:db (if setting-value
|
||||
(assoc-in db [:multiaccount setting] setting-value)
|
||||
(update db :multiaccount dissoc setting))}))
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
:id comp
|
||||
:options (merge (cond-> (roots/status-bar-options)
|
||||
(and platform/android? (not (quo.colors/dark?)))
|
||||
(assoc-in [:statusBar :translucent] true))
|
||||
(assoc-in [:statusBar :backgroundColor] "#99999A"))
|
||||
{:layout {:componentBackgroundColor (if platform/android?
|
||||
(:backdrop @quo.colors/theme)
|
||||
"transparent")}
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
|
||||
(defn topbar-options []
|
||||
{:noBorder true
|
||||
:scrollEdgeAppearance {:active false
|
||||
:noBorder true}
|
||||
:elevation 0
|
||||
:title {:color colors/black}
|
||||
:rightButtonColor colors/black
|
||||
@@ -114,6 +116,7 @@
|
||||
:id :intro
|
||||
:options (status-bar-options)}}]
|
||||
:options (merge (default-root)
|
||||
(status-bar-options)
|
||||
{:topBar (assoc (topbar-options) :visible false)})}}}
|
||||
|
||||
;; ONBOARDING
|
||||
@@ -123,6 +126,7 @@
|
||||
:id :get-your-keys
|
||||
:options (status-bar-options)}}]
|
||||
:options (merge (default-root)
|
||||
(status-bar-options)
|
||||
{:topBar (assoc (topbar-options) :elevation 0 :noBorder true :animate false)})}}}
|
||||
|
||||
;;PROGRESS
|
||||
@@ -143,6 +147,7 @@
|
||||
:id :login
|
||||
:options (get-screen-options :login)}}]
|
||||
:options (merge (default-root)
|
||||
(status-bar-options)
|
||||
{:topBar (topbar-options)})}}}
|
||||
|
||||
:multiaccounts-keycard
|
||||
@@ -154,6 +159,7 @@
|
||||
:id :keycard-login-pin
|
||||
:options (get-screen-options :keycard-login-pin)}}]
|
||||
:options (merge (default-root)
|
||||
(status-bar-options)
|
||||
{:topBar (topbar-options)})}}}
|
||||
|
||||
;;WELCOME
|
||||
@@ -162,6 +168,7 @@
|
||||
:id :welcome
|
||||
:options (status-bar-options)}}]
|
||||
:options (merge (default-root)
|
||||
(status-bar-options)
|
||||
{:topBar (assoc (topbar-options) :visible false)})}}}
|
||||
|
||||
;;NOTIFICATIONS
|
||||
@@ -170,6 +177,7 @@
|
||||
:id :onboarding-notification
|
||||
:options (status-bar-options)}}]
|
||||
:options (merge (default-root)
|
||||
(status-bar-options)
|
||||
{:topBar (assoc (topbar-options) :visible false)})}}}
|
||||
|
||||
;; TERMS OF SERVICE
|
||||
@@ -178,4 +186,5 @@
|
||||
:id :force-accept-tos
|
||||
:options (get-screen-options :force-accept-tos)}}]
|
||||
:options (merge (default-root)
|
||||
(status-bar-options)
|
||||
{:topBar (assoc (topbar-options) :visible false)})}}}})
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
(ns status-im.navigation2
|
||||
(:require [status-im.utils.fx :as fx]
|
||||
[status-im.utils.datetime :as datetime]))
|
||||
|
||||
(def parent-stack (atom :home-stack))
|
||||
|
||||
(fx/defn init-root-nav2
|
||||
{:events [:init-root-nav2]}
|
||||
[_ root-id]
|
||||
{:init-root-fx-nav2 root-id})
|
||||
|
||||
(fx/defn open-modal-nav2
|
||||
{:events [:open-modal-nav2]}
|
||||
[_ modal]
|
||||
{:open-modal-fx-nav2 modal})
|
||||
|
||||
(fx/defn close-modal-nav2
|
||||
{:events [:close-modal-nav2]}
|
||||
[_ modal]
|
||||
{:close-modal-fx-nav2 modal})
|
||||
|
||||
(defn navigate-from-home-stack [go-to-view-id id db]
|
||||
(reset! parent-stack go-to-view-id)
|
||||
{:navigate-to-fx-nav2 [go-to-view-id id]
|
||||
:db (assoc-in db [:navigation2/navigation2-stacks id] {:type go-to-view-id
|
||||
:id id
|
||||
:clock (datetime/timestamp)})})
|
||||
|
||||
(defn navigate-from-switcher [go-to-view-id id db from-home?]
|
||||
(reset! parent-stack go-to-view-id)
|
||||
{:navigate-from-switcher-fx [go-to-view-id id from-home?]
|
||||
:db (assoc-in db [:navigation2/navigation2-stacks id] {:type go-to-view-id
|
||||
:id id
|
||||
:clock (datetime/timestamp)})})
|
||||
|
||||
(fx/defn navigate-to-nav2
|
||||
{:events [:navigate-to-nav2]}
|
||||
[{:keys [db] :as cofx} go-to-view-id id screen-params from-switcher?]
|
||||
(let [view-id (:view-id db)
|
||||
stacks (:navigation2/navigation2-stacks db)
|
||||
from-home? (= view-id :home-stack)]
|
||||
(if from-switcher?
|
||||
(navigate-from-switcher go-to-view-id id db from-home?)
|
||||
(if from-home?
|
||||
(navigate-from-home-stack go-to-view-id id db)
|
||||
;; TODO(parvesh) - new stacks created from other screens should be stacked on current stack, instead of creating new entry
|
||||
(navigate-from-home-stack go-to-view-id id db)))))
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
(ns status-im.navigation2.core
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.ui.screens.views :as views]
|
||||
[status-im.navigation2.utils :as nav2-utils]
|
||||
[status-im.navigation2.roots :as roots]
|
||||
[status-im.navigation.roots :as nav-roots]
|
||||
["react-native-navigation" :refer (Navigation)]))
|
||||
|
||||
(def tab-key-idx {:home 0
|
||||
:communities 1
|
||||
:wallet 2
|
||||
:browser 3})
|
||||
|
||||
(defonce set-navigation-default-options
|
||||
(.setDefaultOptions Navigation (clj->js {:options {:topBar {:visible false}}})))
|
||||
|
||||
;; TODO (parvesh) - improve open-modal and close-modal
|
||||
(defn open-modal [comp]
|
||||
(.showModal Navigation
|
||||
(clj->js {:stack {:children
|
||||
[{:component
|
||||
{:name comp
|
||||
:id comp
|
||||
:options {:topBar {:visible false}}}}]}})))
|
||||
|
||||
(defn close-modal [_])
|
||||
|
||||
(defn close-all-modals []
|
||||
(.dismissAllModals Navigation))
|
||||
|
||||
(defn get-id [comp id]
|
||||
(str comp "-" id))
|
||||
|
||||
(defn get-options [show-topbar? options]
|
||||
(if show-topbar?
|
||||
(merge options
|
||||
(nav-roots/status-bar-options)
|
||||
(nav-roots/merge-top-bar (nav-roots/topbar-options) options))
|
||||
{:topBar {:visible false}}))
|
||||
|
||||
(defn change-stack-root [[comp _]]
|
||||
(let [{:keys [options]} (get views/screens comp)]
|
||||
(.setStackRoot Navigation
|
||||
(name comp)
|
||||
(clj->js {:stack {:id comp
|
||||
:children [{:component {:id comp
|
||||
:name comp
|
||||
:options (get-options false options)}}]}}))))
|
||||
|
||||
(defn navigate [[comp _]]
|
||||
(let [{:keys [options]} (get views/screens comp)]
|
||||
(reset! nav2-utils/container-stack-view-id comp)
|
||||
(.push Navigation
|
||||
(name :home-stack)
|
||||
(clj->js {:stack {:id comp
|
||||
:children [{:component {:id comp
|
||||
:name comp
|
||||
:options (get-options false options)}}]}}))))
|
||||
|
||||
(defn navigate-from-switcher [[comp id from-home?]]
|
||||
(if from-home?
|
||||
(navigate [comp id])
|
||||
(change-stack-root [comp id])))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:init-root-fx-nav2
|
||||
(fn [new-root-id]
|
||||
(reset! nav2-utils/container-stack-view-id new-root-id)
|
||||
(.setRoot Navigation (clj->js (get (roots/roots) new-root-id)))))
|
||||
|
||||
(re-frame/reg-fx :open-modal-fx-nav2 open-modal)
|
||||
|
||||
(re-frame/reg-fx :close-modal-fx-nav2 close-modal)
|
||||
|
||||
(re-frame/reg-fx :navigate-to-fx-nav2 navigate)
|
||||
|
||||
(re-frame/reg-fx :navigate-from-switcher-fx navigate-from-switcher)
|
||||
@@ -0,0 +1,27 @@
|
||||
(ns status-im.navigation2.home-stack
|
||||
(:require [quo.react-native :as rn]
|
||||
[quo2.screens.main :as quo2.preview]
|
||||
[status-im.switcher.switcher :as switcher]
|
||||
[status-im.ui.screens.home.views :as home]
|
||||
[status-im.switcher.constants :as switcher-constants]
|
||||
[status-im.ui.screens.browser.empty-tab.views :as empty-tab]
|
||||
[status-im.ui.screens.wallet.accounts.views :as wallet.accounts]
|
||||
[status-im.switcher.bottom-tabs :as bottom-tabs]))
|
||||
|
||||
;; TODO(parvesh) - improve stack changing performance (load all stacks at once)
|
||||
(defn stack-view []
|
||||
(let [{:keys [width height]} (switcher-constants/dimensions)]
|
||||
;; bottom-tabs-height (switcher-constants/bottom-tabs-height)]
|
||||
[rn/view {:style {:width width
|
||||
:height (- height 80)}} ;; TODO(parvesh) - add height for ios
|
||||
(case @bottom-tabs/selected-tab-id
|
||||
:chats-stack [home/home]
|
||||
:communities-stack [quo2.preview/main-screen]
|
||||
:wallet-stack [wallet.accounts/accounts-overview]
|
||||
:browser-stack [empty-tab/empty-tab])]))
|
||||
|
||||
(defn home []
|
||||
[:<>
|
||||
[stack-view]
|
||||
[bottom-tabs/bottom-tabs]
|
||||
[switcher/switcher :home-stack]])
|
||||
@@ -0,0 +1,9 @@
|
||||
(ns status-im.navigation2.roots)
|
||||
|
||||
(defn roots []
|
||||
{:home-stack
|
||||
{:root
|
||||
{:stack {:id :home-stack
|
||||
:children [{:component {:name :home-stack
|
||||
:id :home-stack
|
||||
:options {:topBar {:visible false}}}}]}}}})
|
||||
@@ -0,0 +1,6 @@
|
||||
(ns status-im.navigation2.screens
|
||||
(:require [status-im.navigation2.home-stack :as home-stack]))
|
||||
|
||||
(def screens [{:name :home-stack
|
||||
:insets {:top false}
|
||||
:component home-stack/home}])
|
||||
@@ -0,0 +1,7 @@
|
||||
(ns status-im.navigation2.stack-with-switcher
|
||||
(:require [status-im.switcher.switcher :as switcher]))
|
||||
|
||||
(defn overlap-stack [comp view-id]
|
||||
[:<>
|
||||
[comp]
|
||||
[switcher/switcher view-id]])
|
||||
@@ -0,0 +1,3 @@
|
||||
(ns status-im.navigation2.utils)
|
||||
|
||||
(defonce container-stack-view-id (atom nil))
|
||||
@@ -119,7 +119,7 @@
|
||||
(fx/defn handle-enable-notifications-event
|
||||
{:events [:notifications/registered-for-push-notifications]}
|
||||
[cofx token]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "registerForPushNotifications")
|
||||
{::json-rpc/call [{:method "wakuext_registerForPushNotifications"
|
||||
:params [token (if platform/ios? config/apn-topic) (if platform/ios? apn-token-type firebase-token-type)]
|
||||
:on-success #(log/info "[push-notifications] register-success" %)
|
||||
:on-error #(re-frame/dispatch [:notifications/switch-error true %])}]})
|
||||
@@ -127,7 +127,7 @@
|
||||
(fx/defn handle-disable-notifications-event
|
||||
{:events [:notifications/unregistered-from-push-notifications]}
|
||||
[cofx]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "unregisterFromPushNotifications")
|
||||
{::json-rpc/call [{:method "wakuext_unregisterFromPushNotifications"
|
||||
:params []
|
||||
:on-success #(log/info "[push-notifications] unregister-success" %)
|
||||
:on-error #(re-frame/dispatch [:notifications/switch-error false %])}]})
|
||||
@@ -135,7 +135,7 @@
|
||||
(fx/defn logout-disable
|
||||
[cofx]
|
||||
(merge {::logout-disable nil}
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "unregisterFromPushNotifications")
|
||||
{::json-rpc/call [{:method "wakuext_unregisterFromPushNotifications"
|
||||
:params []
|
||||
:on-success #(log/info "[push-notifications] unregister-success" %)
|
||||
:on-error #(log/info "[push-notifications] unregister-error" %)}]}))
|
||||
@@ -172,10 +172,10 @@
|
||||
{:events [::switch-non-contacts]}
|
||||
[{:keys [db] :as cofx} enabled?]
|
||||
(let [method (if enabled?
|
||||
"enablePushNotificationsFromContactsOnly"
|
||||
"disablePushNotificationsFromContactsOnly")]
|
||||
"wakuext_enablePushNotificationsFromContactsOnly"
|
||||
"wakuext_disablePushNotificationsFromContactsOnly")]
|
||||
(fx/merge cofx
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method method)
|
||||
{::json-rpc/call [{:method method
|
||||
:params []
|
||||
:on-success #(log/info "[push-notifications] contacts-notification-success" %)
|
||||
:on-error #(re-frame/dispatch [::non-contacts-update-error enabled? %])}]}
|
||||
@@ -186,11 +186,11 @@
|
||||
{:events [::switch-block-mentions]}
|
||||
[{:keys [db] :as cofx} enabled?]
|
||||
(let [method (if enabled?
|
||||
"enablePushNotificationsBlockMentions"
|
||||
"disablePushNotificationsBlockMentions")]
|
||||
"wakuext_enablePushNotificationsBlockMentions"
|
||||
"wakuext_disablePushNotificationsBlockMentions")]
|
||||
(log/info "USING METHOD" method enabled?)
|
||||
(fx/merge cofx
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method method)
|
||||
{::json-rpc/call [{:method method
|
||||
:params []
|
||||
:on-success #(log/info "[push-notifications] block-mentions-success" %)
|
||||
:on-error #(re-frame/dispatch [::block-mentions-update-error enabled? %])}]}
|
||||
@@ -201,10 +201,10 @@
|
||||
{:events [::switch-push-notifications-server-enabled]}
|
||||
[{:keys [db] :as cofx} enabled?]
|
||||
(let [method (if enabled?
|
||||
"startPushNotificationsServer"
|
||||
"stopPushNotificationsServer")]
|
||||
"wakuext_startPushNotificationsServer"
|
||||
"wakuext_stopPushNotificationsServer")]
|
||||
(fx/merge cofx
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method method)
|
||||
{::json-rpc/call [{:method method
|
||||
:params []
|
||||
:on-success #(log/info "[push-notifications] switch-server-enabled successful" %)
|
||||
:on-error #(re-frame/dispatch [::push-notifications-server-update-error enabled? %])}]}
|
||||
@@ -215,10 +215,10 @@
|
||||
{:events [::switch-send-push-notifications]}
|
||||
[{:keys [db] :as cofx} enabled?]
|
||||
(let [method (if enabled?
|
||||
"enableSendingNotifications"
|
||||
"disableSendingNotifications")]
|
||||
"wakuext_enableSendingNotifications"
|
||||
"wakuext_disableSendingNotifications")]
|
||||
(fx/merge cofx
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method method)
|
||||
{::json-rpc/call [{:method method
|
||||
:params []
|
||||
:on-success #(log/info "[push-notifications] switch-send-notifications successful" %)
|
||||
:on-error #(re-frame/dispatch [::push-notifications-send-update-error enabled? %])}]}
|
||||
@@ -234,7 +234,7 @@
|
||||
{:events [::add-server]}
|
||||
[{:keys [db] :as cofx} public-key]
|
||||
(fx/merge cofx
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "addPushNotificationsServer")
|
||||
{::json-rpc/call [{:method "wakuext_addPushNotificationsServer"
|
||||
:params [public-key]
|
||||
:on-success #(do
|
||||
(log/info "[push-notifications] switch-send-notifications successful" %)
|
||||
@@ -249,7 +249,7 @@
|
||||
(fx/defn fetch-push-notifications-servers
|
||||
{:events [::fetch-servers]}
|
||||
[cofx]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "getPushNotificationsServers")
|
||||
{::json-rpc/call [{:method "wakuext_getPushNotificationsServers"
|
||||
:params []
|
||||
:on-success #(do
|
||||
(log/info "[push-notifications] servers fetched" %)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
(fx/defn get-activity-center-notifications-count
|
||||
{:events [:get-activity-center-notifications-count]}
|
||||
[_]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "unreadActivityCenterNotificationsCount")
|
||||
{::json-rpc/call [{:method "wakuext_unreadActivityCenterNotificationsCount"
|
||||
:params []
|
||||
:on-success #(re-frame/dispatch [:get-activity-center-notifications-count-success %])
|
||||
:on-error #()}]})
|
||||
@@ -48,7 +48,7 @@
|
||||
[{:keys [db]} ids]
|
||||
{:db (update-in db [:activity.center/notifications :notifications]
|
||||
(fn [items] (remove #(get ids (:id %)) items)))
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "dismissActivityCenterNotifications")
|
||||
::json-rpc/call [{:method "wakuext_dismissActivityCenterNotifications"
|
||||
:params [ids]
|
||||
:on-success #()
|
||||
:on-error #()}]})
|
||||
@@ -59,7 +59,7 @@
|
||||
(when (seq ids)
|
||||
{:db (update-in db [:activity.center/notifications :notifications]
|
||||
(fn [items] (remove #(get ids (:id %)) items)))
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "acceptActivityCenterNotifications")
|
||||
::json-rpc/call [{:method "wakuext_acceptActivityCenterNotifications"
|
||||
:params [ids]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||
@@ -78,7 +78,7 @@
|
||||
(update-in [:activity.center/notifications :notifications]
|
||||
(fn [items] (filter #(not (= chat-id (:chat-id %))) items)))
|
||||
(update :activity.center/notifications-count - (min (db :activity.center/notifications-count) (count notifications-from-chat-not-read))))
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "acceptActivityCenterNotifications")
|
||||
::json-rpc/call [{:method "wakuext_acceptActivityCenterNotifications"
|
||||
:params [ids]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||
@@ -89,7 +89,7 @@
|
||||
[{:keys [db]} id]
|
||||
{:db (update-in db [:activity.center/notifications :notifications]
|
||||
(fn [items] (remove #(= id (:id %)) items)))
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "acceptActivityCenterNotifications")
|
||||
::json-rpc/call [{:method "wakuext_acceptActivityCenterNotifications"
|
||||
:params [[id]]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:ensure-and-open-chat %])
|
||||
@@ -105,7 +105,7 @@
|
||||
{:events [:dismiss-all-activity-center-notifications]}
|
||||
[{:keys [db]}]
|
||||
{:db (assoc-in db [:activity.center/notifications :notifications] [])
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "dismissAllActivityCenterNotifications")
|
||||
::json-rpc/call [{:method "wakuext_dismissAllActivityCenterNotifications"
|
||||
:params []
|
||||
:on-success #()
|
||||
:on-error #()}]})
|
||||
@@ -114,7 +114,7 @@
|
||||
{:events [:accept-all-activity-center-notifications]}
|
||||
[{:keys [db]}]
|
||||
{:db (assoc-in db [:activity.center/notifications :notifications] [])
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "acceptAllActivityCenterNotifications")
|
||||
::json-rpc/call [{:method "wakuext_acceptAllActivityCenterNotifications"
|
||||
:params []
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||
@@ -124,7 +124,7 @@
|
||||
{:events [:mark-all-activity-center-notifications-as-read]}
|
||||
[{:keys [db]}]
|
||||
{:db (assoc db :activity.center/notifications-count 0)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "markAllActivityCenterNotificationsRead")
|
||||
::json-rpc/call [{:method "wakuext_markAllActivityCenterNotificationsRead"
|
||||
:params []
|
||||
:on-success #()
|
||||
:on-error #()}]})
|
||||
@@ -132,7 +132,7 @@
|
||||
(fx/defn load-notifications [{:keys [db]} cursor]
|
||||
(when-not (:activity.center/loading? db)
|
||||
{:db (assoc db :activity.center/loading? true)
|
||||
::json-rpc/call [{:method (json-rpc/call-ext-method "activityCenterNotifications")
|
||||
::json-rpc/call [{:method "wakuext_activityCenterNotifications"
|
||||
:params [cursor 20]
|
||||
:on-success #(re-frame/dispatch [:activity-center-notifications-success %])
|
||||
:on-error #(re-frame/dispatch [:activity-center-notifications-error %])}]}))
|
||||
|
||||
@@ -10,25 +10,25 @@
|
||||
[status-im.multiaccounts.update.core :as multiaccounts.update]))
|
||||
|
||||
(defn enable-installation-rpc [installation-id on-success on-failure]
|
||||
(json-rpc/call {:method (json-rpc/call-ext-method "enableInstallation")
|
||||
(json-rpc/call {:method "wakuext_enableInstallation"
|
||||
:params [installation-id]
|
||||
:on-success on-success
|
||||
:on-failure on-failure}))
|
||||
|
||||
(defn disable-installation-rpc [installation-id on-success on-failure]
|
||||
(json-rpc/call {:method (json-rpc/call-ext-method "disableInstallation")
|
||||
(json-rpc/call {:method "wakuext_disableInstallation"
|
||||
:params [installation-id]
|
||||
:on-success on-success
|
||||
:on-failure on-failure}))
|
||||
|
||||
(defn set-installation-metadata-rpc [installation-id metadata on-success on-failure]
|
||||
(json-rpc/call {:method (json-rpc/call-ext-method "setInstallationMetadata")
|
||||
(json-rpc/call {:method "wakuext_setInstallationMetadata"
|
||||
:params [installation-id metadata]
|
||||
:on-success on-success
|
||||
:on-failure on-failure}))
|
||||
|
||||
(defn get-our-installations-rpc [on-success on-failure]
|
||||
(json-rpc/call {:method (json-rpc/call-ext-method "getOurInstallations")
|
||||
(json-rpc/call {:method "wakuext_getOurInstallations"
|
||||
:params []
|
||||
:on-success on-success
|
||||
:on-failure on-failure}))
|
||||
@@ -55,7 +55,7 @@
|
||||
(fx/defn send-pair-installation
|
||||
{:events [:pairing.ui/pair-devices-pressed]}
|
||||
[_]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "sendPairInstallation")
|
||||
{::json-rpc/call [{:method "wakuext_sendPairInstallation"
|
||||
:params []
|
||||
:on-success #(log/info "sent pair installation message")}]})
|
||||
|
||||
@@ -183,7 +183,7 @@
|
||||
[{:keys [db]}]
|
||||
(let [multiaccount (:multiaccount db)
|
||||
{:keys [name preferred-name identicon]} multiaccount]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "syncDevices")
|
||||
{::json-rpc/call [{:method "wakuext_syncDevices"
|
||||
:params [(or preferred-name name) identicon]
|
||||
:on-success #(log/debug "successfully synced devices")}]}))
|
||||
|
||||
|
||||
@@ -71,8 +71,6 @@
|
||||
"mailserver.not.working" (mailserver/handle-mailserver-not-working cofx)
|
||||
"discovery.summary" (summary cofx (js->clj event-js :keywordize-keys true))
|
||||
"wakuv2.peerstats" (wakuv2-peer-stats cofx (js->clj event-js :keywordize-keys true))
|
||||
"subscriptions.data" (ethereum.subscriptions/handle-signal cofx (js->clj event-js :keywordize-keys true))
|
||||
"subscriptions.error" (ethereum.subscriptions/handle-error cofx (js->clj event-js :keywordize-keys true))
|
||||
"messages.new" (transport.message/sanitize-messages-and-process-response cofx event-js true)
|
||||
"wallet" (ethereum.subscriptions/new-wallet-event cofx (js->clj event-js :keywordize-keys true))
|
||||
"local-notifications" (local-notifications/process cofx (js->clj event-js :keywordize-keys true))
|
||||
|
||||
@@ -288,7 +288,7 @@
|
||||
(fx/defn send-transaction-message
|
||||
{:events [:sign/send-transaction-message]}
|
||||
[cofx chat-id value contract transaction-hash signature]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "sendTransaction")
|
||||
{::json-rpc/call [{:method "wakuext_sendTransaction"
|
||||
;; We make sure `value` is serialized as string, and not
|
||||
;; as an integer or big-int
|
||||
:params [chat-id (str value) contract transaction-hash
|
||||
@@ -301,7 +301,7 @@
|
||||
(fx/defn send-accept-request-transaction-message
|
||||
{:events [:sign/send-accept-transaction-message]}
|
||||
[cofx message-id transaction-hash signature]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "acceptRequestTransaction")
|
||||
{::json-rpc/call [{:method "wakuext_acceptRequestTransaction"
|
||||
:params [transaction-hash message-id
|
||||
(or (:result (types/json->clj signature))
|
||||
(ethereum/normalized-hex signature))]
|
||||
@@ -482,7 +482,7 @@
|
||||
[to-norm amount-hex])})}))
|
||||
{:db db
|
||||
::json-rpc/call
|
||||
[{:method (json-rpc/call-ext-method "requestAddressForTransaction")
|
||||
[{:method "wakuext_requestAddressForTransaction"
|
||||
:params [(:current-chat-id db)
|
||||
from-address
|
||||
amount
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
(fn []
|
||||
(json-rpc/call
|
||||
{:method "eth_gasPrice"
|
||||
:on-success success-callback
|
||||
:on-success #(success-callback (money/bignumber %))
|
||||
:on-error (or error-callback #(log/warn "eth_gasPrice error" %))})))))
|
||||
|
||||
(def london-block-gas-limit (money/bignumber 30000000))
|
||||
@@ -378,7 +378,7 @@
|
||||
:testnet? (ethereum/testnet?
|
||||
(get-in networks [current-network :config :NetworkId]))))]
|
||||
(merge {:max-priority-fee
|
||||
(max-priority-fee-hex % current-base-fee)}
|
||||
(max-priority-fee-hex (money/bignumber %) current-base-fee)}
|
||||
base-fees)))
|
||||
:on-error (if error-callback
|
||||
#(error-callback %)
|
||||
@@ -387,7 +387,8 @@
|
||||
(re-frame/reg-fx
|
||||
:signing/update-estimated-gas
|
||||
(fn [{:keys [obj success-event error-event]}]
|
||||
(json-rpc/call {:method "eth_estimateGas"
|
||||
:params [obj]
|
||||
:on-success #(re-frame/dispatch [success-event %])
|
||||
:on-error #(re-frame/dispatch [error-event %])})))
|
||||
(json-rpc/call
|
||||
{:method "eth_estimateGas"
|
||||
:params [obj]
|
||||
:on-success #(re-frame/dispatch [success-event (money/bignumber (if (= (int %) 21000) % (int (* % 1.2))))])
|
||||
:on-error #(re-frame/dispatch [error-event %])})))
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
(ns status-im.stickers.core
|
||||
(:require [cljs.reader :as edn]
|
||||
[clojure.set :as clojure.set]
|
||||
[clojure.string :as string]
|
||||
(:require [clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.ethereum.abi-spec :as abi-spec]
|
||||
[status-im.ethereum.contracts :as contracts]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.json-rpc :as json-rpc]
|
||||
[status-im.navigation :as navigation]
|
||||
[status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[status-im.signing.core :as signing]
|
||||
[status-im.utils.contenthash :as contenthash]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.utils.utils :as utils]))
|
||||
|
||||
(defn pack-data-callback
|
||||
[id]
|
||||
(fn [[_ _ _ _ price contenthash]]
|
||||
(when-let [url (contenthash/url contenthash)]
|
||||
(re-frame/dispatch [:stickers/load-pack url id price]))))
|
||||
[status-im.utils.utils :as utils]
|
||||
[status-im.utils.config :as config]
|
||||
[status-im.constants :as constants]))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:stickers/set-pending-timeout-fx
|
||||
@@ -26,193 +15,109 @@
|
||||
(utils/set-timeout #(re-frame/dispatch [:stickers/pending-timeout])
|
||||
10000)))
|
||||
|
||||
(defn eth-call-pack-data
|
||||
[contract id]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
;; Returns vector of pack data parameters by pack id:
|
||||
;; [category owner mintable timestamp price contenthash]
|
||||
:method "getPackData(uint256)"
|
||||
:params [id]
|
||||
:outputs ["bytes4[]" "address" "bool" "uint256" "uint256" "bytes"]
|
||||
:on-success (pack-data-callback id)}))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:stickers/pack-data-fx
|
||||
(fn [[contract id]]
|
||||
(eth-call-pack-data contract id)))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:stickers/load-packs-fx
|
||||
(fn [[contract]]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
;; Returns number of packs registered in the contract
|
||||
:method "packCount()"
|
||||
:outputs ["uint256"]
|
||||
:on-success
|
||||
(fn [[count]]
|
||||
(dotimes [id count]
|
||||
(eth-call-pack-data contract id)))})))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:stickers/owned-packs-fx
|
||||
(fn [[contract address]]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
;; Returns vector of owned tokens ids in the contract by address
|
||||
:method "balanceOf(address)"
|
||||
:params [address]
|
||||
:outputs ["uint256"]
|
||||
:number-of-retries 3
|
||||
:on-success
|
||||
(fn [[count]]
|
||||
(dotimes [id count]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
;; Returns pack id in the contract by token id
|
||||
:method "tokenOfOwnerByIndex(address,uint256)"
|
||||
:params [address id]
|
||||
:outputs ["uint256"]
|
||||
:number-of-retries 3
|
||||
:on-success
|
||||
(fn [[token-id]]
|
||||
(json-rpc/eth-call
|
||||
{:contract contract
|
||||
;; Returns pack id in the contract by token id
|
||||
:method "tokenPackId(uint256)"
|
||||
:params [token-id]
|
||||
:outputs ["uint256"]
|
||||
:number-of-retries 3
|
||||
:on-success
|
||||
(fn [[pack-id]]
|
||||
(re-frame/dispatch [:stickers/pack-owned pack-id]))}))})))})))
|
||||
|
||||
(fx/defn init-stickers-packs
|
||||
[{:keys [db] :as cofx}]
|
||||
(let [sticker-packs (get-in db [:multiaccount :stickers/packs-installed])
|
||||
pending-packs (get-in db [:multiaccount :stickers/packs-pending] #{})]
|
||||
(cond-> {:db (assoc db
|
||||
:stickers/packs-installed sticker-packs
|
||||
:stickers/packs sticker-packs
|
||||
:stickers/packs-pending pending-packs)}
|
||||
(not-empty pending-packs)
|
||||
(assoc :stickers/set-pending-timeout-fx nil))))
|
||||
|
||||
(fx/defn install-stickers-pack
|
||||
{:events [:stickers/install-pack]}
|
||||
[{{:keys [multiaccount] :as db} :db :as cofx} id]
|
||||
(let [pack (get-in db [:stickers/packs id])]
|
||||
(fx/merge
|
||||
cofx
|
||||
{:db (-> db
|
||||
(assoc-in [:stickers/packs-installed id] pack))}
|
||||
;;(assoc :stickers/selected-pack id))} TODO it doesn't scroll to selected pack on Android
|
||||
(multiaccounts.update/multiaccount-update
|
||||
:stickers/packs-installed
|
||||
(assoc (:stickers/packs-installed multiaccount) id pack)
|
||||
{}))))
|
||||
|
||||
(defn valid-sticker? [sticker]
|
||||
(contains? sticker :hash))
|
||||
|
||||
(fx/defn load-sticker-pack-success
|
||||
{:events [:stickers/load-sticker-pack-success]}
|
||||
[{:keys [db] :as cofx} edn-string id price]
|
||||
(let [{:keys [stickers] :as pack} (assoc (get (edn/read-string edn-string) 'meta)
|
||||
:id id :price price)]
|
||||
(fx/merge cofx
|
||||
{:db (cond-> db
|
||||
(and (seq stickers)
|
||||
(every? valid-sticker? stickers))
|
||||
(assoc-in [:stickers/packs id] pack))})))
|
||||
|
||||
(fx/defn open-sticker-pack
|
||||
{:events [:stickers/open-sticker-pack]}
|
||||
[{{:stickers/keys [packs packs-installed] :networks/keys [current-network] :as db} :db :as cofx} id]
|
||||
(when (and id (string/starts-with? current-network "mainnet"))
|
||||
(let [pack (or (get packs-installed id)
|
||||
(get packs id))
|
||||
contract-address (contracts/get-address db :status/stickers)
|
||||
pack-contract (contracts/get-address db :status/sticker-pack)
|
||||
address (ethereum/default-address db)]
|
||||
(fx/merge cofx
|
||||
(navigation/open-modal :stickers-pack {:id id})
|
||||
#(when (and contract-address (not pack))
|
||||
{:stickers/pack-data-fx [contract-address id]
|
||||
:stickers/owned-packs-fx [pack-contract address]})))))
|
||||
|
||||
(fx/defn load-pack
|
||||
{:events [:stickers/load-pack]}
|
||||
[_ url id price]
|
||||
{:http-get {:url url
|
||||
:on-success
|
||||
(fn [o]
|
||||
(re-frame/dispatch [:stickers/load-sticker-pack-success o id price]))}})
|
||||
[{db :db :as cofx} id]
|
||||
(fx/merge
|
||||
cofx
|
||||
{:db (assoc-in db [:stickers/packs id :status] constants/sticker-pack-status-installed)
|
||||
::json-rpc/call [{:method "stickers_install"
|
||||
:params [(ethereum/chain-id db) id]
|
||||
:on-success #()}]}))
|
||||
|
||||
(fx/defn load-packs
|
||||
{:events [:stickers/load-packs]}
|
||||
[{:keys [db]}]
|
||||
(let [contract (contracts/get-address db :status/stickers)
|
||||
pack-contract (contracts/get-address db :status/sticker-pack)
|
||||
address (ethereum/default-address db)]
|
||||
(when contract
|
||||
{:stickers/owned-packs-fx [pack-contract address]
|
||||
:stickers/load-packs-fx [contract]})))
|
||||
{::json-rpc/call [{:method "stickers_market"
|
||||
:params [(ethereum/chain-id db)]
|
||||
:on-success #(re-frame/dispatch [:stickers/stickers-market-success %])}
|
||||
{:method "stickers_installed"
|
||||
:params []
|
||||
:on-success #(re-frame/dispatch [:stickers/stickers-installed-success %])}
|
||||
{:method "stickers_pending"
|
||||
:params []
|
||||
:on-success #(re-frame/dispatch [:stickers/stickers-pending-success %])}
|
||||
{:method "stickers_recent"
|
||||
:params []
|
||||
:on-success #(re-frame/dispatch [:stickers/stickers-recent-success %])}]})
|
||||
|
||||
(fx/defn approve-pack
|
||||
(fx/defn buy-pack
|
||||
{:events [:stickers/buy-pack]}
|
||||
[{db :db :as cofx} pack-id price]
|
||||
(let [address (ethereum/default-address db)
|
||||
sticker-market-contract (contracts/get-address db :status/sticker-market)
|
||||
snt-contract (contracts/get-address db :status/snt)]
|
||||
(signing/eth-transaction-call
|
||||
cofx
|
||||
{:contract snt-contract
|
||||
:method "approveAndCall(address,uint256,bytes)"
|
||||
:params [sticker-market-contract
|
||||
price
|
||||
(abi-spec/encode "buyToken(uint256,address,uint256)" [pack-id address price])]
|
||||
:on-result [:stickers/pending-pack pack-id]})))
|
||||
[{db :db} pack-id]
|
||||
{::json-rpc/call [{:method "stickers_buyPrepareTx"
|
||||
:params [(ethereum/chain-id db) (ethereum/default-address db) (int pack-id)]
|
||||
:on-success #(re-frame/dispatch [:signing.ui/sign
|
||||
{:tx-obj %
|
||||
:on-result [:stickers/pending-pack pack-id]}])}]})
|
||||
|
||||
(fx/defn pending-pack
|
||||
{:events [:stickers/pending-pack]}
|
||||
[{{:keys [multiaccount] :as db} :db :as cofx} id]
|
||||
(let [contract (contracts/get-address db :status/sticker-pack)
|
||||
address (ethereum/default-address db)
|
||||
pending (get multiaccount :stickers/packs-pending #{})]
|
||||
(when contract
|
||||
(fx/merge cofx
|
||||
{:db (update db :stickers/packs-pending conj id)
|
||||
:stickers/owned-packs-fx [contract address]}
|
||||
(multiaccounts.update/multiaccount-update
|
||||
:stickers/packs-pending
|
||||
(conj pending id)
|
||||
{})
|
||||
#(when (zero? (count (:stickers/packs-pending db)))
|
||||
{:stickers/set-pending-timeout-fx nil})))))
|
||||
[{db :db} id]
|
||||
{:db (-> db
|
||||
(assoc-in [:stickers/packs id :status] constants/sticker-pack-status-pending)
|
||||
(update :stickers/packs-pending conj id))
|
||||
:stickers/set-pending-timeout-fx nil
|
||||
::json-rpc/call [{:method "stickers_addPending"
|
||||
:params [(ethereum/chain-id db) (int id)]
|
||||
:on-success #()}]})
|
||||
|
||||
(fx/defn pending-timeout
|
||||
{:events [:stickers/pending-timeout]}
|
||||
[{{:stickers/keys [packs-pending packs-owned] :as db} :db :as cofx}]
|
||||
(let [packs-diff (clojure.set/difference packs-pending packs-owned)
|
||||
contract (contracts/get-address db :status/sticker-pack)
|
||||
address (ethereum/default-address db)]
|
||||
(when contract
|
||||
(fx/merge cofx
|
||||
(merge {:db (assoc db :stickers/packs-pending packs-diff)}
|
||||
(when-not (zero? (count packs-diff))
|
||||
{:stickers/owned-packs-fx [contract address]
|
||||
:stickers/set-pending-timeout-fx nil}))
|
||||
(multiaccounts.update/multiaccount-update
|
||||
:stickers/packs-pending
|
||||
packs-diff
|
||||
{})))))
|
||||
[{{:stickers/keys [packs-pending] :as db} :db}]
|
||||
(when (seq packs-pending)
|
||||
{::json-rpc/call [{:method "stickers_processPending"
|
||||
:params [(ethereum/chain-id db)]
|
||||
:on-success #(re-frame/dispatch [:stickers/stickers-process-pending-success %])}]}))
|
||||
|
||||
(fx/defn pack-owned
|
||||
{:events [:stickers/pack-owned]}
|
||||
[{db :db} id]
|
||||
{:db (update db :stickers/packs-owned conj id)})
|
||||
(fx/defn stickers-process-pending-success
|
||||
{:events [:stickers/stickers-process-pending-success]}
|
||||
[{{:stickers/keys [packs-pending packs] :as db} :db} purchased]
|
||||
(let [purchased-ids (map :id (vals purchased))
|
||||
packs-pending (apply disj packs-pending purchased-ids)
|
||||
packs (reduce (fn [packs id]
|
||||
(assoc-in packs [id :status] constants/sticker-pack-status-owned))
|
||||
packs
|
||||
purchased-ids)]
|
||||
(merge
|
||||
{:db (-> db
|
||||
(assoc :stickers/packs packs)
|
||||
(assoc :stickers/packs-pending packs-pending))}
|
||||
(when (seq packs-pending)
|
||||
{:stickers/set-pending-timeout-fx nil}))))
|
||||
|
||||
(fx/defn stickers-market-success
|
||||
{:events [:stickers/stickers-market-success]}
|
||||
[{:keys [db]} packs]
|
||||
(let [packs (reduce (fn [acc pack] (assoc acc (:id pack) pack)) {} packs)]
|
||||
{:db (update db :stickers/packs merge packs)}))
|
||||
|
||||
(fx/defn stickers-installed-success
|
||||
{:events [:stickers/stickers-installed-success]}
|
||||
[{:keys [db]} packs]
|
||||
(let [packs (reduce (fn [acc [_ pack]] (assoc acc (:id pack) pack)) {} packs)]
|
||||
{:db (update db :stickers/packs merge packs)}))
|
||||
|
||||
(fx/defn stickers-pending-success
|
||||
{:events [:stickers/stickers-pending-success]}
|
||||
[{:keys [db]} packs]
|
||||
(let [packs (reduce (fn [acc [_ pack]] (assoc acc (:id pack) pack)) {} packs)]
|
||||
(merge
|
||||
{:db (-> db
|
||||
(assoc :stickers/packs-pending (into #{} (keys packs)))
|
||||
(update :stickers/packs merge packs))}
|
||||
(when (seq packs)
|
||||
{:stickers/set-pending-timeout-fx nil}))))
|
||||
|
||||
(fx/defn stickers-recent-success
|
||||
{:events [:stickers/stickers-recent-success]}
|
||||
[{:keys [db]} packs]
|
||||
{:db (assoc db :stickers/recent-stickers packs)})
|
||||
|
||||
(fx/defn open-sticker-pack
|
||||
{:events [:stickers/open-sticker-pack]}
|
||||
[{{:networks/keys [current-network]} :db :as cofx} id]
|
||||
(when (and id (or config/stickers-test-enabled? (string/starts-with? current-network "mainnet")))
|
||||
(navigation/open-modal cofx :stickers-pack {:id id})))
|
||||
|
||||
(fx/defn select-pack
|
||||
{:events [:stickers/select-pack]}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
(ns status-im.stickers.core-test
|
||||
(:require [cljs.test :refer-macros [deftest is]]
|
||||
[status-im.stickers.core :as stickers]))
|
||||
|
||||
(deftest valid-sticker?
|
||||
(is (true? (stickers/valid-sticker? {:hash ""})))
|
||||
(is (false? (stickers/valid-sticker? {}))))
|
||||
@@ -87,6 +87,7 @@
|
||||
(reg-root-key-sub :home-items-show-number :home-items-show-number)
|
||||
(reg-root-key-sub :waku/v2-peer-stats :peer-stats)
|
||||
(reg-root-key-sub :visibility-status-updates :visibility-status-updates)
|
||||
(reg-root-key-sub :navigation2/navigation2-stacks :navigation2/navigation2-stacks)
|
||||
|
||||
;;NOTE this one is not related to ethereum network
|
||||
;; it is about cellular network/ wifi network
|
||||
@@ -136,9 +137,7 @@
|
||||
;;stickers
|
||||
(reg-root-key-sub :stickers/selected-pack :stickers/selected-pack)
|
||||
(reg-root-key-sub :stickers/packs :stickers/packs)
|
||||
(reg-root-key-sub :stickers/installed-packs :stickers/packs-installed)
|
||||
(reg-root-key-sub :stickers/packs-owned :stickers/packs-owned)
|
||||
(reg-root-key-sub :stickers/packs-pending :stickers/packs-pending)
|
||||
(reg-root-key-sub :stickers/recent-stickers :stickers/recent-stickers)
|
||||
|
||||
;;mailserver
|
||||
(reg-root-key-sub :mailserver/current-id :mailserver/current-id)
|
||||
@@ -1336,7 +1335,7 @@
|
||||
(fn [[{:keys [processing]} sending-image mainnet? one-to-one-chat? {:keys [public?]} reply edit]]
|
||||
(let [sending-image (seq sending-image)]
|
||||
{:send (not processing)
|
||||
:stickers (and mainnet?
|
||||
:stickers (and (or config/stickers-test-enabled? mainnet?)
|
||||
(not sending-image)
|
||||
(not reply))
|
||||
:image (and (not reply)
|
||||
@@ -1515,23 +1514,20 @@
|
||||
;;STICKERS =============================================================================================================
|
||||
|
||||
(re-frame/reg-sub
|
||||
:stickers/installed-packs-vals
|
||||
:<- [:stickers/installed-packs]
|
||||
:stickers/installed-packs
|
||||
:<- [:stickers/packs]
|
||||
(fn [packs]
|
||||
(vals packs)))
|
||||
(filter #(= (:status %) constants/sticker-pack-status-installed) (vals packs))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:stickers/all-packs
|
||||
:<- [:stickers/packs]
|
||||
:<- [:stickers/installed-packs]
|
||||
:<- [:stickers/packs-owned]
|
||||
:<- [:stickers/packs-pending]
|
||||
(fn [[packs installed owned pending]]
|
||||
(map (fn [{:keys [id] :as pack}]
|
||||
(cond-> pack
|
||||
(get installed id) (assoc :installed true)
|
||||
(get owned id) (assoc :owned true)
|
||||
(get pending id) (assoc :pending true)))
|
||||
(fn [packs]
|
||||
(map (fn [{:keys [status] :as pack}]
|
||||
(-> pack
|
||||
(assoc :installed (= status constants/sticker-pack-status-installed))
|
||||
(assoc :pending (= status constants/sticker-pack-status-pending))
|
||||
(assoc :owned (= status constants/sticker-pack-status-owned))))
|
||||
(vals packs))))
|
||||
|
||||
(re-frame/reg-sub
|
||||
@@ -1541,19 +1537,6 @@
|
||||
(fn [[{:keys [id]} packs]]
|
||||
(first (filter #(= (:id %) id) packs))))
|
||||
|
||||
(defn find-pack-id-for-hash [sticker-uri packs]
|
||||
(some (fn [{:keys [stickers id]}]
|
||||
(when (some #(= sticker-uri (:hash %)) stickers)
|
||||
id))
|
||||
packs))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:stickers/recent
|
||||
:<- [:multiaccount]
|
||||
:<- [:stickers/installed-packs-vals]
|
||||
(fn [[{:keys [:stickers/recent-stickers]} packs]]
|
||||
(map (fn [hash] {:hash hash :pack (find-pack-id-for-hash hash packs)}) recent-stickers)))
|
||||
|
||||
;;HOME ==============================================================================================================
|
||||
|
||||
(def memo-home-items (atom nil))
|
||||
@@ -2964,3 +2947,19 @@
|
||||
:<- [:bookmarks]
|
||||
(fn [bookmarks]
|
||||
(into {} (remove #(:removed (second %)) bookmarks))))
|
||||
|
||||
;; NAVIGATION2
|
||||
|
||||
|
||||
(re-frame/reg-sub
|
||||
:navigation2/switcher-cards
|
||||
:<- [:navigation2/navigation2-stacks]
|
||||
(fn [stacks [_ toggle-switcher-screen]]
|
||||
(sort-by :clock >
|
||||
(reduce (fn [acc stack-vector]
|
||||
(let [{:keys [type clock id]} (get stack-vector 1)]
|
||||
(conj acc {:type type
|
||||
:clock clock
|
||||
:id id
|
||||
:toggle-switcher-screen toggle-switcher-screen})))
|
||||
'() stacks))))
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
(ns status-im.switcher.animation
|
||||
(:require [quo.react-native :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.switcher.constants :as constants]
|
||||
[status-im.ui.components.animation :as anim]))
|
||||
|
||||
(def bottom-tabs-opacity (anim/create-value 1))
|
||||
(def bottom-tabs-position (anim/create-value 0))
|
||||
|
||||
;; TODO(parvesh): Use 300, after using dispatch-later for opening card(otherwise pending animation issue)
|
||||
;; or OnAnimationEnd
|
||||
(def layout-animation #js {:duration 250
|
||||
:create #js {:type (:ease-in-ease-out rn/layout-animation-types)
|
||||
:property (:scale-xy rn/layout-animation-properties)}
|
||||
:update #js {:type (:ease-in-ease-out rn/layout-animation-types)
|
||||
:property (:scale-xy rn/layout-animation-properties)}
|
||||
:delete #js {:type (:ease-in-ease-out rn/layout-animation-types)
|
||||
:property (:scale-xy rn/layout-animation-properties)}})
|
||||
|
||||
(defn animate-layout [show? anim-values]
|
||||
(let [{:keys [width height]} (constants/dimensions)
|
||||
target-radius (- (max width height)
|
||||
constants/switcher-button-radius)]
|
||||
(rn/configure-next layout-animation)
|
||||
(reset! (:switcher-screen-radius anim-values) (if show? target-radius 1))
|
||||
(reagent/flush)))
|
||||
|
||||
(defn timing-animation [property toValue]
|
||||
(anim/timing property {:toValue toValue
|
||||
:duration 300
|
||||
:useNativeDriver true}))
|
||||
|
||||
(defn animate-components [show? view-id anim-values]
|
||||
(anim/start
|
||||
(anim/parallel
|
||||
(into
|
||||
[(timing-animation (:switcher-button-opacity anim-values) (if show? 0 1))
|
||||
(timing-animation (:switcher-close-button-icon-opacity anim-values) (if show? 1 0))
|
||||
(timing-animation (:switcher-close-button-background-opacity anim-values) (if show? 0.2 0))]
|
||||
(when (= view-id :home-stack)
|
||||
[(timing-animation bottom-tabs-opacity (if show? 0 1))
|
||||
(timing-animation bottom-tabs-position (if show? (constants/bottom-tabs-height) 0))])))))
|
||||
|
||||
(defn animate [show? view-id anim-values]
|
||||
(reagent/flush)
|
||||
(animate-layout show? anim-values)
|
||||
(animate-components show? view-id anim-values))
|
||||
@@ -0,0 +1,30 @@
|
||||
(ns status-im.switcher.bottom-tabs
|
||||
(:require [quo.react-native :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.switcher.styles :as styles]
|
||||
[status-im.ui.components.icons.icons :as icons]))
|
||||
|
||||
(def selected-tab-id (reagent/atom :chats-stack))
|
||||
|
||||
(defn bottom-tab-pressed [tab-id]
|
||||
(when-not (= tab-id @selected-tab-id)
|
||||
(reset! selected-tab-id tab-id)))
|
||||
|
||||
;; TODO(parvesh) - reimplement tab with counter, once design is complete
|
||||
;; (implement natively, for performance improvement)
|
||||
(defn bottom-tab [icon tab-id]
|
||||
[rn/touchable-opacity {:style {:padding 15}
|
||||
:active-opacity 1
|
||||
:on-press #(bottom-tab-pressed tab-id)}
|
||||
[icons/icon icon (styles/bottom-tab-icon
|
||||
(if (= tab-id @selected-tab-id)
|
||||
:bottom-tabs-selected-tab
|
||||
:bottom-tabs-non-selected-tab))]])
|
||||
|
||||
(defn bottom-tabs []
|
||||
[rn/animated-view {:style (styles/bottom-tabs)}
|
||||
[bottom-tab :main-icons/redesign-messages :chats-stack]
|
||||
[bottom-tab :main-icons/communities :communities-stack]
|
||||
[rn/view {:width 10}]
|
||||
[bottom-tab :main-icons/redesign-wallet :wallet-stack]
|
||||
[bottom-tab :main-icons/browser :browser-stack]])
|
||||
@@ -0,0 +1,30 @@
|
||||
(ns status-im.switcher.cards.messaging-card
|
||||
(:require [quo.react-native :as rn]
|
||||
[quo2.components.text :as text]
|
||||
[status-im.constants :as constants]
|
||||
[quo2.components.button :as button]
|
||||
[status-im.utils.handlers :refer [>evt <sub]]
|
||||
[status-im.switcher.cards.styles :as styles]))
|
||||
|
||||
(defn on-press [id toggle-switcher-screen]
|
||||
(toggle-switcher-screen)
|
||||
(>evt [:chat.ui/navigate-to-chat-nav2 id true]))
|
||||
|
||||
;; TODO - add last message for other content types
|
||||
(defn last-message [{:keys [content content-type]}]
|
||||
(cond
|
||||
(= constants/content-type-text content-type)
|
||||
[text/text (styles/messaging-card-last-message-text-props) (:text content)]))
|
||||
|
||||
(defn card [{:keys [id toggle-switcher-screen]}]
|
||||
(let [chat (<sub [:chats/chat id])]
|
||||
[rn/touchable-without-feedback {:on-press #(on-press id toggle-switcher-screen)}
|
||||
[rn/view {:style (styles/messaging-card-main-container)}
|
||||
[rn/view {:style (styles/messaging-card-secondary-container)}
|
||||
[text/text (styles/messaging-card-title-props) (:alias chat)]
|
||||
[text/text (styles/messaging-card-subtitle-props) "Message"]
|
||||
[rn/view {:style (styles/messaging-card-details-container)}
|
||||
[last-message (:last-message chat)]]]
|
||||
[rn/view {:style (styles/messaging-card-avatar-container)}]
|
||||
[button/button (styles/messaging-card-close-button-props) :main-icons/close]]]))
|
||||
|
||||
@@ -0,0 +1,103 @@
|
||||
(ns status-im.switcher.cards.styles
|
||||
(:require [quo.theme :as theme]
|
||||
[quo2.foundations.colors :as colors]))
|
||||
|
||||
(def themes
|
||||
{:light {:messaging-card-container-background-color "#26A69A"
|
||||
:messaging-card-secondary-container-background-color colors/white
|
||||
:messaging-card-title-color colors/black
|
||||
:messaging-card-subtitle-color colors/neutral-50
|
||||
:messaging-card-last-message-text-color colors/black
|
||||
:messaging-card-close-button-bg-color colors/white-opa-50
|
||||
:messaging-card-close-button-icon-color colors/black}
|
||||
:dark {:messaging-card-container-background-color "#26A69A"
|
||||
:messaging-card-secondary-container-background-color colors/neutral-90
|
||||
:messaging-card-title-color colors/white
|
||||
:messaging-card-subtitle-color colors/neutral-40
|
||||
:messaging-card-last-message-text-color colors/white
|
||||
:messaging-card-close-button-bg-color colors/neutral-80-opa-60
|
||||
:messaging-card-close-button-icon-color colors/white}})
|
||||
|
||||
(defn get-color [key]
|
||||
(get-in themes [(theme/get-theme) key]))
|
||||
|
||||
;; Messaging Card
|
||||
|
||||
(defn messaging-card-main-container []
|
||||
{:width 160
|
||||
:height 172
|
||||
:border-radius 16
|
||||
:margin 8
|
||||
:background-color (get-color :messaging-card-container-background-color)})
|
||||
|
||||
(defn messaging-card-secondary-container []
|
||||
{:width 160
|
||||
:height 132
|
||||
:background-color (get-color :messaging-card-secondary-container-background-color)
|
||||
:border-radius 16
|
||||
:position :absolute
|
||||
:bottom 0})
|
||||
|
||||
(defn messaging-card-title []
|
||||
{:position :absolute
|
||||
:top 32
|
||||
:margin-horizontal 12
|
||||
:color (get-color :messaging-card-title-color)})
|
||||
|
||||
(defn messaging-card-title-props []
|
||||
{:size :paragraph-1
|
||||
:weight :semi-bold
|
||||
:number-of-lines 1
|
||||
:ellipsize-mode :tail
|
||||
:style (messaging-card-title)})
|
||||
|
||||
(defn messaging-card-subtitle []
|
||||
{:position :absolute
|
||||
:top 54
|
||||
:margin-horizontal 12
|
||||
:color (get-color :messaging-card-subtitle-color)})
|
||||
|
||||
(defn messaging-card-subtitle-props []
|
||||
{:size :paragraph-2
|
||||
:weight :medium
|
||||
:style (messaging-card-subtitle)})
|
||||
|
||||
(defn messaging-card-details-container []
|
||||
{:position :absolute
|
||||
:bottom 12
|
||||
:margin-horizontal 12
|
||||
:width 136
|
||||
:height 36})
|
||||
|
||||
(defn messaging-card-last-message-text []
|
||||
{:color (get-color :messaging-card-last-message-text-color)})
|
||||
|
||||
(defn messaging-card-last-message-text-props []
|
||||
{:size :paragraph-2
|
||||
:weight :regular
|
||||
:number-of-lines 2
|
||||
:ellipsize-mode :tail
|
||||
:style (messaging-card-last-message-text)})
|
||||
|
||||
(defn messaging-card-close-button []
|
||||
{:position :absolute
|
||||
:right 8
|
||||
:top 8
|
||||
:background-color (get-color :messaging-card-close-button-bg-color)
|
||||
:icon-color (get-color :messaging-card-icon-color)})
|
||||
|
||||
(defn messaging-card-close-button-props []
|
||||
{:size 24
|
||||
:type :grey
|
||||
:icon true
|
||||
:on-press #(print "close pressed")
|
||||
:style (messaging-card-close-button)})
|
||||
|
||||
(defn messaging-card-avatar-container []
|
||||
{:width 48
|
||||
:height 48
|
||||
:border-radius 24
|
||||
:position :absolute
|
||||
:left 12
|
||||
:top 16
|
||||
:background-color :pink})
|
||||
@@ -0,0 +1,32 @@
|
||||
(ns status-im.switcher.constants
|
||||
(:require [status-im.utils.handlers :refer [<sub]]
|
||||
[status-im.utils.platform :as platform]))
|
||||
|
||||
(def switcher-button-radius 24)
|
||||
|
||||
(def switcher-button-size
|
||||
(* switcher-button-radius 2))
|
||||
|
||||
(def switcher-bottom-positions
|
||||
{:android
|
||||
{:home-stack 17
|
||||
:chat 57}
|
||||
:ios
|
||||
{:home-stack 35
|
||||
:chat 67}})
|
||||
|
||||
(defn switcher-bottom-position [view-id]
|
||||
(get-in
|
||||
switcher-bottom-positions
|
||||
[(keyword platform/os) view-id]))
|
||||
|
||||
(defn switcher-center-position [view-id]
|
||||
(+ (switcher-bottom-position view-id) (/ switcher-button-size 2)))
|
||||
|
||||
;; TODO(parvesh) - use different height for android and ios(Confirm from Design)
|
||||
(defn bottom-tabs-height []
|
||||
(if platform/android? 55 80))
|
||||
|
||||
;; TODO - move to switcher/utils.cljs
|
||||
(defn dimensions []
|
||||
(<sub [:dimensions/window]))
|
||||
@@ -0,0 +1,97 @@
|
||||
(ns status-im.switcher.styles
|
||||
(:require [quo.theme :as theme]
|
||||
[quo2.foundations.colors :as colors]
|
||||
[status-im.switcher.constants :as constants]
|
||||
[status-im.switcher.animation :as animation]))
|
||||
|
||||
(def themes
|
||||
{:light {:bottom-tabs-bg-color colors/neutral-80
|
||||
:bottom-tabs-on-scroll-bg-color colors/neutral-80-opa-80
|
||||
:bottom-tabs-non-selected-tab colors/neutral-50
|
||||
:bottom-tabs-selected-tab colors/white}
|
||||
:dark {:bottom-tabs-bg-color colors/neutral-80
|
||||
:bottom-tabs-on-scroll-bg-color colors/neutral-80-opa-60
|
||||
:bottom-tabs-non-selected-tab colors/neutral-40
|
||||
:bottom-tabs-selected-tab colors/white}})
|
||||
|
||||
(defn get-color [key]
|
||||
(get-in themes [(theme/get-theme) key]))
|
||||
|
||||
;; Bottom Tabs
|
||||
(defn bottom-tab-icon [tab-state]
|
||||
{:width 20
|
||||
:height 20
|
||||
:color (get-color tab-state)})
|
||||
|
||||
(defn bottom-tabs []
|
||||
{:background-color (get-color :bottom-tabs-bg-color)
|
||||
:flex-direction :row
|
||||
:flex 1
|
||||
:align-items :center
|
||||
:justify-content :space-around
|
||||
:height (constants/bottom-tabs-height)
|
||||
:position :absolute
|
||||
:bottom 0
|
||||
:right 0
|
||||
:left 0
|
||||
:opacity animation/bottom-tabs-opacity
|
||||
:transform [{:translateY animation/bottom-tabs-position}]})
|
||||
|
||||
;; Switcher
|
||||
(defn switcher-button [opacity]
|
||||
{:width constants/switcher-button-size
|
||||
:height constants/switcher-button-size
|
||||
:opacity opacity})
|
||||
|
||||
(defn merge-switcher-button-common-styles [style]
|
||||
(merge
|
||||
{:width constants/switcher-button-size
|
||||
:height constants/switcher-button-size
|
||||
:border-radius constants/switcher-button-radius
|
||||
:position :absolute
|
||||
:bottom 0
|
||||
:z-index 3
|
||||
:align-items :center
|
||||
:align-self :center
|
||||
:justify-content :center}
|
||||
style))
|
||||
|
||||
(defn switcher-button-touchable [view-id]
|
||||
(merge-switcher-button-common-styles
|
||||
{:align-self :center
|
||||
:bottom (constants/switcher-bottom-position view-id)}))
|
||||
|
||||
(defn switcher-close-button-background [opacity]
|
||||
(merge-switcher-button-common-styles
|
||||
{:background-color colors/switcher-background
|
||||
:opacity opacity}))
|
||||
|
||||
(defn switcher-close-button-icon [opacity]
|
||||
(merge-switcher-button-common-styles
|
||||
{:opacity opacity}))
|
||||
|
||||
(defn switcher-screen [view-id radius]
|
||||
(let [bottom (- (constants/switcher-center-position view-id) radius)
|
||||
size (* 2 radius)]
|
||||
(merge-switcher-button-common-styles
|
||||
{:background-color colors/switcher-background-opa-80
|
||||
:bottom bottom
|
||||
:border-radius 1000
|
||||
:width size
|
||||
:overflow :hidden
|
||||
:height size})))
|
||||
|
||||
(defn switcher-screen-container [view-id radius]
|
||||
(let [radius radius
|
||||
bottom (- radius (constants/switcher-center-position view-id))
|
||||
{:keys [width height]} (constants/dimensions)]
|
||||
{:position :absolute
|
||||
:align-self :center
|
||||
:bottom bottom
|
||||
:width width
|
||||
:height (- height 25)
|
||||
:align-items :center}))
|
||||
|
||||
(defn switcher-switch-screen []
|
||||
{:margin-top 40
|
||||
:align-items :center})
|
||||
@@ -0,0 +1,44 @@
|
||||
(ns status-im.switcher.switcher
|
||||
(:require [quo.react-native :as rn]
|
||||
[reagent.core :as reagent]
|
||||
[status-im.switcher.styles :as styles]
|
||||
[status-im.ui.components.animation :as anim]
|
||||
[status-im.switcher.animation :as animation]
|
||||
[status-im.ui.components.icons.icons :as icons]
|
||||
[status-im.react-native.resources :as resources]
|
||||
[status-im.switcher.switcher-container :as switcher-container]))
|
||||
|
||||
(defn toggle-switcher-screen [switcher-opened? view-id anim-values]
|
||||
(swap! switcher-opened? not)
|
||||
(animation/animate @switcher-opened? view-id anim-values))
|
||||
|
||||
(defn switcher-button [switcher-opened? view-id anim-values]
|
||||
[rn/touchable-opacity {:active-opacity 1
|
||||
:on-press #(toggle-switcher-screen switcher-opened? view-id anim-values)
|
||||
:style (styles/switcher-button-touchable view-id)}
|
||||
[rn/animated-view {:style (styles/switcher-close-button-background
|
||||
(:switcher-close-button-background-opacity anim-values))}]
|
||||
[rn/animated-view {:style (styles/switcher-close-button-icon
|
||||
(:switcher-close-button-icon-opacity anim-values))}
|
||||
[icons/icon :main-icons/close {:color :white}]]
|
||||
[rn/animated-image-view {:source (resources/get-image :status-logo)
|
||||
:style (styles/switcher-button
|
||||
(:switcher-button-opacity anim-values))}]])
|
||||
|
||||
(defn switcher-screen [switcher-opened? view-id anim-values]
|
||||
[rn/view {:style (styles/switcher-screen
|
||||
view-id @(:switcher-screen-radius anim-values))
|
||||
:pointer-events (if switcher-opened? :auto :none)}
|
||||
[switcher-container/container
|
||||
view-id @(:switcher-screen-radius anim-values)
|
||||
#(toggle-switcher-screen switcher-opened? view-id anim-values)]])
|
||||
|
||||
(defn switcher [view-id]
|
||||
(let [switcher-opened? (reagent/atom false)
|
||||
anim-values {:switcher-button-opacity (anim/create-value 1)
|
||||
:switcher-close-button-icon-opacity (anim/create-value 0)
|
||||
:switcher-close-button-background-opacity (anim/create-value 0)
|
||||
:switcher-screen-radius (reagent/atom 1)}]
|
||||
[:<>
|
||||
[switcher-screen switcher-opened? view-id anim-values]
|
||||
[switcher-button switcher-opened? view-id anim-values]]))
|
||||
@@ -0,0 +1,34 @@
|
||||
(ns status-im.switcher.switcher-container
|
||||
(:require [quo.react-native :as rn]
|
||||
status-im.switcher.cards.messaging-card
|
||||
[status-im.switcher.styles :as styles]
|
||||
[status-im.utils.handlers :refer [<sub]]
|
||||
[status-im.switcher.cards.messaging-card :as messaging-card]))
|
||||
|
||||
;; TODO - use something like this to avoid multiple renders etc.
|
||||
;; (defn switch-screen [toggle-switcher-screen]
|
||||
;; (let [cards (<sub [:navigation2/switcher-cards])
|
||||
;; new-cards (reduce (fn [acc card]
|
||||
;; (conj acc (assoc card :toggle-switcher-screen toggle-switcher-screen)))
|
||||
;; () cards)]
|
||||
;; (fn []
|
||||
;; [rn/view {:style (styles/switcher-switch-screen)}
|
||||
;; [rn/flat-list {:width 352
|
||||
;; :data new-cards
|
||||
;; :render-fn messaging-card/card
|
||||
;; :num-columns 2
|
||||
;; :key-fn str}]])))
|
||||
|
||||
(defn switch-screen [toggle-switcher-screen]
|
||||
(let [cards (<sub [:navigation2/switcher-cards toggle-switcher-screen])]
|
||||
[rn/view {:style (styles/switcher-switch-screen)}
|
||||
[rn/flat-list {:width 352
|
||||
:data cards
|
||||
:render-fn messaging-card/card
|
||||
:num-columns 2
|
||||
:key-fn str}]]))
|
||||
|
||||
(defn container [view-id switcher-screen-radius toggle-switcher-screen]
|
||||
[rn/view {:style (styles/switcher-screen-container
|
||||
view-id switcher-screen-radius)}
|
||||
[switch-screen toggle-switcher-screen]])
|
||||
@@ -0,0 +1,6 @@
|
||||
(ns status-im.switcher.utils
|
||||
(:require [re-frame.core :as re-frame]))
|
||||
|
||||
(def switcher-container-view-id (atom nil))
|
||||
|
||||
(re-frame/reg-fx :switcher-container-view-id #(reset! switcher-container-view-id %))
|
||||
@@ -2,35 +2,22 @@
|
||||
status-im.transport.core
|
||||
(:require [re-frame.core :as re-frame]
|
||||
[status-im.ethereum.json-rpc :as json-rpc]
|
||||
[status-im.native-module.core :as status]
|
||||
[status-im.pairing.core :as pairing]
|
||||
[status-im.utils.fx :as fx]
|
||||
[status-im.utils.handlers :as handlers]
|
||||
status-im.transport.shh
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.utils.universal-links.core :as universal-links]))
|
||||
[status-im.utils.universal-links.core :as universal-links]
|
||||
[status-im.stickers.core :as stickers]))
|
||||
|
||||
(fx/defn set-node-info
|
||||
{:events [:transport.callback/node-info-fetched]}
|
||||
[{:keys [db]} node-info]
|
||||
{:db (assoc db :node-info node-info)})
|
||||
|
||||
(defn fetch-node-info []
|
||||
(let [args {:jsonrpc "2.0"
|
||||
:id 2
|
||||
:method "admin_nodeInfo"}
|
||||
payload (.stringify js/JSON (clj->js args))]
|
||||
(status/call-private-rpc payload
|
||||
(handlers/response-handler #(re-frame/dispatch [:transport.callback/node-info-fetched %])
|
||||
#(log/error "node-info: failed error" %)))))
|
||||
|
||||
(re-frame/reg-fx
|
||||
::fetch-node-info
|
||||
(fn []
|
||||
(fetch-node-info)))
|
||||
|
||||
(fx/defn fetch-node-info-fx [cofx]
|
||||
{::fetch-node-info []})
|
||||
(fx/defn fetch-node-info-fx [_]
|
||||
{::json-rpc/call [{:method "admin_nodeInfo"
|
||||
:on-success #(re-frame/dispatch [:transport.callback/node-info-fetched %])
|
||||
:on-error #(log/error "node-info: failed error" %)}]})
|
||||
|
||||
(defn add-mailservers
|
||||
[db mailservers]
|
||||
@@ -51,7 +38,7 @@
|
||||
initializiation is completed, otherwise we might receive messages/topics
|
||||
when the state has not been properly initialized."
|
||||
[_]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "startMessenger")
|
||||
{::json-rpc/call [{:method "wakuext_startMessenger"
|
||||
:on-success #(re-frame/dispatch [::messenger-started %])
|
||||
:on-failure #(log/error "failed to start messenger")}]})
|
||||
|
||||
@@ -65,4 +52,5 @@
|
||||
(add-mailservers mailservers))}
|
||||
(fetch-node-info-fx)
|
||||
(pairing/init)
|
||||
(stickers/load-packs)
|
||||
(universal-links/process-stored-event)))
|
||||
|
||||
@@ -27,23 +27,21 @@
|
||||
:contentType content-type})
|
||||
|
||||
(fx/defn send-chat-messages [_ messages]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method "sendChatMessages")
|
||||
{::json-rpc/call [{:method "wakuext_sendChatMessages"
|
||||
:params [(mapv build-message messages)]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:transport/message-sent %])
|
||||
:on-failure #(log/error "failed to send a message" %)}]})
|
||||
|
||||
(fx/defn send-reaction [_ {:keys [message-id chat-id emoji-id]}]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method
|
||||
"sendEmojiReaction")
|
||||
{::json-rpc/call [{:method "wakuext_sendEmojiReaction"
|
||||
:params [chat-id message-id emoji-id]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||
:on-failure #(log/error "failed to send a reaction" %)}]})
|
||||
|
||||
(fx/defn send-retract-reaction [_ {:keys [emoji-reaction-id] :as reaction}]
|
||||
{::json-rpc/call [{:method (json-rpc/call-ext-method
|
||||
"sendEmojiReactionRetraction")
|
||||
(fx/defn send-retract-reaction [_ {:keys [emoji-reaction-id]}]
|
||||
{::json-rpc/call [{:method "wakuext_sendEmojiReactionRetraction"
|
||||
:params [emoji-reaction-id]
|
||||
:js-response true
|
||||
:on-success #(re-frame/dispatch [:sanitize-messages-and-process-response %])
|
||||
|
||||
@@ -254,58 +254,59 @@
|
||||
:auto-correct false}])
|
||||
|
||||
(defn new-contact []
|
||||
(let [{:keys [state ens-name public-key error]} @(re-frame/subscribe [:contacts/new-identity])
|
||||
entered-nickname (reagent/atom "")
|
||||
blocked? (and
|
||||
(utils.db/valid-public-key? (or public-key ""))
|
||||
@(re-frame/subscribe [:contacts/contact-blocked? public-key]))]
|
||||
[react/view {:style {:flex 1}}
|
||||
[topbar/topbar
|
||||
{:title (i18n/label :t/new-contact)
|
||||
:modal? true
|
||||
:right-accessories
|
||||
[{:icon :qr
|
||||
:accessibility-label :scan-contact-code-button
|
||||
:on-press #(re-frame/dispatch [::qr-scanner/scan-code
|
||||
{:title (i18n/label :t/new-contact)
|
||||
:handler :contact/qr-code-scanned
|
||||
:new-contact? true}])}]}]
|
||||
[react/view {:flex-direction :row
|
||||
:padding 16}
|
||||
[react/view {:flex 1
|
||||
:padding-right 16}
|
||||
[quo/text-input
|
||||
{:on-change-text
|
||||
#(do
|
||||
(re-frame/dispatch [:set-in [:contacts/new-identity :state] :searching])
|
||||
(debounce/debounce-and-dispatch [:new-chat/set-new-identity %] 600))
|
||||
:on-submit-editing
|
||||
#(when (= state :valid)
|
||||
(debounce/dispatch-and-chill [:contact.ui/contact-code-submitted true @entered-nickname] 3000))
|
||||
:placeholder (i18n/label :t/enter-contact-code)
|
||||
:show-cancel false
|
||||
:accessibility-label :enter-contact-code-input
|
||||
:auto-capitalize :none
|
||||
:return-key-type :go}]]
|
||||
[react/view {:justify-content :center
|
||||
:align-items :center}
|
||||
[input-icon state true @entered-nickname blocked?]]]
|
||||
[react/view {:min-height 30 :justify-content :flex-end :margin-bottom 16}
|
||||
[quo/text {:style {:margin-horizontal 16}
|
||||
:size :small
|
||||
:align :center
|
||||
:color :secondary}
|
||||
(cond (= state :error)
|
||||
(get-validation-label error)
|
||||
(= state :valid)
|
||||
(str (when ens-name (str ens-name " • "))
|
||||
(utils/get-shortened-address public-key))
|
||||
:else "")]]
|
||||
[react/text {:style {:margin-horizontal 16 :color colors/gray}}
|
||||
(i18n/label :t/nickname-description)]
|
||||
[react/view {:padding 16}
|
||||
|
||||
[nickname-input entered-nickname]
|
||||
[react/text {:style {:align-self :flex-end :margin-top 16
|
||||
:color colors/gray}}
|
||||
(str (count @entered-nickname) " / 32")]]]))
|
||||
(let [entered-nickname (reagent/atom "")]
|
||||
(fn []
|
||||
(let [{:keys [state ens-name public-key error]} @(re-frame/subscribe [:contacts/new-identity])
|
||||
blocked? (and
|
||||
(utils.db/valid-public-key? (or public-key ""))
|
||||
@(re-frame/subscribe [:contacts/contact-blocked? public-key]))]
|
||||
[react/view {:style {:flex 1}}
|
||||
[topbar/topbar
|
||||
{:title (i18n/label :t/new-contact)
|
||||
:modal? true
|
||||
:right-accessories
|
||||
[{:icon :qr
|
||||
:accessibility-label :scan-contact-code-button
|
||||
:on-press #(re-frame/dispatch [::qr-scanner/scan-code
|
||||
{:title (i18n/label :t/new-contact)
|
||||
:handler :contact/qr-code-scanned
|
||||
:new-contact? true
|
||||
:nickname @entered-nickname}])}]}]
|
||||
[react/view {:flex-direction :row
|
||||
:padding 16}
|
||||
[react/view {:flex 1
|
||||
:padding-right 16}
|
||||
[quo/text-input
|
||||
{:on-change-text
|
||||
#(do
|
||||
(re-frame/dispatch [:set-in [:contacts/new-identity :state] :searching])
|
||||
(debounce/debounce-and-dispatch [:new-chat/set-new-identity %] 600))
|
||||
:on-submit-editing
|
||||
#(when (= state :valid)
|
||||
(debounce/dispatch-and-chill [:contact.ui/contact-code-submitted true @entered-nickname] 3000))
|
||||
:placeholder (i18n/label :t/enter-contact-code)
|
||||
:show-cancel false
|
||||
:accessibility-label :enter-contact-code-input
|
||||
:auto-capitalize :none
|
||||
:return-key-type :go}]]
|
||||
[react/view {:justify-content :center
|
||||
:align-items :center}
|
||||
[input-icon state true @entered-nickname blocked?]]]
|
||||
[react/view {:min-height 30 :justify-content :flex-end :margin-bottom 16}
|
||||
[quo/text {:style {:margin-horizontal 16}
|
||||
:size :small
|
||||
:align :center
|
||||
:color :secondary}
|
||||
(cond (= state :error)
|
||||
(get-validation-label error)
|
||||
(= state :valid)
|
||||
(str (when ens-name (str ens-name " • "))
|
||||
(utils/get-shortened-address public-key))
|
||||
:else "")]]
|
||||
[react/text {:style {:margin-horizontal 16 :color colors/gray}}
|
||||
(i18n/label :t/nickname-description)]
|
||||
[react/view {:padding 16}
|
||||
[nickname-input entered-nickname]
|
||||
[react/text {:style {:align-self :flex-end :margin-top 16
|
||||
:color colors/gray}}
|
||||
(str (count @entered-nickname) " / 32")]]]))))
|
||||
|
||||