Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
valentunn committed Dec 16, 2024
1 parent 364e21c commit b10c671
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private fun Extrinsic.ExtrinsicType.GeneralTransaction.findSignatureInExplicits(
fun extractAccountId(dynamicInstance: Any?): AccountId =
when (dynamicInstance) {
// MultiAddress
is DictEnum.Entry<*> -> {
is DictEnum.Entry<*> -> {
require(dynamicInstance.name == "Id")

dynamicInstance.value as AccountId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sealed class ExtrinsicVersion {

class V4(
val verifySignatureMode: VerifySignatureMode,
): ExtrinsicVersion()
) : ExtrinsicVersion()

class V5(
val extensionVersion: Byte = EXTENSIONS_VERSION_DEFAULT,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ internal abstract class BaseInheritedImplication(
val runtime: RuntimeSnapshot
) : InheritedImplication {


protected abstract fun ScaleCodecWriter.encodeImplication()

final override fun encoded(): ByteArray {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ import io.novasama.substrate_sdk_android.runtime.extrinsic.v5.GeneralTransaction
interface TransactionBuildingPipeline {

suspend fun constructExtrinsicType(generalTransactionParams: GeneralTransactionParams): Extrinsic.ExtrinsicType
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ class TransactionBuildingPipelineV5(
)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import io.novasama.substrate_sdk_android.runtime.metadata.TransactionExtensionMe
class TransactionExtensionPipelineV4(
private val runtime: RuntimeSnapshot,
private val extrinsicVersion: ExtrinsicVersion.V4
): TransactionBuildingPipeline {
) : TransactionBuildingPipeline {

override suspend fun constructExtrinsicType(
generalTransactionParams: GeneralTransactionParams
Expand Down Expand Up @@ -81,4 +81,4 @@ class TransactionExtensionPipelineV4(
)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ fun List<SucceedingExtensionValues>.mutableExplicitsMap(): MutableMap<Transactio

fun List<SucceedingExtensionValues>.explicitsMap(): Map<TransactionExtensionId, Any?> {
return mutableExplicitsMap()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import io.novasama.substrate_sdk_android.runtime.AccountId
import io.novasama.substrate_sdk_android.runtime.RuntimeSnapshot
import io.novasama.substrate_sdk_android.runtime.definitions.types.composite.DictEnum
import io.novasama.substrate_sdk_android.runtime.definitions.types.composite.Struct
import io.novasama.substrate_sdk_android.runtime.definitions.types.generics.Extrinsic
import io.novasama.substrate_sdk_android.runtime.definitions.types.instances.AddressInstanceConstructor
import io.novasama.substrate_sdk_android.runtime.definitions.types.instances.SignatureInstanceConstructor
import io.novasama.substrate_sdk_android.runtime.extrinsic.ExtrinsicVersion
import io.novasama.substrate_sdk_android.runtime.extrinsic.signer.PAYLOAD_HASH_THRESHOLD
Expand Down

0 comments on commit b10c671

Please sign in to comment.