Skip to content

fix: parse backend sponsorship responses - #10

Merged
Utilitycoder merged 1 commit into
mainfrom
fix/sponsorship-response-envelope
Sep 11, 2026
Merged

Utilitycoder merged 1 commit into
mainfrom
fix/sponsorship-response-envelope

Conversation

@Utilitycoder

@Utilitycoder Utilitycoder commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Bug Fixes

    • Improved wallet authentication and sponsorship request handling for successful backend responses wrapped in a status and data envelope.
    • Preserved compatibility with successful responses using the previous unwrapped format.
    • Improved reliability when using the browser’s native network request functionality.
  • Chores

    • Updated the package version to 0.2.1 and documented the fixes in the changelog.

@Utilitycoder
Utilitycoder merged commit 0002bee into main Sep 11, 2026
1 of 2 checks passed
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: 2572b848-b25f-4ab4-9ffa-545e9a1b1d8f

📥 Commits

Reviewing files that changed from the base of the PR and between 9f52b26 and 1937742.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • package.json
  • src/stellar/sponsorship-client.test.ts
  • src/stellar/sponsorship-client.ts

📝 Walkthrough

Walkthrough

The client now unwraps successful { status, data } responses while supporting unwrapped payloads. The default fetcher calls globalThis.fetch. Tests cover both response formats, and package metadata records version 0.2.1.

Changes

Response compatibility

Layer / File(s) Summary
Response normalization and fetch wiring
src/stellar/sponsorship-client.ts
Successful responses use object-valued data when available. Other payloads remain unchanged. The default fetcher invokes globalThis.fetch.
Envelope coverage and release metadata
src/stellar/sponsorship-client.test.ts, package.json, CHANGELOG.md
Tests cover enveloped authentication, build, and submit responses, plus unwrapped challenge responses. The package version and changelog now show 0.2.1.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/sponsorship-response-envelope

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant