From 3fea672714c6b6c80f40cac87c0f90f5179a46ad Mon Sep 17 00:00:00 2001 From: homura Date: Wed, 27 Sep 2023 16:45:00 +0800 Subject: [PATCH] feat(rpc): added `unknown | rejected` to `TxStatus` --- .changeset/old-houses-smell.md | 5 +++++ packages/rpc/src/types/rpc.ts | 8 +++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .changeset/old-houses-smell.md diff --git a/.changeset/old-houses-smell.md b/.changeset/old-houses-smell.md new file mode 100644 index 000000000..3d18193ae --- /dev/null +++ b/.changeset/old-houses-smell.md @@ -0,0 +1,5 @@ +--- +"@ckb-lumos/rpc": minor +--- + +`unknown` and `rejected` are available in the `TransactionWithStatus` diff --git a/packages/rpc/src/types/rpc.ts b/packages/rpc/src/types/rpc.ts index 3cb2a23f9..29bfb3315 100644 --- a/packages/rpc/src/types/rpc.ts +++ b/packages/rpc/src/types/rpc.ts @@ -43,6 +43,8 @@ export namespace RPC { Pending = "pending", Proposed = "proposed", Committed = "committed", + Unknown = "unknown", + Rejected = "rejected", } export type DepType = "code" | "dep_group"; @@ -118,7 +120,11 @@ export namespace RPC { } | { block_hash: undefined; - status: TransactionStatus.Pending | TransactionStatus.Proposed; + status: + | TransactionStatus.Pending + | TransactionStatus.Proposed + | TransactionStatus.Rejected + | TransactionStatus.Unknown; }; time_added_to_pool: Uint64 | null; cycles: Uint64 | null;