Skip to content

Commit

Permalink
release 2.0.6 (#587)
Browse files Browse the repository at this point in the history
* add staging buildtype

* fix application id suffix

* add staging google-services

* legacy icons update
adaptive prod icon

* 1726 fix Process CEX (Binance, Kraken, etc) QR codes for account deposit

* add bad internet connection alert

* 1799 fix Turn off the Internet. The application crashes after entering the PIN code

* 1792 fix Incorrect word order in the source type list

* 1796 fix After installing the application, in Manage assets the background of the screen is incorrect

* update soramitsu 6 years logo

* 1383 Add logic of hiding crowdloan slot in case of early termination of fundraising

* 1564 Pull to refresh does not work on the Crowdloans page

* 1791 When updating the screen there is an eternal loading

* 1812 Incorrect title while exporting a wallet

* 1813 Button "View in Subscan" doesn’t work

* 1816 Add account. Create a new account. We should delete "Substrate keypair krypto type" field and "Substrate secret derivation path" field

* 1808 "Locked" screen doesn’t match the design

* 1807 Wrong picker title when exporting account

* 1792 fix Incorrect word order in the source type list

* fix balance list details initial position scroll issues

* 1803 Import an account. The warning icon ⚠️ does not disappear if you press the "I don’t need an account" button.

* 1833 Extra chain account occurs in the list of assets after having added another one

* 1816 Add account. Create a new account. We should delete "Substrate keypair krypto type" field and "Substrate secret derivation path" field

* 1796 fix After installing the application, in Manage assets the background of the screen is incorrect

* 1799 fix Turn off the Internet. The application crashes after entering the PIN code

* 1836 Create a wallet. Back arrow button doesn’t work

* 1838 Manage assets. After the search, the "add account" buttons appear

* 1848 Manage assets. There aren’t positions without accounts

* fix crash on cold start immediate staking open

* 1855 The application crashes on the test node

* version up -> 2.0.6 (67)

* alert message fix

* 1862 The place of currency changed if choose AED currency

* 1859 There is no name of token in the title

* 1858 With a quick tap on the Skip button, many wallets are created

* 1867 Crash occurs on subsequent auth after adding a custom invalid URL in the process of adding a new node

* 1863 Validation doesn't work on Ethereum secret derivation path field when adding a wallet
1860 Slashes appear automatically in the Substrate and Ethereum secret der path input line on the backup mnemonic after returning from the confirm mnemonic screen

* 1861 Create a wallet. Wrong hint “Wallet“ in the field for typing wallet name

* 1860 Slashes appear automatically in the Substrate and Ethereum secret der path input line on the backup mnemonic after returning from the confirm mnemonic screen

* 1857 The currency next to the wallet name does not change

* use latest tag for android build box

Signed-off-by: Ahmed Elkashef <[email protected]>

* change app name for staging

Co-authored-by: Denis Lyazgin <[email protected]>
Co-authored-by: Deneath <[email protected]>
Co-authored-by: Ahmed Elkashef <[email protected]>
  • Loading branch information
4 people authored May 19, 2022
1 parent f66fbaa commit a858d91
Show file tree
Hide file tree
Showing 87 changed files with 798 additions and 287 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def pipeline = new org.android.AppPipeline(
sonar: false,
pushReleaseNotes: false,
testCmd: 'runTest',
dockerImage: 'build-tools/android-build-box-jdk11',
dockerImage: 'build-tools/android-build-box-jdk11:latest',
publishCmd: 'publishReleaseApk'
)
pipeline.runPipeline('fearless')
13 changes: 13 additions & 0 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.ci
}
staging {
initWith debug
matchingFallbacks = ['debug']
versionNameSuffix '-staging'
applicationIdSuffix '.staging'
//Init firebase
def localReleaseNotes = releaseNotes()
def localFirebaseGroup = firebaseGroup()
firebaseAppDistribution {
releaseNotes = localReleaseNotes
groups = localFirebaseGroup
}
}
develop {
signingConfig signingConfigs.ci
matchingFallbacks = ['debug']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ class RootInteractor(
}
}

suspend fun getRemoteConfig() = walletRepository.getRemoteConfig().toDomain()
suspend fun getRemoteConfig() = walletRepository.getRemoteConfig().map { it.toDomain() }

fun chainRegistrySyncUp() = walletRepository.chainRegistrySyncUp()
}
Original file line number Diff line number Diff line change
Expand Up @@ -518,12 +518,16 @@ class Navigator :
navController?.navigate(R.id.action_nodesFragment_to_addNodeFragment, AddNodeFragment.getBundle(chainId))
}

override fun openExportMnemonic(metaId: Long, chainId: ChainId): DelayedNavigation {
val extras = ExportMnemonicFragment.getBundle(metaId, chainId)
override fun openExportMnemonic(metaId: Long, chainId: ChainId, isExportWallet: Boolean): DelayedNavigation {
val extras = ExportMnemonicFragment.getBundle(metaId, chainId, isExportWallet)

return NavComponentDelayedNavigation(R.id.action_export_mnemonic, extras)
}

override fun openExportMnemonic(metaId: Long, chainId: ChainId): DelayedNavigation {
return openExportMnemonic(metaId, chainId, isExportWallet = false)
}

override fun openExportSeed(metaId: Long, chainId: ChainId, isExportWallet: Boolean): DelayedNavigation {
val extras = ExportSeedFragment.getBundle(metaId, chainId, isExportWallet)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import androidx.lifecycle.OnLifecycleEvent
import androidx.lifecycle.ProcessLifecycleOwner
import androidx.navigation.NavController
import androidx.navigation.fragment.NavHostFragment
import javax.inject.Inject
import jp.co.soramitsu.app.R
import jp.co.soramitsu.app.root.di.RootApi
import jp.co.soramitsu.app.root.di.RootComponent
Expand All @@ -29,11 +28,10 @@ import jp.co.soramitsu.common.utils.EventObserver
import jp.co.soramitsu.common.utils.showToast
import jp.co.soramitsu.common.utils.updatePadding
import jp.co.soramitsu.common.view.bottomSheet.AlertBottomSheet
import jp.co.soramitsu.splash.presentation.SplashBackgroundHolder
import kotlinx.android.synthetic.main.activity_root.mainView
import kotlinx.android.synthetic.main.activity_root.rootNetworkBar
import javax.inject.Inject

class RootActivity : BaseActivity<RootViewModel>(), SplashBackgroundHolder, LifecycleObserver {
class RootActivity : BaseActivity<RootViewModel>(), LifecycleObserver {

companion object {
private const val ANIM_DURATION = 150L
Expand All @@ -53,8 +51,6 @@ class RootActivity : BaseActivity<RootViewModel>(), SplashBackgroundHolder, Life
override fun onRestoreInstanceState(savedInstanceState: Bundle) {
super.onRestoreInstanceState(savedInstanceState)

removeSplashBackground()

viewModel.restoredAfterConfigChange()
}

Expand Down Expand Up @@ -142,6 +138,12 @@ class RootActivity : BaseActivity<RootViewModel>(), SplashBackgroundHolder, Life
finish()
}
)
viewModel.showNoInternetConnectionAlert.observe(
this,
EventObserver {
showNoInternetConnectionAlert()
}
)
}

private fun showUnsupportedAppVersionAlert() {
Expand All @@ -155,6 +157,17 @@ class RootActivity : BaseActivity<RootViewModel>(), SplashBackgroundHolder, Life
.show()
}

private fun showNoInternetConnectionAlert() {
AlertBottomSheet.Builder(this)
.setTitle(jp.co.soramitsu.feature_wallet_impl.R.string.common_connection_problems)
.setMessage(jp.co.soramitsu.feature_wallet_impl.R.string.connection_problems_alert_message)
.setButtonText(jp.co.soramitsu.feature_wallet_impl.R.string.common_retry)
.setCancelable(false)
.callback { viewModel.retryLoadConfigClicked() }
.build()
.show()
}

private fun openPlayMarket() {
try {
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(PLAY_MARKET_APP_URI)))
Expand Down Expand Up @@ -202,10 +215,6 @@ class RootActivity : BaseActivity<RootViewModel>(), SplashBackgroundHolder, Life
rootNetworkBar.startAnimation(animation)
}

override fun removeSplashBackground() {
mainView.setBackgroundResource(R.color.black)
}

override fun changeLanguage() {
viewModel.noticeLanguageLanguage()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ package jp.co.soramitsu.app.root.presentation
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.viewModelScope
import java.util.Date
import java.util.Timer
import java.util.TimerTask
import jp.co.soramitsu.app.R
import jp.co.soramitsu.app.root.domain.RootInteractor
import jp.co.soramitsu.common.base.BaseViewModel
Expand All @@ -15,14 +12,17 @@ import jp.co.soramitsu.common.resources.ResourceManager
import jp.co.soramitsu.common.utils.Event
import jp.co.soramitsu.core.updater.Updater
import jp.co.soramitsu.runtime.multiNetwork.connection.ChainConnection.ExternalRequirement
import kotlin.concurrent.timerTask
import kotlin.time.DurationUnit
import kotlin.time.toDuration
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.launchIn
import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import java.util.Date
import java.util.Timer
import java.util.TimerTask
import kotlin.concurrent.timerTask
import kotlin.time.DurationUnit
import kotlin.time.toDuration

class RootViewModel(
private val interactor: RootInteractor,
Expand All @@ -41,6 +41,9 @@ class RootViewModel(
private val _showUnsupportedAppVersionAlert = MutableLiveData<Event<Unit>>()
val showUnsupportedAppVersionAlert: LiveData<Event<Unit>> = _showUnsupportedAppVersionAlert

private val _showNoInternetConnectionAlert = MutableLiveData<Event<Unit>>()
val showNoInternetConnectionAlert: LiveData<Event<Unit>> = _showNoInternetConnectionAlert

private val _openPlayMarket = MutableLiveData<Event<Unit>>()
val openPlayMarket: LiveData<Event<Unit>> = _openPlayMarket

Expand All @@ -50,22 +53,42 @@ class RootViewModel(
private var timer = Timer()
private var timerTask: TimerTask? = null

private var shouldHandleResumeInternetConnection = false

init {
checkAppVersion()
}

private fun checkAppVersion() {
viewModelScope.launch {
val appConfigResult = interactor.getRemoteConfig()
when {
appConfigResult.isFailure -> {
shouldHandleResumeInternetConnection = true
_showNoInternetConnectionAlert.value = Event(Unit)
}
appConfigResult.getOrNull()?.isCurrentVersionSupported == false -> {
_showUnsupportedAppVersionAlert.value = Event(Unit)
}
else -> {
runBalancesUpdate()
}
}
}
}

private fun runBalancesUpdate() {
if (shouldHandleResumeInternetConnection) {
shouldHandleResumeInternetConnection = false
interactor.chainRegistrySyncUp()
}
interactor.runBalancesUpdate()
.onEach { handleUpdatesSideEffect(it) }
.launchIn(this)

updatePhishingAddresses()
}

private fun checkAppVersion() = viewModelScope.launch {
val appConfig = interactor.getRemoteConfig()
if (appConfig.isCurrentVersionSupported.not()) {
_showUnsupportedAppVersionAlert.value = Event(Unit)
}
}

private fun handleUpdatesSideEffect(sideEffect: Updater.SideEffect) {
// pass
hashCode()
Expand All @@ -77,8 +100,6 @@ class RootViewModel(
}
}

fun jsonFileOpened(content: String?) {}

override fun onCleared() {
super.onCleared()

Expand Down Expand Up @@ -144,4 +165,8 @@ class RootViewModel(
rootRouter.openNavGraph()
}
}

fun retryLoadConfigClicked() {
checkAppVersion()
}
}
11 changes: 5 additions & 6 deletions app/src/main/res/layout/activity_root.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mainView"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/mainView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/drawable_background_image">
android:background="@color/black">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/navHost"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:navGraph="@navigation/root_nav_graph"
app:defaultNavHost="true" />
app:defaultNavHost="true"
app:navGraph="@navigation/root_nav_graph" />

<TextView
android:id="@+id/rootNetworkBar"
Expand All @@ -31,7 +31,6 @@
<View
android:id="@+id/root_touch_interceptor"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
android:layout_height="match_parent" />

</FrameLayout>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions app/src/release/res/drawable/ic_launcher_foreground.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group
android:scaleX="1.001"
android:scaleY="1.001"
android:translateX="23.97"
android:translateY="40.4865">
<path
android:fillAlpha="0.9"
android:fillColor="#ffffff"
android:pathData="M59.309,4.0444L36.1118,7.2311C35.9794,7.2492 35.8561,7.3124 35.7618,7.411L33.8522,9.3953C33.6147,9.6427 33.2308,9.6427 32.9925,9.3953L32.6583,9.0476C32.4183,8.7984 32.4183,8.3927 32.6583,8.1436L34.9377,5.7753C35.1777,5.5262 35.1777,5.1205 34.9377,4.8713L30.4293,0.1857C30.1919,-0.0617 29.808,-0.0617 29.5697,0.1857L25.0613,4.8713C24.8213,5.1205 24.8213,5.5262 25.0613,5.7753L27.3407,8.1436C27.5807,8.3927 27.5807,8.7984 27.3407,9.0476L27.0064,9.3953C26.769,9.6427 26.3851,9.6427 26.1468,9.3953L24.2372,7.411C24.1421,7.3124 24.0196,7.2492 23.8872,7.2311L0.6908,4.0444C0.1124,3.9648 -0.2318,4.6983 0.1819,5.1283L5.2405,10.3857C5.6261,10.7862 5.3547,11.4747 4.8111,11.4747C4.2675,11.4747 3.9962,12.1633 4.3817,12.5638L9.1234,17.4916C9.2012,17.5721 9.2989,17.63 9.4047,17.6577L25.5453,21.8876C25.676,21.9222 25.7927,22.0009 25.8762,22.1116L28.3733,25.428C28.8184,26.0707 29.5705,26.8146 29.5705,26.8146C29.808,27.062 30.1919,27.062 30.4301,26.8146C30.4301,26.8146 31.0523,26.1572 31.6274,25.428L34.1244,22.1116C34.208,22.0009 34.3238,21.9222 34.4554,21.8876L50.5959,17.6577C50.7026,17.63 50.7994,17.5721 50.8772,17.4916L55.6189,12.5638C56.0045,12.1633 55.7331,11.4747 55.1895,11.4747C54.6459,11.4747 54.3745,10.7862 54.7601,10.3857L59.8187,5.1283C60.2316,4.6983 59.8874,3.9657 59.309,4.0444Z"
android:strokeAlpha="0.9" />
</group>
</vector>
5 changes: 5 additions & 0 deletions app/src/release/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>
Binary file modified app/src/release/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/release/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/release/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/release/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/release/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit a858d91

Please sign in to comment.