SPIKE: CAP-71 support — env-var custom network + drop stale @ts-expect-error#1
Draft
sisuresh wants to merge 1 commit into
Draft
SPIKE: CAP-71 support — env-var custom network + drop stale @ts-expect-error#1sisuresh wants to merge 1 commit into
sisuresh wants to merge 1 commit into
Conversation
…t-error Two minimal lab-source changes required to render Protocol 27 / CAP-71 transactions: 1. src/store/createStore.ts: parameterize defaultCustomNetwork via three new NEXT_PUBLIC_CUSTOM_{HORIZON_URL,RPC_URL,PASSPHRASE} env vars (falls back to the existing :8000 defaults). Quickstart's bundled lab is started with NEXT_PUBLIC_DEFAULT_NETWORK=custom but currently has no way to also supply the URLs; the only options were a hard-coded localhost:8000 (which only works inside the container) or asking the user to enter them in the network UI before any deep link works. With this PR the bundled lab can be parameterized at start time. 2. src/app/(sidebar)/transactions-explorer/tx/[tx]/components/TransactionDetails.tsx: drop a stale '@ts-expect-error' directive. With CAP-71-aware XDR types the tx.envelopeXdr.value().tx().innerTx().value().tx() expression now typechecks naturally; the directive becomes 'unused' and fails the Next.js production build. Companion fork PRs: - sisuresh/js-stellar-base#... (XDR regen at .x@5187e69 with cap_0071+cap_0083 + inline-const post-process) - sisuresh/js-stellar-sdk#... (browser dist rebuilt against patched stellar-base) - sisuresh/js-stellar-xdr-json#... (wasm decoder at rs-stellar-xdr@a749b69b features=[cap_0071]) Used to render a live CAP-71-01 (WITH_DELEGATES) transaction end-to-end through a local Quickstart Protocol 27 build.
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.
SPIKE: two minimal lab-source changes needed to render Protocol 27 / CAP-71 transactions.
src/store/createStore.ts: parameterizedefaultCustomNetworkvia three newNEXT_PUBLIC_CUSTOM_{HORIZON_URL,RPC_URL,PASSPHRASE}env vars. Falls back to the existing:8000defaults. The Quickstart-bundled lab is started withNEXT_PUBLIC_DEFAULT_NETWORK=custombut currently has no way to also supply the URLs; the only options were a hard-codedlocalhost:8000(only works inside the container) or asking the user to enter them in the network UI before any deep link works.src/app/(sidebar)/transactions-explorer/tx/[tx]/components/TransactionDetails.tsx: drop a stale@ts-expect-error. With CAP-71-aware XDR types thetx.envelopeXdr.value().tx().innerTx().value().tx()expression typechecks naturally; the directive becomes "unused" and fails the Next.js production build.Companion fork PRs:
rs-stellar-xdr@a749b69b+cap_0071)