Skip to content

Commit

Permalink
Merge pull request #144 from avianlabs/guillermo/nullability
Browse files Browse the repository at this point in the history
correct nullability for a few methods
  • Loading branch information
wiyarmir authored Oct 15, 2024
2 parents f5fd389 + bbf4dad commit 06c704b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import kotlinx.serialization.json.buildJsonArray
import kotlinx.serialization.json.put
import net.avianlabs.solana.SolanaClient
import net.avianlabs.solana.client.Response
import net.avianlabs.solana.client.Response.RPC
import net.avianlabs.solana.domain.core.Commitment
import net.avianlabs.solana.tweetnacl.ed25519.PublicKey

public suspend fun SolanaClient.getAccountInfo(
publicKey: PublicKey,
commitment: Commitment? = null,
): Response<Response.RPC<AccountInfo>> = invoke(
): Response<RPC<AccountInfo?>> = invoke(
method = "getAccountInfo",
params = buildJsonArray {
add(publicKey.toBase58())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import net.avianlabs.solana.domain.core.Commitment
public suspend fun SolanaClient.getFeeForMessage(
message: ByteArray,
commitment: Commitment? = null
): Response<RPC<Long>> = invoke(
): Response<RPC<Long?>> = invoke(
method = "getFeeForMessage",
params = buildJsonArray {
add(message.encodeBase64())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import net.avianlabs.solana.tweetnacl.ed25519.PublicKey
public suspend fun SolanaClient.getTokenAccountBalance(
tokenAccount: PublicKey,
commitment: Commitment? = null,
): Response<RPC<TokenAmountInfo>> = invoke(
): Response<RPC<TokenAmountInfo?>> = invoke(
method = "getTokenAccountBalance",
params = buildJsonArray {
add(tokenAccount.toBase58())
Expand Down

0 comments on commit 06c704b

Please sign in to comment.