Repository navigation
docs: add doc comments to use-token-price, contract, hidden-streams and streams-cache - #865
Merged
Austinaminu2 merged 1 commit intoSep 26, 2026
Conversation
…treams-cache exports Closes FlowwStar#785, FlowwStar#786, FlowwStar#787, FlowwStar#788
|
@frienzy514-png Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Adds JSDoc comments to the undocumented exports in four modules. The diff only adds comments; no code changes.
Changes
hooks/use-token-price.ts(Add doc comments to hooks/use-token-price.ts #785): documentsformatUsd,useTokenPriceandusePortfolioValue, including how unpriced and unknown tokens behave. An unknown symbol gives anullprice, never0orNaN. The portfolio skips unpriced tokens instead of returningnullfor the whole total, and returnsnullonly when no stream can be priced. The comments also note thatformatUsddoes not guard againstNaN(related: bug: usePortfolioValue zeroes out the entire portfolio for one unknown token #283, bug: no NaN guard on fetched XLM price #284).lib/contract.ts(Add doc comments to lib/contract.ts's remaining undocumented exports #786): documents the remaining 14 exports (setSignTransaction,TxStep,FeeEstimate,SimulationPreview,estimateCreateStreamFee,createStream,createStreamsBatch,withdrawFromStream,cancelStream,getTokenMetadata,getTokenBalance,bumpStreamTtl,fetchStream,fetchStreamsForAddress). Each comment says what happens in mock mode and in live mode, what it returns, and what it does on error. It also records non-obvious behavior: the approve and create transactions, how the new stream ID is found, and thatgetTokenBalancereturns0non error.lib/hidden-streams.ts(Add doc comments to lib/hidden-streams.ts #787): documents the 9 get/hide/block/pin exports. Covers idempotency, subscriber notification, and that the getters return a fresh copy of the set.lib/streams-cache.ts(Add doc comments to lib/streams-cache.ts #788): documents the read/write caching contract. Entries never expire on their own; callers usefetchedAtto decide whether an entry is stale. Writes are best-effort and never throw.Closes #785
Closes #786
Closes #787
Closes #788