Skip to content

Commit

Permalink
update xcrypto
Browse files Browse the repository at this point in the history
  • Loading branch information
mrZizik committed Oct 9, 2023
1 parent 3b501d1 commit 4037936
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ buildscript {
xserializationjson : '1.5.1',
ktor : '2.3.1',
xbackup : '1.0.0',
xcrypto : '1.0.1',
xcrypto : '1.0.2',
xsubstrate : '1.0.1'
]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ package jp.co.soramitsu.sora.substrate.response
import java.math.BigInteger
import jp.co.soramitsu.common.util.ParseModel
import jp.co.soramitsu.xcrypto.util.fromHex
import jp.co.soramitsu.xcrypto.util.requireHexPrefix
import jp.co.soramitsu.xsubstrate.extensions.fromUnsignedBytes

class FeeResponse2(
Expand Down Expand Up @@ -72,8 +73,3 @@ value class BrokenSubstrateHex(private val originalHex: String?) {
}.fromHex().fromUnsignedBytes()
}
}

fun String.requirePrefix(prefix: String) = if (startsWith(prefix)) this else prefix + this
fun String.requireHexPrefix() = requirePrefix("0x")

// TODO: add to xcrypto

0 comments on commit 4037936

Please sign in to comment.