Skip to content

Commit 16a1dcb

Browse files
committed
Merge remote-tracking branch 'origin/master' into feature/trading_perpetual
2 parents fc65603 + ef9b979 commit 16a1dcb

File tree

9 files changed

+58
-73
lines changed

9 files changed

+58
-73
lines changed

.github/workflows/android.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,19 @@ jobs:
1717
runs-on: ubuntu-latest
1818

1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: set up JDK 17
22-
uses: actions/setup-java@v3
22+
uses: actions/setup-java@v4
2323
with:
2424
java-version: 17
25-
distribution: 'adopt'
25+
distribution: 'temurin'
2626
- name: Make Gradle executable
2727
run: chmod +x ./gradlew
2828

29-
- name: Create google-service.json file
30-
run: cat /home/runner/work/android-app/android-app/app/src/debug/google-services.json | base64
3129
- name: Set google-service.json data
3230
env:
3331
DATA: ${{ secrets.GOOGLE_SERVICES_JSON }}
34-
run: echo $DATA > /home/runner/work/android-app/android-app/app/src/debug/google-services.json
32+
run: echo "$DATA" > app/src/debug/google-services.json
3533

3634
- name: Build
3735
run: ./gradlew clean assembleDebug --stacktrace

app/build.gradle

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
plugins {
22
id 'com.android.application'
3-
id 'kotlin-android'
4-
id 'org.jetbrains.kotlin.android'
53
id 'dagger.hilt.android.plugin'
64
id 'kotlin-parcelize'
75
id 'de.undercouch.download'
86
id "com.google.devtools.ksp"
97
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
108
id 'kotlinx-serialization'
11-
id "com.google.protobuf" version "0.9.1"
129
id "org.jetbrains.kotlin.plugin.compose" version "${kotlinVersion}"
1310
id 'com.google.firebase.firebase-perf'
1411
id 'com.bugsnag.android.gradle'
@@ -17,7 +14,7 @@ plugins {
1714

1815
def versionMajor = 3
1916
def versionMinor = 10
20-
def versionPatch = 1
17+
def versionPatch = 2
2118
def versionBuild = 1
2219

2320
apply plugin: 'com.google.gms.google-services'
@@ -55,11 +52,6 @@ android {
5552
}
5653
}
5754

58-
kotlinOptions {
59-
jvmTarget = '17'
60-
freeCompilerArgs += ['-opt-in=kotlin.contracts.ExperimentalContracts']
61-
}
62-
6355
lintOptions{
6456
disable "ObjectAnimatorBinding", "AnimatorKeep"
6557
disable 'MissingTranslation'

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838
<uses-permission android:name="android.permission.READ_MEDIA_VISUAL_USER_SELECTED" />
3939
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_REMOTE_MESSAGING" />
4040
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove" />
41-
<uses-sdk
42-
android:minSdkVersion="24"
43-
tools:overrideLibrary="com.google.mlkit.nl.entityextraction" />
4441

4542
<application
4643
android:name=".MixinApp"
@@ -194,7 +191,6 @@
194191

195192
<activity-alias
196193
android:name="one.mixin.messenger.ShareActivity"
197-
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
198194
android:excludeFromRecents="true"
199195
android:exported="true"
200196
android:targetActivity=".ui.forward.ForwardActivity">

app/src/main/java/one/mixin/android/extension/ArrayExtension.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package one.mixin.android.extension
22

3+
import kotlin.contracts.ExperimentalContracts
34
import kotlin.contracts.contract
45

6+
@OptIn(ExperimentalContracts::class)
57
fun ByteArray?.isNullOrEmpty(): Boolean {
68
contract {
79
returns(false) implies (this@isNullOrEmpty != null)

app/src/main/java/one/mixin/android/ui/wallet/WalletFragment.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import kotlinx.coroutines.withContext
2929
import one.mixin.android.Constants
3030
import one.mixin.android.R
3131
import one.mixin.android.RxBus
32-
import one.mixin.android.crypto.CryptoWalletHelper
3332
import one.mixin.android.crypto.PrivacyPreference.getPrefPinInterval
3433
import one.mixin.android.crypto.PrivacyPreference.putPrefPinInterval
3534
import one.mixin.android.databinding.FragmentWalletBinding
@@ -453,7 +452,7 @@ class WalletFragment : BaseFragment(R.layout.fragment_wallet) {
453452
}
454453
lifecycleScope.launch(Dispatchers.IO) {
455454
val wallet = walletViewModel.findWalletById(walletId)
456-
if (wallet != null && (wallet.category == WalletCategory.CLASSIC.value || CryptoWalletHelper.hasPrivateKey(requireActivity(), walletId))) {
455+
if (wallet != null) {
457456
Web3Signer.setWallet(walletId, wallet.category) { queryWalletId ->
458457
runBlocking { walletViewModel.getAddresses(queryWalletId) }
459458
}

app/src/main/java/one/mixin/android/util/debug/DebugUtil.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import one.mixin.android.BuildConfig
1313
import one.mixin.android.extension.heavyClickVibrate
1414
import one.mixin.android.util.reportEvent
1515
import timber.log.Timber
16+
import kotlin.contracts.ExperimentalContracts
1617
import kotlin.contracts.InvocationKind
1718
import kotlin.contracts.contract
1819

@@ -36,6 +37,7 @@ fun debugLongClick(
3637
}
3738
}
3839

40+
@OptIn(ExperimentalContracts::class)
3941
inline fun <T> measureTimeMillis(
4042
tag: String,
4143
block: () -> T,
@@ -49,6 +51,7 @@ inline fun <T> measureTimeMillis(
4951
return result
5052
}
5153

54+
@OptIn(ExperimentalContracts::class)
5255
inline fun <T> timeoutEarlyWarning(
5356
block: () -> T,
5457
timeout: Long = 50L,

app/src/sharedTest/java/one.mixin.android.mock/AccountMock.kt

Lines changed: 31 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,37 @@ const val MOCK_ME_USER_ID = "3B035776-963D-49ED-850C-22EC30965481"
66

77
fun mockAccount(): Account {
88
return Account(
9-
MOCK_ME_USER_ID,
10-
"94EF6A7F-52A6-4019-996F-C30C77F248A6",
11-
"user",
12-
"7000",
13-
"ME",
14-
"Mixin",
15-
"Mixin",
16-
"",
17-
"",
18-
"",
19-
"", // PinToken is AES key encrypted with RSA
20-
"",
21-
"",
22-
"2018-10-01T02:17:44.806365421Z",
23-
"",
24-
true,
25-
"",
26-
0,
27-
"EVERYBODY",
28-
"EVERYBODY",
29-
true,
30-
true,
31-
"",
32-
0.0,
33-
0.0,
34-
arrayListOf(),
35-
"",
36-
null,
37-
null,
38-
null,
9+
userId = MOCK_ME_USER_ID,
10+
sessionId = "94EF6A7F-52A6-4019-996F-C30C77F248A6",
11+
type = "user",
12+
identityNumber = "7000",
13+
relationship = "ME",
14+
fullName = "Mixin",
15+
biography = "Mixin",
16+
avatarUrl = "",
17+
phone = "",
18+
phoneVerifiedAt = "",
19+
avatarBase64 = "",
20+
pinToken = "", // PinToken is AES key encrypted with RSA
21+
codeId = "",
22+
codeUrl = "",
23+
createdAt = "2018-10-01T02:17:44.806365421Z",
24+
receiveMessageSource = "",
25+
hasPin = true,
26+
tipKeyBase64 = "",
27+
tipCounter = 0,
28+
acceptConversationSource = "EVERYBODY",
29+
acceptSearchSource = "EVERYBODY",
30+
hasEmergencyContact = true,
31+
hasSafe = true,
32+
fiatCurrency = "",
33+
transferNotificationThreshold = 0.0,
34+
transferConfirmationThreshold = 0.0,
35+
features = arrayListOf(),
36+
salt = "",
37+
membership = null,
38+
system = null,
39+
saltExportedAt = null,
3940
level = null,
4041
)
4142
}

build.gradle

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ buildscript {
33
ext {
44
ext.bitcoinVersion ='0.17'
55
ext.fragmentVersion = '1.8.9'
6-
ext.activity_version = '1.12.4'
6+
ext.activity_version = '1.13.0'
77
ext.lifecycleVersion = '2.10.0'
88
ext.appcompatVersion = '1.7.1'
9-
ext.pagingVersion = '3.4.1'
9+
ext.pagingVersion = '3.4.2'
1010
ext.coilVersion = '3.4.0'
11-
ext.collectionx = '1.5.0'
11+
ext.collectionx = '1.6.0'
1212
ext.roomVersion = '2.8.4'
1313
ext.navigationVersion = '2.9.7'
1414
ext.workManagerVersion = '2.11.1'
@@ -21,9 +21,9 @@ buildscript {
2121
ext.mdcVersion = '1.13.0'
2222
ext.exifinterfaceVersion = '1.4.2'
2323
ext.preferenceVersion = '1.2.1'
24-
ext.hiltVersion = '2.58'
24+
ext.hiltVersion = '2.59.2'
2525
ext.hiltAndroidxVersion = '1.3.0'
26-
ext.androidxVersion = '1.17.0'
26+
ext.androidxVersion = '1.18.0'
2727
ext.viewpagerVersion = '1.1.0'
2828
ext.sharetargetVersion = '1.2.0'
2929
ext.coordinatorVersion = '1.3.0'
@@ -78,7 +78,7 @@ buildscript {
7878

7979
ext.junitVersion = '4.13.2'
8080
ext.testCoreVersion = '1.7.0'
81-
ext.mockitoVersion = '5.21.0'
81+
ext.mockitoVersion = '5.23.0'
8282
ext.androidxJunitVersion = '1.3.0'
8383
ext.leakcanaryVerison = '2.14'
8484
ext.mockitoVersion = '1.10.19'
@@ -105,34 +105,34 @@ buildscript {
105105

106106
ext.bcVersion = '1.70'
107107
ext.jsonVersion = '20251224'
108-
ext.composeVersion = '1.10.4'
108+
ext.composeVersion = '1.10.5'
109109
ext.accompanistVersion = '0.36.0'
110110
ext.web3jVersion = '4.8.7-android'
111111
ext.sol4kVersion = '0.7.0'
112112

113-
ext.sumsubVersion = '1.41.1'
113+
ext.sumsubVersion = '1.41.2'
114114
ext.checkoutFramesVersion = '4.2.3'
115115
ext.checkoutSecureVersion = '3.2.6'
116116
ext.checkoutRiskVersion = '1.0.6'
117117

118118
ext.playWalletVersion = '19.5.0'
119119
ext.playPayVersion = '16.5.0'
120-
ext.datastoreVersion = '1.2.0'
120+
ext.datastoreVersion = '1.2.1'
121121
ext.protobufVersion = '3.11.0'
122122
ext.appsFlyerVersion ='6.17.3'
123123
ext.installreferrerVersion ='2.2'
124124
ext.billingVersion ='8.3.0'
125125

126126
ext.lottieComposeVersion = '6.7.1'
127-
ext.composeBomVersion = '2026.02.01'
128-
ext.activityComposeVersion = '1.12.4'
127+
ext.composeBomVersion = '2026.03.00'
128+
ext.activityComposeVersion = '1.13.0'
129129
ext.web3jCoreVersion = '4.11.0'
130130
ext.web3jCryptoVersion = '4.11.0'
131131
ext.reownBomVersion = '1.6.7'
132132
ext.kotsonVersion = '2.5.0'
133133
ext.playServicesMapsVersion = '20.0.0'
134134
ext.playServicesLocationVersion = '21.3.0'
135-
firebaseBomVersion = "34.9.0"
135+
firebaseBomVersion = "34.10.0"
136136
billingKtxVersion = "8.3.0"
137137
webpdecoderVersion = "2.7.4.16.0"
138138

@@ -162,9 +162,7 @@ buildscript {
162162
plugins {
163163
id 'com.android.application' version '9.1.0' apply false
164164
id 'com.android.library' version '9.1.0' apply false
165-
id 'org.jetbrains.kotlin.android' version "${kotlinVersion}" apply false
166-
id "org.jetbrains.kotlin.kapt" version "${kotlinVersion}" apply false
167-
id 'com.google.dagger.hilt.android' version '2.58' apply false
165+
id 'com.google.dagger.hilt.android' version '2.59.2' apply false
168166
id "org.jetbrains.kotlin.plugin.parcelize" version "${kotlinVersion}" apply false
169167
id "de.undercouch.download" version "5.5.0" apply false
170168
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin' version '2.0.1' apply false
@@ -193,9 +191,8 @@ allprojects {
193191
maven {
194192
url = "https://maven.pkg.github.com/checkout/checkout-3ds-sdk-android"
195193
credentials {
196-
username = project.properties['GITHUB_ID']
197-
password = project.properties['GITHUB_PACKAGES_TOKEN']
198-
194+
username = project.findProperty('GITHUB_ID') ?: System.getenv('GITHUB_ID') ?: ""
195+
password = project.findProperty('GITHUB_PACKAGES_TOKEN') ?: System.getenv('GITHUB_PACKAGES_TOKEN') ?: ""
199196
}
200197
}
201198

gradle.properties

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ android.r8.optimizedResourceShrinking=true
3030
android.defaults.buildfeatures.resvalues=true
3131
android.sdk.defaultTargetSdkToCompileSdkIfUnset=false
3232
android.enableAppCompileTimeRClass=false
33-
android.usesSdkInManifest.disallowed=false
3433
android.uniquePackageNames=false
3534
android.dependency.useConstraints=true
36-
android.r8.strictFullModeForKeepRules=false
37-
android.builtInKotlin=false
38-
android.newDsl=false
35+
android.r8.strictFullModeForKeepRules=false

0 commit comments

Comments
 (0)