Skip to content

Commit c33bf77

Browse files
authored
Merge pull request #311 from soramitsu/rc/1.8.2
Rc/1.8.2
2 parents 0d36e00 + 0697c7d commit c33bf77

File tree

50 files changed

+732
-329
lines changed

Some content is hidden

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

50 files changed

+732
-329
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ import jp.co.soramitsu.feature_staking_impl.presentation.payouts.detail.PayoutDe
4545
import jp.co.soramitsu.feature_staking_impl.presentation.payouts.model.PendingPayoutParcelable
4646
import jp.co.soramitsu.feature_staking_impl.presentation.staking.bond.confirm.ConfirmBondMoreFragment
4747
import jp.co.soramitsu.feature_staking_impl.presentation.staking.bond.confirm.ConfirmBondMorePayload
48+
import jp.co.soramitsu.feature_staking_impl.presentation.staking.bond.select.SelectBondMoreFragment
49+
import jp.co.soramitsu.feature_staking_impl.presentation.staking.bond.select.SelectBondMorePayload
4850
import jp.co.soramitsu.feature_staking_impl.presentation.staking.controller.confirm.ConfirmSetControllerFragment
4951
import jp.co.soramitsu.feature_staking_impl.presentation.staking.controller.confirm.ConfirmSetControllerPayload
5052
import jp.co.soramitsu.feature_staking_impl.presentation.staking.main.model.StakingStoryModel
@@ -200,8 +202,8 @@ class Navigator :
200202
navController?.navigate(R.id.action_mainFragment_to_stakingBalanceFragment)
201203
}
202204

203-
override fun openBondMore() {
204-
navController?.navigate(R.id.action_stakingBalanceFragment_to_selectBondMoreFragment)
205+
override fun openBondMore(payload: SelectBondMorePayload) {
206+
navController?.navigate(R.id.action_open_selectBondMoreFragment, SelectBondMoreFragment.getBundle(payload))
205207
}
206208

207209
override fun openConfirmBondMore(payload: ConfirmBondMorePayload) {

app/src/main/res/navigation/main_nav_graph.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -536,13 +536,6 @@
536536
android:label="StakingBalanceFragment"
537537
tools:layout="@layout/fragment_staking_balance">
538538

539-
<action
540-
android:id="@+id/action_stakingBalanceFragment_to_selectBondMoreFragment"
541-
app:destination="@id/selectBondMoreFragment"
542-
app:enterAnim="@anim/fragment_open_enter"
543-
app:exitAnim="@anim/fragment_open_exit"
544-
app:popEnterAnim="@anim/fragment_close_enter"
545-
app:popExitAnim="@anim/fragment_close_exit" />
546539
<action
547540
android:id="@+id/action_stakingBalanceFragment_to_selectUnbondFragment"
548541
app:destination="@id/selectUnbondFragment"
@@ -551,7 +544,6 @@
551544
app:popEnterAnim="@anim/fragment_close_enter"
552545
app:popExitAnim="@anim/fragment_close_exit" />
553546

554-
555547
<action
556548
android:id="@+id/action_stakingBalanceFragment_to_customRebondFragment"
557549
app:destination="@id/customRebondFragment"
@@ -606,6 +598,14 @@
606598
app:popExitAnim="@anim/fragment_close_exit" />
607599
</fragment>
608600

601+
<action
602+
android:id="@+id/action_open_selectBondMoreFragment"
603+
app:destination="@id/selectBondMoreFragment"
604+
app:enterAnim="@anim/fragment_open_enter"
605+
app:exitAnim="@anim/fragment_open_exit"
606+
app:popEnterAnim="@anim/fragment_close_enter"
607+
app:popExitAnim="@anim/fragment_close_exit" />
608+
609609
<fragment
610610
android:id="@+id/confirmBondMoreFragment"
611611
android:name="jp.co.soramitsu.feature_staking_impl.presentation.staking.bond.confirm.ConfirmBondMoreFragment"

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
buildscript {
22
ext {
33
// App version
4-
versionName = '1.8.1'
5-
versionCode = 15
4+
versionName = '1.8.2'
5+
versionCode = 17
66

77
// SDK and tools
88
compileSdkVersion = 29
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
package jp.co.soramitsu.common.navigation
2+
3+
typealias PendingNavigationAction<ROUTER> = (ROUTER) -> Unit

common/src/main/java/jp/co/soramitsu/common/utils/formatting/CompoundNumberFormatter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CompoundNumberFormatter(
2222
}
2323

2424
override fun format(number: BigDecimal): String {
25-
val lastAbbreviationMatching = abbreviations.lastOrNull { number > it.threshold } ?: abbreviations.first()
25+
val lastAbbreviationMatching = abbreviations.lastOrNull { number >= it.threshold } ?: abbreviations.first()
2626

2727
val scaled = number.divide(lastAbbreviationMatching.divisor, MathContext.UNLIMITED)
2828

common/src/main/res/values/strings.xml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<resources>
3+
<string name="staking_alert_bond_more_title">Bond more tokens.</string>
4+
<string name="staking_alert_bond_more_message">Staking is inactive. Current minimal stake is %s</string>
35
<string name="staking_alert_redeem_title">Redeem unbonded tokens.</string>
46

57
<string name="staking_alert_title">Alerts</string>
68
<string name="staking_alert_no_alerts_now">Everything is fine now. Alerts will appear here.</string>
7-
<string name="staking_alert_start_next_era">Your staking will start in the next era.</string>
8-
<string name="staking_alert_start_next_era_extra_message">Please wait for the next era to start.</string>
9+
<string name="staking_alert_start_next_era_message">Please wait for the next era to start.</string>
910
<string name="staking_alert_election">Staking actions are currently unavailable.</string>
10-
<string name="staking_alert_start_election_extra_message">The network is electing validators. Usually it takes less than 10 minutes.</string>
11+
<string name="staking_alert_election_message">The network is electing validators.\nUsually it takes less than 10 minutes.</string>
1112
<string name="staking_alert_change_validators">Change your validators.</string>
12-
<string name="staking_alert_change_validators_extra_message">Staking was inactive. None of your validators were elected by network.</string>
13+
<string name="staking_alert_change_validators_message">Staking is inactive. None of your validators were elected by network.</string>
1314

1415
<string name="crodloan_private_crowdloan_title">Private crowdloan</string>
1516
<string name="crodloan_private_crowdloan_message">Private crowdloans are not yet supported.</string>

common/src/test/java/jp/co/soramitsu/common/utils/formatting/CompoundNumberFormatterTest.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class CompoundNumberFormatterTest {
1414
testFormatter(formatter, "0.315", "0.315000041811")
1515
testFormatter(formatter, "0.99999", "0.99999999999")
1616
testFormatter(formatter, "999.99999", "999.99999999")
17+
testFormatter(formatter, "1M", "1000000")
1718
testFormatter(formatter, "888,888.12", "888888.1234")
1819
testFormatter(formatter, "1.24M", "1243000")
1920
testFormatter(formatter, "1.24M", "1243011")

core-api/src/main/java/jp/co/soramitsu/core/model/Node.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
package jp.co.soramitsu.core.model
44

5-
const val REAL_ROCOCO_ADDRESS_BYTE = 42.toByte()
6-
75
data class Node(
86
val id: Int,
97
val name: String,

feature-crowdloan-api/src/test/java/jp/co/soramitsu/feature_crowdloan_api/ExampleUnitTest.kt

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

feature-crowdloan-impl/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ android {
1414
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1515

1616
buildConfigField "String", "KARURA_FEALRESS_REFERRAL", "\"0x9642d0db9f3b301b44df74b63b0b930011e3f52154c5ca24b4dc67b3c7322f15\""
17+
buildConfigField "String", "BIFROST_FEALRESS_REFERRAL", "\"FRLS69\""
18+
buildConfigField "String", "BIFROST_TERMS_LINKS", "\"https://docs.google.com/document/d/1PDpgHnIcAmaa7dEFusmLYgjlvAbk2VKtMd755bdEsf4\""
1719
}
1820

1921
buildTypes {

0 commit comments

Comments
 (0)