Skip to content

Commit 5523f93

Browse files
committed
Remove unused functions
1 parent 57929ba commit 5523f93

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

kotlin/wallet-core-kotlin/src/iosMain/kotlin/com/trustwallet/core/AnySigner.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ actual object AnySigner {
1010

1111
actual fun sign(input: ByteArray, coin: CoinType): ByteArray {
1212
val inputData = TWDataCreateWithBytes(input.toUByteArray().toCValues(), input.size.toULong())
13-
val result = TWAnySignerSign(input.toTwData(), coin.value)!!.readTwBytes()!!
13+
val result = TWAnySignerSign(inputData, coin.value)!!.readTwBytes()!!
1414
TWDataDelete(inputData)
1515
return result
1616
}
@@ -29,7 +29,7 @@ actual object AnySigner {
2929

3030
actual fun plan(input: ByteArray, coin: CoinType): ByteArray {
3131
val inputData = TWDataCreateWithBytes(input.toUByteArray().toCValues(), input.size.toULong())
32-
val result = TWAnySignerPlan(input.toTwData(), coin.value)?.readTwBytes()!!
32+
val result = TWAnySignerPlan(inputData, coin.value)?.readTwBytes()!!
3333
TWDataDelete(inputData)
3434
return result
3535
}

kotlin/wallet-core-kotlin/src/iosMain/kotlin/com/trustwallet/core/ByteArrayExt.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,3 @@ internal fun COpaquePointer?.readTwBytes(): ByteArray? =
1515
TWDataDelete(it)
1616
result
1717
}
18-
19-
@OptIn(ExperimentalUnsignedTypes::class)
20-
internal fun ByteArray?.toTwData(): COpaquePointer? =
21-
TWDataCreateWithBytes(this?.toUByteArray()?.toCValues(), this?.size?.toULong() ?: 0u)

kotlin/wallet-core-kotlin/src/iosMain/kotlin/com/trustwallet/core/StringExt.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,9 @@
44

55
package com.trustwallet.core
66

7-
import kotlinx.cinterop.COpaquePointer
87
import kotlinx.cinterop.CValuesRef
98
import kotlinx.cinterop.toKString
109

11-
internal fun String?.toTwString(): COpaquePointer? =
12-
this?.let { TWStringCreateWithUTF8Bytes(it) }
13-
1410
// Build String from TWString, and then delete TWString
1511
internal fun CValuesRef<*>?.fromTwString(): String? =
1612
this?.let {

0 commit comments

Comments
 (0)