diff --git a/rpc/client_test.go b/rpc/client_test.go index c2ad88bf..d6857718 100644 --- a/rpc/client_test.go +++ b/rpc/client_test.go @@ -173,7 +173,7 @@ func TestClient_GetConfirmedTransaction(t *testing.T) { signature, err := solana.SignatureFromBase58("53hoZ98EsCMA6L63GWM65M3Bd3WqA4LxD8bcJkbKoKWhbJFqX9M1WZ4fSjt8bYyZn21NwNnV2A25zirBni9Qk6LR") require.NoError(t, err) - assert.Equal(t, TransactionWithMeta{ + assert.Equal(t, &TransactionWithMeta{ Transaction: &solana.Transaction{ Message: solana.Message{ Header: solana.MessageHeader{NumRequiredSignatures: 1, NumReadonlySignedAccounts: 0, NumReadonlyUnsignedAccounts: 3}, diff --git a/rpc/deprecated.go b/rpc/deprecated.go index 688d2419..7e7afb92 100644 --- a/rpc/deprecated.go +++ b/rpc/deprecated.go @@ -41,10 +41,16 @@ func (cl *Client) GetConfirmedBlock( func (cl *Client) GetConfirmedTransaction( ctx context.Context, signature solana.Signature, -) (out TransactionWithMeta, err error) { +) (out *TransactionWithMeta, err error) { params := []interface{}{signature, "json"} err = cl.rpcClient.CallFor(&out, "getConfirmedTransaction", params) + if err != nil { + return nil, err + } + if out == nil { + return nil, ErrNotFound + } return }