Repository navigation
feat(tutorials): runnable block for the numbers a payment needs - #420
Open
IanoNjuguna wants to merge 1 commit into
Open
IanoNjuguna wants to merge 1 commit into
IanoNjuguna wants to merge 1 commit into
Conversation
@docusaurus/theme-live-codeblock, one block on the wallet tutorial, and the three numbers a payment form can compute before a wallet is involved: lovelace from ADA, the native-asset unit, and the address prefix that says which network the recipient is on. The wallet calls cannot run in a playground, so the block deliberately stops before them; it is the pure part that a first-timer gets wrong in a wallet rather than in code.
7 of 10 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two config lines, the theme, and one new section in the wallet tutorial.
@docusaurus/theme-live-codeblockturns a fenced block markedjsx liveinto an editable React playground whose output renders under it. The tutorial gains a section between "Build the payment" and "Sign and submit" that computes the three numbers a payment form needs before any wallet is involved:unit, that is policy ID plus asset name in hexA reader who types
addr1…into the recipient field watches the network line change before they ever reach a wallet. That is the mistake the section exists to catch.Part of #419. Stacked on #418.
Type of Change
Testing
Checklist
Verification
Built locally and served the static output, then drove the playground through CDP rather than eyeballing it:
Cost, measured against the deployed site rather than estimated:
So the theme costs about 13 KB raw on the shared bundle and one lazily fetched chunk per page that actually contains a block. Pages without blocks are unchanged.
Notes
@meshsdk/corewould throw in the browser. Those snippets stay ordinary blocks with the copy button, so the section deliberately stops at the arithmetic.