Feat: add fabric channel snapshot command with 4 operations, submitRequest, listPending, cancelRequest, joinBySnapshot, and their corresponding test #122

Closed
casper900212 wants to merge 17 commits from feat/FabricChannelSnapshot into 3.4.0
casper900212 commented 2025-04-21 22:33:30 -04:00 (Migrated from github.com)

PULL REQUEST

Before

說明 (Description)

相關問題 (Linked Issues)

貢獻種類 (Type of change)

  • Bug fix (除錯 non-breaking change which fixes an issue)
  • New feature (增加新功能 non-breaking change which adds functionality)
  • Breaking change (可能導致相容性問題 fix or feature that would cause existing functionality to not work as expected)
  • Doc change (需要更新文件 this change requires a documentation update)

測試環境 (Test Configuration):

  • OS: Linux
  • NodeJS Version: 18.19.1
  • NPM Version: 9.2.0
  • Docker Version: 27.5.0

檢查清單 (Checklist):

  • 我的程式碼遵從此專案的規範 (My code follows the style guidelines of this project)
  • 我有對於自己的程式碼進行測試檢查 (I have performed a self-review of my own code)
  • 我有在程式碼中提供必要的註解 (I have commented my code, particularly in hard-to-understand areas)
  • 我有在文件中進行必要的更動 (I have made corresponding changes to the documentation)
  • 我的程式碼更動沒有顯著增加錯誤數量 (My changes generate no new warnings)
  • 我有新增必要的單元測試 (I have added tests that prove my fix is effective or that my feature works)
  • 我有檢查並更正程式碼錯誤的拼字 (I have checked my code and corrected any misspellings)

我已完成以上清單,並且同意遵守 Code of Conduct

I have completed the checklist and agree to abide by the code of conduct.

  • 同意 (I consent)
# PULL REQUEST ## Before <!-- Please check the one that applies to this PR using "x". --> - [x] 遵守 Commit 規範 (follow [commit convention](https://github.com/cathayddt/bdk/blob/master/.github/COMMIT_CONVENTION.md)) - [x] 遵守 Contributing 規範 (follow [contributing](https://github.com/cathayddt/bdk/blob/master/.github/CONTRIBUTING.md)) ## 說明 (Description) <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> <!--請簡單說明此PR的更動、被修復的問題以及相關的原因,並請列出這個更動所需要的任何相依模組/套件。 Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.--> ## 相關問題 (Linked Issues) <!-- - Related issues linked `fixes #number` - Tests added. Pass Coverage. - Errors have a helpful link. --> ## 貢獻種類 (Type of change) - [ ] Bug fix (除錯 non-breaking change which fixes an issue) - [x] New feature (增加新功能 non-breaking change which adds functionality) - [x] Breaking change (可能導致相容性問題 fix or feature that would cause existing functionality to not work as expected) - [x] Doc change (需要更新文件 this change requires a documentation update) **測試環境 (Test Configuration)**: * OS: Linux * NodeJS Version: 18.19.1 * NPM Version: 9.2.0 * Docker Version: 27.5.0 ## 檢查清單 (Checklist): - [x] 我的程式碼遵從此專案的規範 (My code follows the style guidelines of this project) - [x] 我有對於自己的程式碼進行測試檢查 (I have performed a self-review of my own code) - [x] 我有在程式碼中提供必要的註解 (I have commented my code, particularly in hard-to-understand areas) - [x] 我有在文件中進行必要的更動 (I have made corresponding changes to the documentation) - [x] 我的程式碼更動沒有顯著增加錯誤數量 (My changes generate no new warnings) - [x] 我有新增必要的單元測試 (I have added tests that prove my fix is effective or that my feature works) - [x] 我有檢查並更正程式碼錯誤的拼字 (I have checked my code and corrected any misspellings) 我已完成以上清單,並且同意遵守 [Code of Conduct](CODE_OF_CONDUCT.md) I have completed the checklist and agree to abide by the [code of conduct](CODE_OF_CONDUCT.md). - [x] 同意 (I consent)
kth-tw (Migrated from github.com) reviewed 2025-04-21 22:33:30 -04:00
Yorkchung (Migrated from github.com) reviewed 2025-05-15 05:43:16 -04:00
@ -1,6 +1,6 @@
{
Yorkchung (Migrated from github.com) commented 2025-05-15 05:43:15 -04:00

This is version 3.4.0.

This is version 3.4.0.
Yorkchung (Migrated from github.com) reviewed 2025-05-15 05:44:36 -04:00
@ -44,7 +44,7 @@
"test:fabric": "nyc npm run test -- --grep Fabric",
Yorkchung (Migrated from github.com) commented 2025-05-15 05:44:36 -04:00

This is version 3.4.0.

This is version 3.4.0.
Yorkchung (Migrated from github.com) reviewed 2025-05-15 05:48:17 -04:00
@ -90,9 +90,9 @@ const config: Config = {
orgDomainName: process.env.BDK_ORG_DOMAIN || '',
Yorkchung (Migrated from github.com) commented 2025-05-15 05:48:17 -04:00

An upgrade to version 2.5 might be possible, but it requires testing to ensure there are no issues.

An upgrade to version 2.5 might be possible, but it requires testing to ensure there are no issues.
Yorkchung (Migrated from github.com) reviewed 2025-05-15 05:50:15 -04:00
@ -391,4 +394,89 @@ export default class FabricInstance extends AbstractInstance {
undefined,
Yorkchung (Migrated from github.com) commented 2025-05-15 05:50:15 -04:00

Avoid using non-null assertions (!) on environment variables. Please add a proper null/undefined check to ensure safety.

Avoid using non-null assertions (!) on environment variables. Please add a proper null/undefined check to ensure safety.
Yorkchung (Migrated from github.com) reviewed 2025-05-15 05:50:52 -04:00
@ -391,4 +394,89 @@ export default class FabricInstance extends AbstractInstance {
undefined,
Yorkchung (Migrated from github.com) commented 2025-05-15 05:50:52 -04:00

Avoid using non-null assertions (!) on environment variables.

Avoid using non-null assertions (!) on environment variables.
Yorkchung (Migrated from github.com) reviewed 2025-05-15 05:50:58 -04:00
@ -391,4 +394,89 @@ export default class FabricInstance extends AbstractInstance {
undefined,
Yorkchung (Migrated from github.com) commented 2025-05-15 05:50:57 -04:00

Avoid using non-null assertions (!) on environment variables.

Avoid using non-null assertions (!) on environment variables.
Yorkchung (Migrated from github.com) reviewed 2025-05-15 05:52:23 -04:00
Yorkchung commented 2025-05-15 06:04:02 -04:00 (Migrated from github.com)

Remember to update the README and docs/fabric/EXAMPLE.md.

Remember to update the README and docs/fabric/EXAMPLE.md.
casper900212 (Migrated from github.com) reviewed 2025-05-25 23:50:04 -04:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cathayddt/bdk!122
No description provided.