What's Changed
Patch Changes
-
bd4aa58: Every adapter now invokes the configured
fetchImplwithglobalThisas the receiver, matching how@opensea/sdkinvokes the same seam. Each adapter previously copied the transport into a local and called it bare, which leaves the receiverundefined.That bare call works for unbound native fetch, because Web IDL replaces a
nullorundefinedreceiver with the global object. What it does not survive is a call site written as a member expression: reading the transport off the config and calling it in place makes the config object the receiver, and browsers reject that with "Illegal invocation". Pinning the receiver at one helper removes the difference between the two spellings.The five byte-identical
private fetchImplmethods, one per adapter, collapse into a singlefetchWithhelper. Five copies of a rule meant a fix applied to one and not the others would be a silent divergence, and the private method took the same name as theconfig.fetchImplfield it read, which is what made the bare call easy to write. The helper is duplicated from the SDK rather than imported:@opensea/wallet-adaptersships with only@noble/hashesand@noble/curvesas runtime dependencies, and depending on the SDK for five lines would pull inethersand@opensea/seaport-js.No public API changes.
FetchImpland every adapter config are unchanged, and a caller who passes a bound transport or an arrow is unaffected because those ignore the receiver.
Full Changelog: v1.2.0...v1.2.1