Skip to content

Commit 8a93370

Browse files
fixed some bugs
1 parent 2f2b197 commit 8a93370

File tree

1 file changed

+0
-28
lines changed
  • app/src/main/kotlin/io/github/hosseinkarami_dev/near/rpc/client_app

1 file changed

+0
-28
lines changed

app/src/main/kotlin/io/github/hosseinkarami_dev/near/rpc/client_app/MainActivity.kt

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import io.github.hosseinkarami_dev.near.rpc.client.Utils.getResultOrNull
99
import io.github.hosseinkarami_dev.near.rpc.models.BlockId
1010
import io.github.hosseinkarami_dev.near.rpc.models.RpcBlockRequest
1111
import io.github.hosseinkarami_dev.near.rpc.models.RpcBlockResponse
12-
import io.github.hosseinkarami_dev.near.rpc.models.RpcTransactionStatusRequest
13-
import io.github.hosseinkarami_dev.near.rpc.models.SignedTransaction
14-
import io.github.hosseinkarami_dev.near.rpc.models.TxExecutionStatus
1512
import io.ktor.client.HttpClient
1613
import io.ktor.client.engine.cio.CIO
1714
import io.ktor.client.plugins.contentnegotiation.ContentNegotiation
@@ -33,7 +30,6 @@ class MainActivity : ComponentActivity() {
3330
baseUrl = "https://rpc.mainnet.near.org" // or testnet: https://rpc.testnet.near.org
3431
)
3532

36-
lifecycleScope.launch {
3733
lifecycleScope.launch {
3834
val response = nearClient.block(
3935
RpcBlockRequest.BlockId(BlockId.BlockHeight(167440515.toULong()))
@@ -49,31 +45,7 @@ class MainActivity : ComponentActivity() {
4945
println("Result: $result")
5046

5147
}
52-
}
5348
}
54-
55-
//
56-
// lifecycleScope.launch {
57-
// val response = nearClient.tx(
58-
// RpcTransactionStatusRequest.SignedTxBase64(
59-
// signedTxBase64 = SignedTransaction("FtzDPgG7BnX3g6WV7w951TZ1UErFahfp6NwQKiTE9dMp"),
60-
// waitUntil = TxExecutionStatus.Final
61-
// ))
62-
// // val response = nearClient.status()
63-
//// val response = nearClient.gasPrice(RpcGasPriceRequest(blockId = null))
64-
//
65-
// when (response) {
66-
// is RpcResponse.Failure -> {
67-
// println("Error: ${response.error}")
68-
// }
69-
//
70-
// is RpcResponse.Success -> {
71-
// val result = response.result
72-
// println("Result: $result")
73-
//
74-
// }
75-
// }
76-
// }
7749
}
7850
}
7951
}

0 commit comments

Comments
 (0)