Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[KMP]: Fix COpaquePointer?.readTwBytes() function extension panic #4183

Closed
wants to merge 1 commit into from

Conversation

satoshiotomakan
Copy link
Collaborator

@satoshiotomakan satoshiotomakan commented Dec 23, 2024

Fix COpaquePointer?.readTwBytes() function extension panic on iOS KMP

Description

How to test

Types of changes

Checklist

  • Create pull request as draft initially, unless its complete.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • If there is a related Issue, mention it in the description.

If you're adding a new blockchain

  • I have read the guidelines for adding a new blockchain.

Copy link

Binary size comparison

➡️ aarch64-apple-ios: 12.31 MB

➡️ aarch64-apple-ios-sim: 12.31 MB

➡️ aarch64-linux-android: 15.83 MB

➡️ armv7-linux-androideabi: 13.50 MB

➡️ wasm32-unknown-emscripten: 11.23 MB

@10gic
Copy link
Contributor

10gic commented Dec 23, 2024

This issue has already been fixed in the dev branch, so please merge the dev branch. 😄

internal fun COpaquePointer?.readTwBytes(): ByteArray? =
this?.let {
val result = TWDataBytes(it)?.readBytes(TWDataSize(it).toInt())
TWDataDelete(it)
result
}

@satoshiotomakan
Copy link
Collaborator Author

Hi @10gic, nice, I'll merge dev today 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants