Skip to content

Commit

Permalink
Added support TON-SDK 1.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdorofeev committed Mar 26, 2022
1 parent 3b9362e commit a4f9087
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/main/kotlin/ee/nx01/tonclient/TonClient.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,14 @@ class TonClient(val config: TonClientConfig = TonClientConfig()) {
logger.info { "Request to TONSDK: requestId=$requestId context=$context" }
TONSDKJsonApi.jsonRequestAsync(context, requestId, method, params, object : Handler {
override fun invoke(result: String, error: String, responseType: Int) {
val tonResponseType = TonResponseType.fromIntRepresentation(responseType)

if (tonResponseType == TonResponseType.Nop) {
return
}

try {
onResult(TonClientResponse(result, error, TonResponseType.fromIntRepresentation(responseType)))
onResult(TonClientResponse(result, error, tonResponseType))
} catch (e: Exception) {
logger.error(e.message, e)
}
Expand Down
Binary file modified src/main/resources/natives/linux_64/libtonclientjni.so
Binary file not shown.
Binary file modified src/main/resources/natives/osx_arm64/libtonclientjni.dylib
Binary file not shown.
Binary file modified src/main/resources/natives/windows_64/tonclientjni.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion src/test/kotlin/ee/nx01/tonclient/TestConstants.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ object TestConstants {
val WALLET_ADDRESS = "0:7f458ae01e28573a181e2227dc77710d6421d4e103fdd3e023200aa4bce83950"
val MESSAGE_ID = "3bb0b9c0d883c554ea072d5c7baae1d95b4e1f8648d4618e427ac478fccde2b7"
val BLOCK_ID = 461728f
val TRANSACTION_ID = "c289bae33734e680b73d5ec61c98baa6c8bc929b4536a2d43e7940d193d87e3c"
val TRANSACTION_ID = "888454fa9327e976a62f9e4213a44a683df541486beeee8e9a360bf9bced34b5"
val KEY_BLOCK_ID = "ca4d47f585e5cefd90ba91ab3fed22d0ffd0bfa21f7c0f530bb7d381df8db7c5"
val WALLET_SECRET = "db16e21ee91b5064f6e31d9a2fb4771ce7f8acf14fe6d6ffade8ffcbeec31d69"
val WALLET_PUBLIC = "335c317bfef32545749a665bfec97f692fdc107d0867a1a1e1b2d2906b40d24c"
Expand Down
2 changes: 1 addition & 1 deletion src/test/kotlin/ee/nx01/tonclient/net/NetModuletTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import kotlinx.coroutines.sync.Mutex

class NetModuletTest : StringSpec({

"Subscribe on account and suspend and resume" {
"Subscribe on account and suspend and resume".config(enabled = true) {
val client = TonClient()

val mutex = Mutex(true)
Expand Down

0 comments on commit a4f9087

Please sign in to comment.