diff --git a/kotlin/wallet-core-kotlin/src/iosMain/kotlin/com/trustwallet/core/StringExt.kt b/kotlin/wallet-core-kotlin/src/iosMain/kotlin/com/trustwallet/core/StringExt.kt index 2c23168563d..19f224a22b7 100644 --- a/kotlin/wallet-core-kotlin/src/iosMain/kotlin/com/trustwallet/core/StringExt.kt +++ b/kotlin/wallet-core-kotlin/src/iosMain/kotlin/com/trustwallet/core/StringExt.kt @@ -11,7 +11,7 @@ import kotlinx.cinterop.CValuesRef import kotlinx.cinterop.toKString internal fun String?.toTwString(): COpaquePointer? = - TWStringCreateWithUTF8Bytes(this) + this?.let { TWStringCreateWithUTF8Bytes(it) } internal fun CValuesRef<*>?.fromTwString(): String? = - TWStringUTF8Bytes(this)?.toKString() + this?.let { TWStringUTF8Bytes(it)?.toKString() }