File tree 5 files changed +18
-7
lines changed
core-db/src/main/java/jp/co/soramitsu/coredb
feature-staking-api/src/main/java/jp/co/soramitsu/staking/api/data
feature-staking-impl/src/main/java/jp/co/soramitsu/staking/impl/scenarios/relaychain
5 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ apply plugin: "org.sonarqube"
5
5
buildscript {
6
6
ext {
7
7
// App version
8
- versionName = ' 3.4.4 '
9
- versionCode = 172
8
+ versionName = ' 3.4.5 '
9
+ versionCode = 174
10
10
11
11
// SDK and tools
12
12
compileSdkVersion = 34
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ import jp.co.soramitsu.coredb.migrations.Migration_60_61
67
67
import jp.co.soramitsu.coredb.migrations.Migration_61_62
68
68
import jp.co.soramitsu.coredb.migrations.Migration_62_63
69
69
import jp.co.soramitsu.coredb.migrations.Migration_63_64
70
+ import jp.co.soramitsu.coredb.migrations.Migration_64_65
70
71
import jp.co.soramitsu.coredb.migrations.RemoveAccountForeignKeyFromAsset_17_18
71
72
import jp.co.soramitsu.coredb.migrations.RemoveLegacyData_35_36
72
73
import jp.co.soramitsu.coredb.migrations.RemoveStakingRewardsTable_22_23
@@ -92,7 +93,7 @@ import jp.co.soramitsu.coredb.model.chain.FavoriteChainLocal
92
93
import jp.co.soramitsu.coredb.model.chain.MetaAccountLocal
93
94
94
95
@Database(
95
- version = 64 ,
96
+ version = 65 ,
96
97
entities = [
97
98
AccountLocal ::class ,
98
99
AddressBookContact ::class ,
@@ -177,6 +178,7 @@ abstract class AppDatabase : RoomDatabase() {
177
178
.addMigrations(Migration_61_62 )
178
179
.addMigrations(Migration_62_63 )
179
180
.addMigrations(Migration_63_64 )
181
+ .addMigrations(Migration_64_65 )
180
182
.build()
181
183
}
182
184
return instance!!
Original file line number Diff line number Diff line change @@ -3,9 +3,16 @@ package jp.co.soramitsu.coredb.migrations
3
3
import androidx.room.migration.Migration
4
4
import androidx.sqlite.db.SupportSQLiteDatabase
5
5
6
+ val Migration_64_65 = object : Migration (64 , 65 ) {
7
+ override fun migrate (db : SupportSQLiteDatabase ) {
8
+ db.execSQL(" DELETE FROM storage" )
9
+ }
10
+ }
11
+
6
12
val Migration_63_64 = object : Migration (63 , 64 ) {
7
13
override fun migrate (db : SupportSQLiteDatabase ) {
8
14
db.execSQL(" ALTER TABLE chains ADD COLUMN `isUsesAppId` INTEGER NOT NULL DEFAULT 0" )
15
+ db.execSQL(" DELETE FROM storage" )
9
16
}
10
17
}
11
18
Original file line number Diff line number Diff line change @@ -189,20 +189,20 @@ class StakingSharedState(
189
189
}
190
190
}
191
191
192
- sealed class StakingAssetSelection (val chainId : ChainId , val chainAssetId : String ) {
192
+ sealed class StakingAssetSelection (open val chainId : ChainId , open val chainAssetId : String ) {
193
193
abstract val type: StakingType
194
194
195
- class RelayChainStaking (chainId : ChainId , chainAssetId : String ) :
195
+ data class RelayChainStaking (override val chainId : ChainId , override val chainAssetId : String ) :
196
196
StakingAssetSelection (chainId, chainAssetId) {
197
197
override val type = StakingType .RELAYCHAIN
198
198
}
199
199
200
- class ParachainStaking (chainId : ChainId , chainAssetId : String ) :
200
+ data class ParachainStaking (override val chainId : ChainId , override val chainAssetId : String ) :
201
201
StakingAssetSelection (chainId, chainAssetId) {
202
202
override val type = StakingType .PARACHAIN
203
203
}
204
204
205
- class Pool (chainId : ChainId , chainAssetId : String ) :
205
+ data class Pool (override val chainId : ChainId , override val chainAssetId : String ) :
206
206
StakingAssetSelection (chainId, chainAssetId) {
207
207
override val type = StakingType .POOL
208
208
}
Original file line number Diff line number Diff line change 1
1
package jp.co.soramitsu.staking.impl.scenarios.relaychain
2
2
3
+ import android.util.Log
3
4
import java.math.BigInteger
4
5
import jp.co.soramitsu.common.data.network.runtime.binding.BinderWithType
5
6
import jp.co.soramitsu.common.data.network.runtime.binding.NonNullBinderWithType
@@ -91,6 +92,7 @@ import kotlinx.coroutines.flow.firstOrNull
91
92
import kotlinx.coroutines.flow.flatMapLatest
92
93
import kotlinx.coroutines.flow.flowOf
93
94
import kotlinx.coroutines.flow.mapLatest
95
+ import kotlinx.coroutines.flow.onEach
94
96
import kotlinx.coroutines.supervisorScope
95
97
import kotlinx.coroutines.withContext
96
98
You can’t perform that action at this time.
0 commit comments