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.1 #1006

Merged
merged 44 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 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
d9af065
Fixed dependabot issues
alexandrVakhtinTari Nov 16, 2023
c5eb610
Lowered errors to info
alexandrVakhtinTari Nov 17, 2023
d65093f
Update internal lib
alexandrVakhtinTari Nov 27, 2023
417d18e
Update taskaffinity
alexandrVakhtinTari Dec 4, 2023
2e7cfbb
Fixed security issue when app is not down(back service)
alexandrVakhtinTari Dec 4, 2023
c081046
Add an extension for retrieving serializable extras from an intent
igordanilcenko Dec 11, 2023
57c8fde
Merge pull request #1003 from tari-project/feature/intent-serializable
igordanilcenko Dec 11, 2023
8dc9ca2
Merge branch 'master' into release/0.24.1
alexandrVakhtinTari Dec 12, 2023
3e2c63d
sentry_fixes
alexandrVakhtinTari Dec 12, 2023
01a8ee9
Merge branch 'release/0.24.0' into release/0.24.1
alexandrVakhtinTari Dec 12, 2023
ecf75ce
Sentry fixes
alexandrVakhtinTari Dec 12, 2023
7f44116
Biometric bypass fix
alexandrVakhtinTari Dec 14, 2023
15afc8e
Affinity issue finilization
alexandrVakhtinTari Dec 14, 2023
35dd45d
Bump number
alexandrVakhtinTari Dec 14, 2023
87cd1d9
Sentry issue fix
alexandrVakhtinTari Dec 14, 2023
74765bf
Increase the build number up to 279
igordanilcenko Dec 14, 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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,6 @@ Aurora Android native libraries only support `armeabi-v7a`, `arm64-v8a` and `x86
Tari native wallet library version to be used by Aurora is specified by the `ext.libwalletVersion` in the `build.gradle` file in the project root directory. Aurora build script automatically fetches the native libraries of this version into the `libwallet` folder in the root directory during the build process. Any library files you place in this folder will be deleted and replaced by this automatic download process.

If you want to disable the automatic download and use the native libraries of your choice, please comment out the line `preBuild.dependsOn("downloadLibwallet")` in the file `app/build.gradle`.

### For updating openssl
https://github.com/217heidai/openssl_for_android/releases
8 changes: 4 additions & 4 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ dependencies {
implementation "com.github.adorsys:secure-storage-android:0.0.2"

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

// used to read log files
Expand All @@ -288,7 +288,7 @@ dependencies {
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') {
implementation('com.google.apis:google-api-services-drive:v3-rev20230822-2.0.0') {
exclude group: "org.apache.httpcomponents"
}
// sentry - crash analytics
Expand Down Expand Up @@ -323,9 +323,9 @@ dependencies {
// debugImplementation because LeakCanary should only run in debug builds.
debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'

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

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

// test
testImplementation "junit:junit:4.13.2"
Expand Down
14 changes: 10 additions & 4 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="false"
android:taskAffinity=""
android:theme="@style/AppTheme.Light"
tools:replace="android:supportsRtl,android:allowBackup">
<!-- Tari foreground service -->
Expand Down Expand Up @@ -85,6 +86,7 @@
android:name=".ui.fragment.splash.SplashActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Splash"
android:windowSoftInputMode="stateAlwaysHidden">
Expand All @@ -98,20 +100,22 @@
<activity
android:name=".ui.fragment.onboarding.activity.OnboardingFlowActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:launchMode="singleInstance"
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:launchMode="singleInstance"
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:launchMode="singleInstance"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
android:windowSoftInputMode="stateAlwaysHidden|adjustResize">
Expand Down Expand Up @@ -176,7 +180,7 @@
android:name="com.dropbox.core.android.AuthActivity"
android:configChanges="orientation|keyboard"
android:exported="true"
android:launchMode="singleTask"
android:launchMode="singleInstance"
android:screenOrientation="portrait">
<intent-filter>

Expand All @@ -191,20 +195,22 @@
android:name="com.tari.android.wallet.ui.fragment.qr.QRScannerActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:launchMode="singleInstance"
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:launchMode="singleInstance"
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:launchMode="singleInstance"
android:parentActivityName=".ui.fragment.home.HomeActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
Expand All @@ -213,7 +219,7 @@
android:name="com.tari.android.wallet.ui.fragment.restore.activity.WalletRestoreActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="false"
android:launchMode="singleTask"
android:launchMode="singleInstance"
android:parentActivityName=".ui.fragment.onboarding.activity.OnboardingFlowActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.Light"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ class BaseNodes(
private fun findAndAddBaseNode(fileContent: String, regex: String): Sequence<BaseNodeDto> {
return Regex(regex).findAll(fileContent).map { matchResult ->
val tripleString = matchResult.value.split("::")
if (tripleString.size ==2) {
1
}
Logger.t(this::class.simpleName).e("baseNodeList0: $tripleString, baseNodeList1: ${tripleString[1]}, baseNodeList2: ${tripleString[2]}")
Logger.t(this::class.simpleName).i("baseNodeList0: $tripleString, baseNodeList1: ${tripleString[1]}, baseNodeList2: ${tripleString[2]}")
BaseNodeDto(tripleString[0], tripleString[1], tripleString[2])
}
}
Expand All @@ -98,21 +95,21 @@ class BaseNodes(

fun startSync() {
try {
Logger.t(this::class.simpleName).e("startSync")
Logger.t(this::class.simpleName).i("startSync")
//essential for wallet creation flow
val baseNode = baseNodeSharedRepository.currentBaseNode ?: return
serviceConnection.currentState.service ?: return
if (EventBus.walletState.publishSubject.value != WalletState.Running) return

Logger.t(this::class.simpleName).e("startSync:publicKeyHex: ${baseNode.publicKeyHex}")
Logger.t(this::class.simpleName).e("startSync:address: ${baseNode.address}")
Logger.t(this::class.simpleName).e("startSync:address: ${Gson().toJson(baseNodeSharedRepository.userBaseNodes)}")
Logger.t(this::class.simpleName).i("startSync:publicKeyHex: ${baseNode.publicKeyHex}")
Logger.t(this::class.simpleName).i("startSync:address: ${baseNode.address}")
Logger.t(this::class.simpleName).i("startSync:address: ${Gson().toJson(baseNodeSharedRepository.userBaseNodes)}")
val baseNodeKeyFFI = FFIPublicKey(HexString(baseNode.publicKeyHex))
FFIWallet.instance?.addBaseNodePeer(baseNodeKeyFFI, baseNode.address)
baseNodeKeyFFI.destroy()
walletService.getWithError { error, wallet -> wallet.startBaseNodeSync(error) }
} catch (e: Throwable) {
Logger.t(this::class.simpleName).e("startSync")
Logger.t(this::class.simpleName).i("startSync")
setNextBaseNode()
startSync()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ package com.tari.android.wallet.application.deeplinks
import com.tari.android.wallet.data.sharedPrefs.tor.TorBridgeConfiguration
import com.tari.android.wallet.model.MicroTari
import com.tari.android.wallet.model.TariWalletAddress
import java.math.BigInteger
import com.tari.android.wallet.util.parseToBigInteger

/**
* Parses a deep link and contains the structured deep link details.
Expand Down Expand Up @@ -98,7 +98,7 @@ sealed class DeepLink {

constructor(params: Map<String, String>) : this(
params[tariAddressKey].orEmpty(),
params[amountKey]?.let { if (it.isEmpty()) null else MicroTari(BigInteger(it)) },
params[amountKey]?.let { if (it.isEmpty()) null else MicroTari(it.parseToBigInteger()) },
params[noteKey].orEmpty()
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class DeeplinkFormatter @Inject constructor(private val networkRepository: Netwo
return DeepLink.TorBridges(torBridges)
}

val uri = Uri.parse(URLDecoder.decode(deepLink, "UTF-8"))
val uri = runCatching { Uri.parse(URLDecoder.decode(deepLink, "UTF-8")) }.getOrNull() ?: return null

if (!uri.authority.equals(networkRepository.currentNetwork!!.network.uriComponent)) {
return null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class SharedPrefGsonDelegate<T>(
try {
gson.fromJson(savedValue, type) as T
} catch (e: Throwable) {
logger.e(e.toString())
logger.i(e.toString())
defValue
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class FFICommsConfig() : FFIBase() {
} else {
messageBuilder.append("Permission problem.")
}
logger.e(Throwable(), messageBuilder.toString())
logger.i(messageBuilder.toString())
throw FFIException(message = messageBuilder.toString())
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class BackupFileProcessor @Inject constructor(
try {
File(walletConfig.getWalletTempDirPath()).listFiles()?.forEach { it.delete() }
} catch (e: Exception) {
Logger.e(e, "Ignorable backup error while clearing temporary and old files.")
Logger.i(e.toString() + "Ignorable backup error while clearing temporary and old files.")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class LocalBackupStorage @Inject constructor(
}
}
} catch (e: Exception) {
logger.e(e, "Ignorable backup error while clearing temporary and old files.")
logger.i(e.toString() + "Ignorable backup error while clearing temporary and old files.")
}
return@withContext backupDate
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,13 @@ class SingleSuccessOrErrorAdapterDecorator(private val decorated: BiometricPromp

override fun onAuthenticationSucceeded(result: BiometricPrompt.AuthenticationResult) {
if (!isResumed.get()) {
decorated.onAuthenticationSucceeded(result)
isResumed.set(true)
if (result.cryptoObject?.cipher == null) {
decorated.onAuthenticationSucceeded(result)
isResumed.set(true)
} else {
decorated.onAuthenticationError(BiometricPrompt.ERROR_CANCELED, "Crypto object is not null")
isResumed.set(true)
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ package com.tari.android.wallet.service
import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import android.os.Build
import com.orhanobut.logger.Logger
import com.tari.android.wallet.data.WalletConfig
import com.tari.android.wallet.data.sharedPrefs.network.NetworkRepositoryImpl
import com.tari.android.wallet.data.sharedPrefs.tariSettings.TariSettingsSharedRepository
import com.tari.android.wallet.di.ApplicationModule
import com.tari.android.wallet.service.service.WalletServiceLauncher
import com.tari.android.wallet.ui.common.domain.ResourceManager

/**
* This receiver is responsible for starting the service after boot finish.
Expand All @@ -55,6 +55,9 @@ class BootDeviceReceiver : BroadcastReceiver() {

override fun onReceive(context: Context?, intent: Intent?) {
if (context == null || intent == null) return
// not allowed action starts from android 12 dio to new restriction
// https://developer.android.com/guide/components/foreground-services#background-start-restriction-exemptions
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) return
logger.i("Boot device broadcast received")
if (Intent.ACTION_BOOT_COMPLETED == intent.action) {
val sharedPreferences = context.getSharedPreferences(ApplicationModule.sharedPrefsFileName, Context.MODE_PRIVATE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class FFIWalletListenerImpl(
baseNodeValidationStatusMap[type] = Pair(currentStatus.first, isSuccess)
checkBaseNodeSyncCompletion()
} catch (e: Throwable) {
logger.e(e.toString())
logger.i(e.toString())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ServiceLifecycleCallbacks(private val wallet: FFIWallet): DefaultLifecycle
try {
wallet.setPowerModeNormal()
} catch (e: FFIException) {
logger.e(e, "Switching to normal power mode failed")
logger.i(e.toString() + "Switching to normal power mode failed")
}
}

Expand All @@ -53,7 +53,7 @@ class ServiceLifecycleCallbacks(private val wallet: FFIWallet): DefaultLifecycle
try {
wallet.setPowerModeLow()
} catch (e: FFIException) {
logger.e(e, "Switching to low power mode failed")
logger.i(e.toString() + "Switching to low power mode failed")
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class TariWalletServiceStubImpl(
} ?: false

override fun startBaseNodeSync(error: WalletError): Boolean = runMapping(error, {
logger.e(it, "Base node sync failed")
logger.i(it.toString() + "Base node sync failed")
baseNodeSharedPrefsRepository.baseNodeLastSyncResult = false
walletServiceListener.baseNodeValidationStatusMap.clear()
EventBus.baseNodeSyncState.post(BaseNodeSyncState.Failed)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ class WalletService : Service() {
.repeat()
.subscribeOn(Schedulers.io())
.observeOn(Schedulers.io())
.doOnError { logger.i("error during sheduled expiration check $it") }
.doOnError { logger.i("error during scheduled expiration check $it") }
.subscribe {
try {
logger.i("scheduled expiration check")
cancelExpiredPendingInboundTxs()
cancelExpiredPendingOutboundTxs()
} catch (e: Exception) {
logger.e("error during sheduled expiration check $e")
logger.i("error during scheduled expiration check $e")
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/tari/android/wallet/tor/NativeLoader.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ object NativeLoader {

return true
} catch (e: Exception) {
logger.e(e, "Load from zip")
logger.i(e.toString() + "Load from zip")
} finally {
if (stream != null) {
try {
stream.close()
} catch (e: Exception) {
logger.e(e, "Closing stream")
logger.i(e.toString() + "Closing stream")
}
}

if (zipFile != null) {
try {
zipFile.close()
} catch (e: Exception) {
logger.e(e, "closing zip file")
logger.i(e.toString() + "closing zip file")
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,10 @@ abstract class CommonActivity<Binding : ViewBinding, VM : CommonViewModel> : App
}

fun popUpTo(tag: String) {
viewModel.logger.e("popUpTo $tag")
viewModel.logger.e("popUpTo:last ${supportFragmentManager.fragments.last().tag}")
viewModel.logger.e("popUpTo:all ${supportFragmentManager.fragments.map { it.tag }.joinToString(", ")}")
viewModel.logger.e("popUpTo:all ${supportFragmentManager.fragments.map { it::class.java }.joinToString(", ")}")
viewModel.logger.i("popUpTo $tag")
viewModel.logger.i("popUpTo:last ${supportFragmentManager.fragments.last().tag}")
viewModel.logger.i("popUpTo:all ${supportFragmentManager.fragments.map { it.tag }.joinToString(", ")}")
viewModel.logger.i("popUpTo:all ${supportFragmentManager.fragments.map { it::class.java }.joinToString(", ")}")
while (supportFragmentManager.fragments.last()::class.java.simpleName != tag && supportFragmentManager.backStackEntryCount > 0) {
supportFragmentManager.popBackStackImmediate()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ open class CommonViewModel : ViewModel() {

fun doOnConnected(action: (walletService: TariWalletService) -> Unit) {
serviceConnection.connection.filter { it.status == ServiceConnectionStatus.CONNECTED }.take(1)
.doOnError { logger.e(it, it.toString()) }
.doOnError { logger.i(it.toString()) }
.subscribe { action(it.service!!) }
.addTo(compositeDisposable)
}

fun doOnConnectedToWallet(action: (walletService: FFIWallet) -> Unit) {
EventBus.walletState.publishSubject.filter { it == WalletState.Running }.take(1).doOnError { Logger.e(it.toString()) }
EventBus.walletState.publishSubject.filter { it == WalletState.Running }.take(1).doOnError { Logger.i(it.toString()) }
.subscribe { action(FFIWallet.instance!!) }
.addTo(compositeDisposable)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class GiphyRESTRetrofitRepository(private val gateway: GiphyRESTGateway) : GIFRe
body.data.map { GIFItem(it.id, Uri.parse(it.embedUrl), Uri.parse(it.images.fixedWidth.url)) }
else {
val exception = GIFSearchException(body?.meta?.message ?: response.message() ?: response.errorBody()?.string())
logger.e(exception, "Get all was failed")
logger.i(exception.toString() + "Get all was failed")
throw exception
}
}
Expand All @@ -33,9 +33,9 @@ class GiphyRESTRetrofitRepository(private val gateway: GiphyRESTGateway) : GIFRe
body.data.let { GIFItem(it.id, Uri.parse(it.embedUrl), Uri.parse(it.images.fixedWidth.url)) }
else {
val exception = GIFSearchException(body?.meta?.message ?: response.message() ?: response.errorBody()?.string())
logger.e(exception.message.orEmpty())
logger.e(exception.stackTraceToString())
logger.e(exception, "Get by id was failed")
logger.i(exception.message.orEmpty())
logger.i(exception.stackTraceToString())
logger.i(exception. toString() + "Get by id was failed")
throw exception
}
}
Expand Down
Loading