Skip to content

Update simple-game to be the version of using fiber-sdk#58

Open
ashuralyk wants to merge 1 commit intonervosnetwork:masterfrom
ashuralyk:patch-1
Open

Update simple-game to be the version of using fiber-sdk#58
ashuralyk wants to merge 1 commit intonervosnetwork:masterfrom
ashuralyk:patch-1

Conversation

@ashuralyk
Copy link
Copy Markdown

There soon would be an official fiber-sdk to ship fiber development simplicity to the public, so for the best exploration of it, it's good to apply demo changes directly on fiber-docs here.

note: some file changes are from code formatter.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 3, 2026

@ashuralyk is attempting to deploy a commit to the cryptape Team on Vercel.

A member of the Team first needs to authorize it.

@RetricSu RetricSu requested a review from HappySonnyDev April 8, 2026 05:40
@HappySonnyDev
Copy link
Copy Markdown
Collaborator

HappySonnyDev commented Apr 10, 2026

@ashuralyk
Thanks for the PR! The SDK integration looks great and will definitely make it easier for developers to get started with Fiber. I have a couple of suggestions:

  1. Could you update the repository links to point to https://github.com/nervosnetwork/fiber-docs/tree/master/example/simple-game instead of the personal repo? Keeping the example under the official organization repo would help with long-term maintenance and make it easier for users to find and trust the code.. You may also need to update the code under the example directory accordingly.

  2. Would you mind separating the code formatting changes into a separate commit? It would make the review process much easier if the functional changes (SDK integration) and the style/formatting changes were in distinct commits.

Let me know what you think!

@15168316096
Copy link
Copy Markdown

@ashuralyk
Following the documentation, several issues arose:

The repository link shifted from the official repository to a personal repository, which is detrimental to long-term maintenance. --repeat issue

The code in the simple-game directory was not updated synchronously. The PR only modified the documentation, but the actual code in the local simple-game directory remains the old version. If users clone the official repository's simple-game as per the documentation, the code is completely incompatible with the documentation.

The newInvoice function lacks the finalExpiryDelta parameter. According to the documentation example from @ckb-ccc/fiber on npm, the finalExpiryDelta parameter is required:
sdk.newInvoice({ amount, currency, paymentPreimage, description, expiry, finalExpiryDelta: "0x9283C0", // <-- The code in the PR didn't include this
})

The return value structure of listChannels has changed. The SDK version of listChannels directly returns a Channel[] array, while the old version returns a { channels: Channel[] } wrapper object. The code in the PR documentation correctly accommodates this, but simple-game hasn't changed it.

The peerID has been hardcoded to change, and this part hasn't been updated in sync with the peerID in the example code block (the documentation still shows the old peerID as an example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants