Repository navigation
chore: version packages - #84
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@bigmi/client@0.10.5
Patch Changes
5b52eb3,5b52eb3]:@bigmi/core@0.9.3
Patch Changes
#82
5b52eb3Thanks @chybisov! - Keep the shared block watcher alive when awaitForTransactiontimes out. When a wait reached itsretryCounttimeout and the same block callback then found the transaction confirmed or replaced, or failed to fetch the block, its internaldoneran a second time. That second pass ran the watcher's cleanup while another wait on the same client still listened, so that wait and every later wait on the client never settled. It could also settle a newer wait on the same txId with the stale error of the first one.donenow runs at most once, and an observer'sunwatchis a no-op once its own listener is gone.Release the observers of a settled
waitForTransaction. A wait that joined another wait on the same txId, such as a resumed run, stayed in the module-levellistenersCachewith its callbacks after both settled, and a third wait on that txId joined it and never settled. Every finished wait also left an emptylistenersCachekey behind, one per txId. Each wait now removes its own listener when it settles. When the last listener leaves,observedrops the key and itscleanupCacheentry and runs the cleanup, which removes the observer from the shared block watcher. A wait now joins another wait on the same txId only when both use the sameconfirmations,pollingInterval,retryCount, numericretryDelayandsenderAddress(aretryDelayfunction is not compared), so it no longer runs with the options of the wait it joined, such as resolving at 1 confirmation when it asked for 3.Make the
timeoutoption ofwaitForTransactionend the wait. The timer only rejected the promise: it was never cleared and the block watcher kept polling, so a wait whosegetblockcountnever succeeded polled until the page or process ended. The timeout now rejects and removes only its own wait, so another wait on the same txId with a longer timeout or none keeps waiting, and the shared block watcher stops once no wait listens to it. Every way a wait settles clears its timer.#82
5b52eb3Thanks @chybisov! - StopwaitForTransactionfrom reporting the awaited transaction as its own replacement. Whengetrawtransactionstill reported the transaction unconfirmed butgetblockalready listed it, the replacement search matched the transaction itself, because it spends the same inputs, and calledonReplacedwith it. A replacement thatgetrawtransactionreported with no confirmations also resolved the wait at once, and a replacement that needed more confirmations resolved it in a later block withoutonReplaced. The search now skips the awaited txid, a replacement without confirmations keeps the wait polling, andonReplacedfires once, when the replacement has enough confirmations. It reports the awaited transaction asreplacedTransactionand finds the reason against it, also when the replacement replaced an earlier replacement that left the chain.Settle
withRetrywhenshouldRetryor thedelayfunction throws. The throw rejected an internal attempt that nothing handled, so the returned promise stayed pending and the error surfaced only as an unhandled rejection.withRetrynow rejects with that error. AretryDelayfunction ofwaitForTransactionthat threw hung the wait in the same way; the wait now rejects with that error.Wait for every confirmation of a mined transaction in
waitForTransaction. TheretryCountblock budget also counted the blocks after the transaction was mined, so a wait for more confirmations than the budget had left rejected withWaitForTransactionReceiptTimeoutErrorwhile the transaction was confirming: with the defaultretryCountof 10, a wait for 6 confirmations rejected if the transaction was mined 6 or more blocks after the wait started. The budget now counts only the blocks in which the transaction, or the replacement it tracks, is not mined or the height of its block is unknown. An unmined transaction still rejects on the same block as before.Evict the least recently used key from the internal
LruMapthat holds the in-flight requests of request deduplication. A key that was set again kept its old place, a read moved a key to the newest place only when its value was notundefined, an empty-string key was never evicted, and the eviction read the keys through the subclass, which viem reports can give a stale iterator on iOS 18 JavaScriptCore. A key that is set again or read now becomes the newest, the oldest key is evicted also when it is an empty string, and the eviction reads the keys of the baseMap. This matters only when more than 8192 deduplicated requests are in flight at once.@bigmi/react@0.9.5
Patch Changes
5b52eb3,5b52eb3]: