Skip to content

Commit aff0cb4

Browse files
authored
Merge pull request #1167 from soramitsu/staging
Staging
2 parents a29947b + e3aa645 commit aff0cb4

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ apply plugin: "org.sonarqube"
55
buildscript {
66
ext {
77
// App version
8-
versionName = '3.5.3'
9-
versionCode = 184
8+
versionName = '3.5.5'
9+
versionCode = 186
1010

1111
// SDK and tools
1212
compileSdkVersion = 34

feature-staking-impl/src/main/java/jp/co/soramitsu/staking/impl/scenarios/relaychain/StakingRelayChainScenarioRepository.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ class StakingRelayChainScenarioRepository(
304304
chainId: ChainId,
305305
accountIdsHex: List<String>
306306
): AccountIdMap<ValidatorPrefs?> {
307-
return localStorage.queryKeys(
307+
return remoteStorage.queryKeys(
308308
keysBuilder = { runtime ->
309309
val storage = runtime.metadata.stakingOrNull()?.storage("Validators")
310310
?: return@queryKeys emptyMap()

feature-wallet-api/src/main/java/jp/co/soramitsu/wallet/impl/domain/implementations/ExistentialDepositUseCaseImpl.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ class ExistentialDepositUseCaseImpl(
3838
val chainId = chainAsset.chainId
3939

4040
val existentialDepositResult = kotlin.runCatching {
41-
val runtime = chainRegistry.getRuntime(chainId)
41+
val runtime = chainRegistry.getRuntimeOrNull(chainId)
42+
?: return@runCatching BigInteger.ZERO
43+
4244
when (chainAsset.typeExtra) {
4345
null,
4446
ChainAssetType.Normal,

feature-wallet-impl/src/main/java/jp/co/soramitsu/wallet/impl/data/network/blockchain/WssSubstrateSource.kt

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ class WssSubstrateSource(
317317
ChainAssetType.Token2,
318318
ChainAssetType.AssetId,
319319
ChainAssetType.Xcm,
320-
ChainAssetType.Stable -> ormlAssetTransfer(accountId, transfer)
320+
ChainAssetType.Stable -> ormlAssetTransfer(accountId, transfer, typeRegistry)
321321

322322
ChainAssetType.Equilibrium -> equilibriumAssetTransfer(accountId, transfer)
323323

@@ -356,16 +356,28 @@ class WssSubstrateSource(
356356

357357
private fun ExtrinsicBuilder.ormlAssetTransfer(
358358
accountId: AccountId,
359-
transfer: Transfer
360-
) = call(
361-
moduleName = Modules.CURRENCIES,
362-
callName = "transfer",
363-
arguments = mapOf(
364-
"dest" to DictEnum.Entry("Id", accountId),
365-
"currency_id" to transfer.chainAsset.currency,
366-
"amount" to transfer.amountInPlanks
359+
transfer: Transfer,
360+
typeRegistry: TypeRegistry
361+
): ExtrinsicBuilder {
362+
@Suppress("IMPLICIT_CAST_TO_ANY")
363+
val dest = when (typeRegistry["Address"]) {
364+
is FixedByteArray -> accountId // asset type 'assetId'
365+
else -> DictEnum.Entry(
366+
name = "Id",
367+
value = accountId
368+
)
369+
}
370+
371+
return call(
372+
moduleName = Modules.CURRENCIES,
373+
callName = "transfer",
374+
arguments = mapOf(
375+
"dest" to dest,
376+
"currency_id" to transfer.chainAsset.currency,
377+
"amount" to transfer.amountInPlanks
378+
)
367379
)
368-
)
380+
}
369381

370382
private fun ExtrinsicBuilder.soraAssetTransfer(
371383
accountId: AccountId,

0 commit comments

Comments
 (0)