Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: release/0.24.0 #982

Merged
merged 28 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
7e03ce7
Merge pull request #973 from tari-project/master
alexandrVakhtinTari Aug 31, 2023
93b52ee
Version update
alexandrVakhtinTari Aug 31, 2023
030763a
Hotfix
alexandrVakhtinTari Sep 21, 2023
3f345d7
Init UI
alexandrVakhtinTari Sep 24, 2023
a1f9994
Data collection
alexandrVakhtinTari Sep 24, 2023
ede2a30
Merge branch 'hotfix_2' into release/0.24.0
alexandrVakhtinTari Sep 24, 2023
61af1e6
Merge branch 'release/0.24.0' into data_collection
alexandrVakhtinTari Sep 24, 2023
1a5446d
sentry fix
alexandrVakhtinTari Sep 24, 2023
5af6c07
Merge branch 'data_collection' into chat_ui
alexandrVakhtinTari Sep 24, 2023
30c492a
sentry new server
alexandrVakhtinTari Sep 24, 2023
ecf16c4
New wallet info
alexandrVakhtinTari Sep 24, 2023
dffb7ca
more ui
alexandrVakhtinTari Sep 24, 2023
cb06ea1
feat: chat UI (#983)
alexandrVakhtinTari Sep 25, 2023
99049c8
Bitrise
alexandrVakhtinTari Oct 4, 2023
57b180e
Merge branch 'release/0.24.0' of https://github.com/tari-project/wall…
alexandrVakhtinTari Oct 4, 2023
19361fa
Lint fix
alexandrVakhtinTari Oct 4, 2023
4b0657c
Test fix
alexandrVakhtinTari Oct 4, 2023
f67bcce
Sentry fix
alexandrVakhtinTari Oct 4, 2023
36b1d78
Yat sandbox
alexandrVakhtinTari Oct 4, 2023
4db09b1
feat: passcode (#984)
alexandrVakhtinTari Oct 16, 2023
89b49dd
Rise build number
alexandrVakhtinTari Oct 18, 2023
70e74a2
Onboarding fix
alexandrVakhtinTari Oct 18, 2023
d7ebf0c
Bug Fix
alexandrVakhtinTari Oct 18, 2023
7572f6b
New proguard rules
alexandrVakhtinTari Oct 19, 2023
105b050
Added more logs
alexandrVakhtinTari Oct 19, 2023
0c5bc1a
Fixed bypassing auth, but in fact just changed to more common logic
alexandrVakhtinTari Nov 2, 2023
6e95c96
Update yat lib
alexandrVakhtinTari Nov 2, 2023
74142f9
Test fixes
alexandrVakhtinTari Nov 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,7 @@ CMakeFiles/
CMakeCache.txt

jniLibs/
libwallet/
libwallet/wallet.h
libwallet/arm64-v8a/libminotari_wallet_ffi.a
libwallet/x86_64/libminotari_wallet_ffi.a
!app/src/main/jniLibs/
75 changes: 36 additions & 39 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@ android {
defaultConfig {
applicationId "com.tari.android.wallet"
minSdkVersion 26
targetSdkVersion 33
compileSdk 33
targetSdkVersion 34
compileSdk 34
versionCode buildNumber
versionName versionNumber + "-libwallet-" + libwalletVersion
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled = true

ndk {
abiFilters = []
abiFilters.addAll(supportedABIs)
abiFilters.addAll(["arm64-v8a", "x86_64"])
}

externalNativeBuild {
cmake {
arguments "-DANDROID_STL=c++_static"
Expand Down Expand Up @@ -63,9 +64,9 @@ android {
// PRIVATE BUILD: comment (add two slashes at the start of each line) all the `sentry`
// block for private release builds support
sentry { // https://docs.sentry.io/platforms/android/#gradle-configuration
autoUpload.set(true)
uploadNativeSymbols.set(true)
includeNativeSources.set(true)
autoUpload.set(false)
uploadNativeSymbols.set(false)
includeNativeSources.set(false)
}
}
}
Expand All @@ -84,11 +85,7 @@ android {

applicationVariants.configureEach { variant ->
variant.mergedFlavor.manifestPlaceholders.dropboxApiKey = loadDropboxProps().getProperty("dropbox_key")
if (variant.buildType.name == "debug") {
variant.mergedFlavor.manifestPlaceholders.sentryPublicDSN = ""
} else {
variant.mergedFlavor.manifestPlaceholders.sentryPublicDSN = loadSecretProps().getProperty("sentry.public_dsn")
}
variant.mergedFlavor.manifestPlaceholders.sentryPublicDSN = loadSecretProps().getProperty("sentry.public_dsn")
}

externalNativeBuild {
Expand Down Expand Up @@ -201,24 +198,24 @@ Properties loadProps(fileName) {
return properties
}

//preBuild.dependsOn("downloadLibwallet")
preBuild.dependsOn("downloadLibwallet")

dependencies {
// kotlin
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
// coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3"
implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"
implementation "androidx.fragment:fragment-ktx:1.5.7"
implementation "androidx.fragment:fragment-ktx:1.6.2"
kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version"

// kotlin extensions
implementation "androidx.core:core-ktx:1.10.1"
implementation "androidx.core:core-ktx:1.12.0"
// android
implementation "androidx.appcompat:appcompat:1.6.1"
// support lib
Expand All @@ -227,30 +224,30 @@ dependencies {
// android jetpack
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
// recycler view
implementation "androidx.recyclerview:recyclerview:1.3.1-rc01"
implementation "androidx.recyclerview:recyclerview:1.3.2"
// the new view pager
implementation "androidx.viewpager2:viewpager2:1.0.0"
// for tab layout
implementation "com.google.android.material:material:1.9.0"
implementation "com.google.android.material:material:1.10.0"
// lottie
implementation 'com.airbnb.android:lottie:6.0.0'
implementation 'com.airbnb.android:lottie:6.1.0'
// Glide - image processing & caching library
implementation 'com.github.bumptech.glide:glide:4.15.1'
kapt 'com.github.bumptech.glide:compiler:4.15.1'
implementation 'com.github.bumptech.glide:glide:4.16.0'
kapt 'com.github.bumptech.glide:compiler:4.16.0'

// biometric
implementation "androidx.biometric:biometric:1.1.0"

// joda
implementation 'net.danlew:android.joda:2.12.1'
implementation 'net.danlew:android.joda:2.12.5'

// parceler
implementation "org.parceler:parceler-api:1.1.13"
kapt "org.parceler:parceler:1.1.13"

// dagger - DI
implementation 'com.google.dagger:dagger:2.45'
kapt 'com.google.dagger:dagger-compiler:2.45'
implementation 'com.google.dagger:dagger:2.48.1'
kapt 'com.google.dagger:dagger-compiler:2.48.1'

// rx
implementation "io.reactivex.rxjava2:rxandroid:2.1.1"
Expand All @@ -267,7 +264,7 @@ dependencies {
implementation "com.github.adorsys:secure-storage-android:0.0.2"

// Tor control
implementation "info.guardianproject:tor-android:0.4.7.8"
implementation "info.guardianproject:tor-android:0.4.7.14"
implementation "info.guardianproject:jtorctl:0.4.5.7"

// used to read log files
Expand All @@ -280,27 +277,27 @@ dependencies {
// Retrofit2 - Popular (2020) REST API wrapper with Java interface
implementation "com.squareup.retrofit2:retrofit:2.9.0"
implementation "com.squareup.retrofit2:converter-gson:2.9.0"
implementation "com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.10"
implementation "com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.11"

// Google services & Google drive
implementation platform('com.google.firebase:firebase-bom:31.2.3')
implementation 'com.google.firebase:firebase-crashlytics'

implementation 'com.google.android.gms:play-services-auth:20.4.1'
implementation 'com.google.http-client:google-http-client-gson:1.43.1'
implementation 'com.google.android.gms:play-services-auth:20.7.0'
implementation 'com.google.http-client:google-http-client-gson:1.43.3'
implementation('com.google.api-client:google-api-client-android:2.2.0') {
exclude group: "org.apache.httpcomponents"
}
implementation('com.google.apis:google-api-services-drive:v3-rev20221023-2.0.0') {
exclude group: "org.apache.httpcomponents"
}
// sentry - crash analytics
implementation 'io.sentry:sentry-android:6.16.0'

implementation "com.dropbox.core:dropbox-core-sdk:5.4.4"
implementation 'io.sentry:sentry-android:6.33.1'

implementation "com.github.yat-labs:yat-lib-android:0.1.42"
implementation "com.dropbox.core:dropbox-core-sdk:5.4.6"

// implementation "com.github.yat-labs:yat-lib-android:0.1.42"
implementation project(":yatlib")

// custom libraries region
// flex layout
Expand All @@ -309,31 +306,31 @@ dependencies {
implementation "io.github.everythingme:overscroll-decor-android:1.1.1"

// giphy, don"t update to 2.2.0 because of not compatible yet
implementation 'com.giphy.sdk:ui:2.3.1'
implementation 'com.giphy.sdk:ui:2.3.13'
// spring animation
implementation "androidx.dynamicanimation:dynamicanimation:1.0.0"
implementation "com.github.MasayukiSuda:EasingInterpolator:v1.3.2"

// seismic - device shake detector
implementation "com.squareup:seismic:1.0.3"

implementation "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.2.0"
implementation "net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.3.0"

implementation 'com.itextpdf:itext7-core:7.2.5'
implementation 'com.itextpdf:itext7-core:8.0.2'

implementation("org.apache.maven:maven-artifact:3.0.3")
implementation("org.apache.maven:maven-artifact:3.9.5")

// debugImplementation because LeakCanary should only run in debug builds.
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'

implementation 'com.github.vestrel00:contacts-android:0.2.4'

implementation "com.github.weliem:blessed-android:2.4.2"

// test
testImplementation "junit:junit:4.13.2"
testImplementation 'io.mockk:mockk:1.13.4'
androidTestImplementation 'io.mockk:mockk-android:1.13.4'
testImplementation 'io.mockk:mockk:1.13.8'
androidTestImplementation 'io.mockk:mockk-android:1.13.8'
androidTestImplementation "androidx.test:core:1.5.0"
androidTestImplementation "androidx.test.ext:junit:1.1.5"
androidTestImplementation "androidx.test.espresso:espresso-core:3.5.1"
Expand Down
15 changes: 14 additions & 1 deletion app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,17 @@

-keep enum com.tari.android.wallet.ui.fragment.settings.themeSelector.TariTheme { *; }

-keep enum com.tari.android.wallet.data.sharedPrefs.securityStages.WalletSecurityStage { *; }
-keep enum com.tari.android.wallet.data.sharedPrefs.securityStages.WalletSecurityStage { *; }

-keep enum com.tari.android.wallet.application.Network { *; }

-keep class com.tari.android.wallet.ui.common.gyphy.api.dto.SearchGIFResponse { *; }
-keep class com.tari.android.wallet.ui.common.gyphy.api.dto.SearchGIFsResponse { *; }
-keep class com.tari.android.wallet.ui.common.gyphy.api.dto.Data { *; }
-keep class com.tari.android.wallet.ui.common.gyphy.api.dto.Meta { *; }
-keep class com.tari.android.wallet.ui.common.gyphy.api.dto.Images { *; }
-keep class com.tari.android.wallet.ui.common.gyphy.api.dto.ImageVariant { *; }
-keep class com.tari.android.wallet.ui.common.gyphy.api.dto.Original { *; }

-keep class **Fragment** { *; }
-keep class **ViewModel** { *; }
Binary file removed app/regular/release/app-regular-release.aab
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import com.tari.android.wallet.data.sharedPrefs.SharedPrefsRepository
import com.tari.android.wallet.data.sharedPrefs.baseNode.BaseNodeSharedRepository
import com.tari.android.wallet.data.sharedPrefs.network.NetworkRepositoryImpl
import com.tari.android.wallet.data.sharedPrefs.security.SecurityPrefRepository
import com.tari.android.wallet.data.sharedPrefs.securityStages.SecurityStagesRepository
import com.tari.android.wallet.data.sharedPrefs.sentry.SentryPrefRepository
import com.tari.android.wallet.data.sharedPrefs.tariSettings.TariSettingsSharedRepository
import com.tari.android.wallet.data.sharedPrefs.tor.TorSharedRepository
import com.tari.android.wallet.di.ApplicationModule
Expand Down Expand Up @@ -77,9 +79,10 @@ class FFIWalletTests {
private val tariSettingsRepository = TariSettingsSharedRepository(prefs, networkRepository)
private val securityStagesRepository = SecurityStagesRepository(prefs, networkRepository)
private val contactSharedPrefRepository = ContactSharedPrefRepository(networkRepository, prefs)
private val sentryPrefRepository: SentryPrefRepository = SentryPrefRepository(prefs, networkRepository)
private val torSharedRepository = TorSharedRepository(prefs, networkRepository)
private val securityPrefRepository = SecurityPrefRepository(context, prefs, networkRepository)
private val sharedPrefsRepository = SharedPrefsRepository(
context,
prefs,
networkRepository,
backupSettingsRepository,
Expand All @@ -88,7 +91,9 @@ class FFIWalletTests {
torSharedRepository,
tariSettingsRepository,
securityStagesRepository,
contactSharedPrefRepository
contactSharedPrefRepository,
sentryPrefRepository,
securityPrefRepository,
)

private val walletDirPath = context.filesDir.absolutePath
Expand Down Expand Up @@ -118,7 +123,7 @@ class FFIWalletTests {
)
val logFile = File(walletDirPath, "test_log.log")
// create wallet instance
wallet = FFIWallet(sharedPrefsRepository, SeedPhraseRepository(), networkRepository, commsConfig, logFile.absolutePath)
wallet = FFIWallet(sharedPrefsRepository, securityPrefRepository, SeedPhraseRepository(), networkRepository, commsConfig, logFile.absolutePath)
// create listener
listener = TestAddRecipientAddNodeListener()
wallet.listener = listener
Expand Down
27 changes: 24 additions & 3 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.HIGH_SAMPLING_RATE_SENSORS" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" /> <!-- remove billing support in case it gets included by a 3rd party lib -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_DATA_SYNC" />

<uses-permission
android:name="com.android.vending.BILLING"
tools:node="remove" />

<queries>
<intent>
<action android:name="android.intent.action.VIEW" />
Expand All @@ -55,7 +58,8 @@
android:name=".service.service.WalletService"
android:description="@string/wallet_service_desc"
android:enabled="true"
android:exported="false">
android:exported="false"
android:foregroundServiceType="dataSync">
<intent-filter>
<action android:name="com.tari.android.wallet.service.TariWalletService" />
</intent-filter>
Expand All @@ -81,6 +85,7 @@
android:name=".ui.fragment.splash.SplashActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Splash"
android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
Expand All @@ -93,18 +98,21 @@
<activity
android:name=".ui.fragment.onboarding.activity.OnboardingFlowActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
android:windowSoftInputMode="stateAlwaysHidden" /> <!-- local authentication -->
<activity
android:name=".ui.fragment.auth.AuthActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@style/AppTheme.Auth"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
android:windowSoftInputMode="stateAlwaysHidden" /> <!-- home (transaction list) -->
<activity
android:name=".ui.fragment.home.HomeActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize">
<intent-filter>
Expand Down Expand Up @@ -137,11 +145,16 @@
android:host="y.at"
android:scheme="tari" />

<data
android:host="yat.fyi"
android:scheme="tari" />

</intent-filter>

<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<action android:name="android.nfc.action.TAG_DISCOVERED" />

<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
Expand All @@ -156,13 +169,15 @@
android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
android:excludeFromRecents="true"
android:exported="false"
android:screenOrientation="portrait"
android:theme="@style/GoogleSignInActivity"
tools:replace="android:theme" />
<activity
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:exported="true"
android:launchMode="singleTask">
android:launchMode="singleTask"
android:screenOrientation="portrait">
<intent-filter>

<data android:scheme="db-${dropboxApiKey}" />
Expand All @@ -175,26 +190,32 @@
<activity
android:name="com.tari.android.wallet.ui.fragment.qr.QRScannerActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:theme="@style/AppTheme.Light"
android:windowSoftInputMode="stateAlwaysHidden" /> <!-- send tari -->
<activity
android:name=".ui.fragment.send.finalize.YatFinalizeSendTxActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:screenOrientation="portrait"
android:theme="@style/YatLibTheme.TransparentCompat"
android:windowSoftInputMode="stateAlwaysHidden" />
<activity
android:name="com.tari.android.wallet.ui.fragment.settings.logs.activity.DebugActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:launchMode="singleTask"
android:parentActivityName=".ui.fragment.home.HomeActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
android:windowSoftInputMode="adjustResize|stateAlwaysHidden" />
<activity
android:name="com.tari.android.wallet.ui.fragment.restore.activity.WalletRestoreActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:launchMode="singleTask"
android:parentActivityName=".ui.fragment.onboarding.activity.OnboardingFlowActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
android:windowSoftInputMode="adjustResize" />

Expand Down
Loading