diff --git a/packages/rpc/src/resultFormatter.ts b/packages/rpc/src/resultFormatter.ts index 7aa189dd1..c5384210e 100644 --- a/packages/rpc/src/resultFormatter.ts +++ b/packages/rpc/src/resultFormatter.ts @@ -333,6 +333,9 @@ const toTransactionWithStatus = ( txStatus: { blockHash, status, + ...("reason" in txWithStatus.tx_status + ? { reason: txWithStatus.tx_status.reason } + : {}), }, timeAddedToPool: time_added_to_pool, ...rest, diff --git a/packages/rpc/src/types/rpc.ts b/packages/rpc/src/types/rpc.ts index 29bfb3315..3eaff27ba 100644 --- a/packages/rpc/src/types/rpc.ts +++ b/packages/rpc/src/types/rpc.ts @@ -125,6 +125,7 @@ export namespace RPC { | TransactionStatus.Proposed | TransactionStatus.Rejected | TransactionStatus.Unknown; + reason?: string; }; time_added_to_pool: Uint64 | null; cycles: Uint64 | null;