SolanaKeypairWalletProvider returns a signature when confirmation reports an execution error

Đang mở Phù hợp với người mới
#1,615 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@snuff12 đang làm issue này rồi.

Từ ngày 1/11/2026.

  • #1616 của @snuff12 — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
70/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
blockchain

Hướng nghiên cứu

Lỗi nằm trong typescript/agentkit/src/wallet-providers/solanaKeypairWalletProvider.ts: kết quả xác nhận từ confirmTransaction được await, nhưng value.err của nó không bao giờ được kiểm tra. Hãy bắt đầu với ba phương thức sendTransaction, signAndSendTransaction và nativeTransfer, cùng fixture Jest hiện có của provider đang mock Connection. Hoàn thành khi value.err khác null khiến promise bị reject kèm chữ ký và lỗi thực thi, khi null vẫn resolve với chữ ký, và khi các ngoại lệ gửi giao dịch hoặc xác nhận vẫn tiếp tục được lan truyền.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

SolanaKeypairWalletProvider waits for confirmation but discards the returned value.err. A transaction can therefore be submitted and confirmed with an execution failure while sendTransaction, signAndSendTransaction, and nativeTransfer resolve with its signature.

Affected code

Reproduced against main at f2f3e8c11a91d56a17979a229a172ba6e61a85c2, in typescript/agentkit/src/wallet-providers/solanaKeypairWalletProvider.ts.

Reproduction

In the existing provider Jest fixture, let Connection.sendTransaction resolve to signature123 and Connection.confirmTransaction resolve to:

{
  context: { slot: 1 },
  value: { err: { InstructionError: [0, { Custom: 7 }] } },
}

Invoke each of sendTransaction(tx), signAndSendTransaction(tx), and nativeTransfer(to, amount) with the existing valid transaction/balance fixtures. All three resolve to signature123 on the unmodified source. They do not reject, even though the confirmation explicitly reports failed execution. This can occur when execution fails after submission/preflight; a resolved confirmation promise alone does not imply successful execution.

Expected result and impact

Reject with an error carrying the submitted signature and execution error. Continue returning the signature when value.err === null, and preserve submission/confirmation exceptions. Otherwise callers can treat a failed transfer as successfully completed.

Verification

Three regression cases fail on the original source (21 other provider tests pass); the patched provider passes all 24. This reproduction uses controlled RPC results and does not spend funds or claim a live-network transaction.

Related: #1558 concerns EVM/ERC20 receipt status; this report concerns the separate Solana keypair provider and its confirmation result.

AI-assisted investigation and regression tests, prepared with Codex.

Ngôn ngữ chính
TypeScript
Star
1.3k
Fork
889
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coinbase/agentkit

Tất cả issue của coinbase/agentkit

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.