Skip to content

Commit 5e5a0f8

Browse files
FrogTravelvalentunnantonkhvorov
authored
Master update to 1.9.0 (#352)
* Bug Fix. Validation on balance of a controller (#326) * Bug Fix. Validation on balance of a controller * Issues fixed. Easier way to solve bug * Fix. Alert dialog for controller zero balance (#321) * Bug fix. Now the alert dialog will be shown when controller balance is zero * Validation is not generic; Localize string update; Another source of controller balance * Linter job * Changed big decimal to big integer in repository * Fix - failed requirement if nominators are null (#332) * Really bad way to count down, but it works Basic repository timer implementation without era argument Basic flow timer with wrong formatting in presentation layout * Finished algorithm to count time for the rest of the era * Caching for algorithm remoteStorage -> localStorage * Change Historical Updater base class range from [current_era - history_depth, active_era-1] to [current_era - history_depth, active_era] * Code style * Staking Widget timer added * Timer logic for destination era * Unbonding timer; lots of timer implementation * Payout Rewards timer; Lot's of timers approach * Era number in active and in inactive status returned * KlintFormat * Feature/custom validators (#328) * Generalize Learn More button * Start change validators screen * Code style * Ui fixes * Ui fixes * Reorganise folders * Basic screen * Sortings change * Code style * Quick action chips * Fixes and optimizations * Fix fill with selected * Remove extra space * WIP * Review validators * Fixes * Code style * Custom validators filters * Code style * Fix continue button labels * WIP * Fixes * Code style * Center text in search placeholder * Format nominators count (#336) * Format nominators count * Code style * Disallow selecting blocked validator via search (#335) * Disallow selecting blocked validator via search * Code style * Fix - clear filters is always enabled (#337) * Fix - crash at start staking (#338) * Fix/crowdloan crash (#341) * Show empty list instead of hiding tab if no crowdloan module is found in runtime * Code style * Update fearlesslib version (#340) * Update fearlesslib version * Code style * Refactor of historicalRange method * Flw 1059 (#344) * Add http caching * Point type fetching to polkascan repo * Calculator logic refactoring * Timer logic refactoring * Refactoring of staking widget * Linter * staking payout expired when left time is zero * Codestyle * Bug fix * Color added * Revert "Feature/timer task" (#348) * Flw 1076 (#342) * Remember custom validators when returning to start chaning screen * Use selected validators as preset for custom validators * Code style * Fix/max validators per nominator (#343) * Use runtime constant for max nominations + do not show `update your list` for empty validator list * Code style * Fix - runtime constants in settings provider are not invalidated after network/runtime change * Code style * Feature/rename reward (#347) * Payout reward rename * Payout layout update * Russian translation * Partial lokalise fix * Lokalise fix * Lokalise final fix with right keys and translations (w/o 39 lines) * Reduced number of languages in settings * Lokalise finish version * Fixeds strings * Fixed lokalise. Again * Fixed lokalise. Again * Fixed lokalise. Again * Fix localise * Version update * Fix/lokalise (#349) * Governance tab erased * Hide alert widget if no alerts in it * Renaming strings for localise * Lokalise finish * Fix lokalise wrong translations * Fix lokalise wrong translations Co-authored-by: valentun <[email protected]> Co-authored-by: valentunn <[email protected]> Co-authored-by: Anton Khvorov <[email protected]>
1 parent de9af8a commit 5e5a0f8

File tree

216 files changed

+4286
-3145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

216 files changed

+4286
-3145
lines changed

app/src/main/java/jp/co/soramitsu/app/root/di/RootComponent.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import dagger.BindsInstance
44
import dagger.Component
55
import jp.co.soramitsu.app.root.navigation.Navigator
66
import jp.co.soramitsu.app.root.presentation.di.RootActivityComponent
7-
import jp.co.soramitsu.app.root.presentation.main.coming_soon.di.ComingSoonComponent
87
import jp.co.soramitsu.app.root.presentation.main.di.MainFragmentComponent
98
import jp.co.soramitsu.common.di.CommonApi
109
import jp.co.soramitsu.common.di.scope.FeatureScope
@@ -30,8 +29,6 @@ interface RootComponent {
3029

3130
fun mainFragmentComponentFactory(): MainFragmentComponent.Factory
3231

33-
fun comingSoonComponentFactory(): ComingSoonComponent.Factory
34-
3532
@Component.Factory
3633
interface Factory {
3734
fun create(

app/src/main/java/jp/co/soramitsu/app/root/domain/RootInteractor.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ class RootInteractor(
2626

2727
fun stakingAvailableFlow() = stakingRepository.stakingAvailableFlow()
2828

29-
fun crowdloanAvailableFlow() = crowdloanRepository.crowdloanAvailableFlow()
30-
3129
suspend fun updatePhishingAddresses() {
3230
runCatching {
3331
walletRepository.updatePhishingAddresses()

app/src/main/java/jp/co/soramitsu/app/root/navigation/Navigator.kt

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package jp.co.soramitsu.app.root.navigation
22

33
import android.os.Bundle
44
import androidx.appcompat.app.AppCompatActivity
5+
import androidx.lifecycle.Lifecycle
56
import androidx.lifecycle.asFlow
67
import androidx.navigation.NavController
78
import androidx.navigation.NavOptions
@@ -182,6 +183,10 @@ class Navigator :
182183
navController?.navigate(R.id.action_mainFragment_to_setupStakingFragment)
183184
}
184185

186+
override fun openStartChangeValidators() {
187+
navController?.navigate(R.id.openStartChangeValidatorsFragment)
188+
}
189+
185190
override fun openStory(story: StakingStoryModel) {
186191
navController?.navigate(R.id.open_staking_story, StoryFragment.getBundle(story))
187192
}
@@ -286,6 +291,9 @@ class Navigator :
286291
)
287292
}
288293

294+
override val currentStackEntryLifecycle: Lifecycle
295+
get() = navController!!.currentBackStackEntry!!.lifecycle
296+
289297
override fun openControllerAccount() {
290298
navController?.navigate(R.id.action_stakingBalanceFragment_to_setControllerAccountFragment)
291299
}
@@ -298,11 +306,27 @@ class Navigator :
298306
}
299307

300308
override fun openRecommendedValidators() {
301-
navController?.navigate(R.id.openRecommendedValidatorsFragment)
309+
navController?.navigate(R.id.action_startChangeValidatorsFragment_to_recommendedValidatorsFragment)
310+
}
311+
312+
override fun openSelectCustomValidators() {
313+
navController?.navigate(R.id.action_startChangeValidatorsFragment_to_selectCustomValidatorsFragment)
314+
}
315+
316+
override fun openCustomValidatorsSettings() {
317+
navController?.navigate(R.id.action_selectCustomValidatorsFragment_to_settingsCustomValidatorsFragment)
318+
}
319+
320+
override fun openSearchCustomValidators() {
321+
navController?.navigate(R.id.action_selectCustomValidatorsFragment_to_searchCustomValidatorsFragment)
322+
}
323+
324+
override fun openReviewCustomValidators() {
325+
navController?.navigate(R.id.action_selectCustomValidatorsFragment_to_reviewCustomValidatorsFragment)
302326
}
303327

304328
override fun openConfirmStaking() {
305-
navController?.navigate(R.id.action_recommendedValidatorsFragment_to_confirmStakingFragment)
329+
navController?.navigate(R.id.openConfirmStakingFragment)
306330
}
307331

308332
override fun openConfirmNominations() {

app/src/main/java/jp/co/soramitsu/app/root/presentation/main/MainFragment.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,6 @@ class MainFragment : BaseFragment<MainViewModel>() {
8686
viewModel.stakingAvailableLiveData.observe {
8787
bottomNavigationView.menu.findItem(R.id.stakingFragment).isVisible = it
8888
}
89-
90-
viewModel.crowdloanAvailableLiveData.observe {
91-
bottomNavigationView.menu.findItem(R.id.crowdloanFragment).isVisible = it
92-
}
9389
}
9490

9591
private fun isAtHomeTab(destination: NavDestination) =

app/src/main/java/jp/co/soramitsu/app/root/presentation/main/MainViewModel.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,4 @@ class MainViewModel(
1616

1717
val stakingAvailableLiveData = interactor.stakingAvailableFlow()
1818
.asLiveData()
19-
20-
val crowdloanAvailableLiveData = interactor.crowdloanAvailableFlow()
21-
.asLiveData()
2219
}

app/src/main/java/jp/co/soramitsu/app/root/presentation/main/coming_soon/ComingSoonFragment.kt

Lines changed: 0 additions & 40 deletions
This file was deleted.

app/src/main/java/jp/co/soramitsu/app/root/presentation/main/coming_soon/ComingSoonViewModel.kt

Lines changed: 0 additions & 23 deletions
This file was deleted.

app/src/main/java/jp/co/soramitsu/app/root/presentation/main/coming_soon/di/ComingSoonComponent.kt

Lines changed: 0 additions & 26 deletions
This file was deleted.

app/src/main/java/jp/co/soramitsu/app/root/presentation/main/coming_soon/di/ComingSoonModule.kt

Lines changed: 0 additions & 37 deletions
This file was deleted.

app/src/main/res/layout/activity_root.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
android:id="@+id/rootNetworkBar"
1919
android:layout_width="match_parent"
2020
android:background="@color/colorAccent"
21-
android:text="@string/common_connecting"
21+
android:text="@string/network_status_connecting"
2222
android:gravity="center"
2323
android:paddingTop="16dp"
2424
android:visibility="gone"

0 commit comments

Comments
 (0)