SolanaKeypairWalletProvider returns a signature when confirmation reports an execution error

Abierto Apto para principiantes
#1,615 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@snuff12 ya está trabajando en esto.

Desde el 1/11/2026.

  • #1616 de @snuff12 — abierto

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
70/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript
Área
blockchain

Línea de trabajo

El error está en typescript/agentkit/src/wallet-providers/solanaKeypairWalletProvider.ts: el resultado de confirmación de confirmTransaction se espera con await, pero nunca se comprueba su value.err. Empieza por los tres métodos sendTransaction, signAndSendTransaction y nativeTransfer, y por el fixture de Jest existente del proveedor que simula Connection. Está terminado cuando un value.err no nulo rechaza con la firma y el error de ejecución, null sigue resolviendo con la firma y las excepciones de envío o de confirmación siguen propagándose.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
TypeScript
Estrellas
1.4k
Forks
900
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coinbase/agentkit

Todos los issues de coinbase/agentkit

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.