Skip to content

docs(wallets): new gas manager policies are created active - #1738

Open
blakecduncan wants to merge 1 commit into
mainfrom
blakeduncan/fix-create-policy-initial-status
Open

blakecduncan wants to merge 1 commit into
mainfrom
blakeduncan/fix-create-policy-initial-status

Conversation

@blakecduncan

Copy link
Copy Markdown
Contributor

Description

The Create Policy reference says a newly created policy starts inactive, and the pay-gas-with-any-token guide tells readers to activate the policy before using it. New policies are actually created active. This updates both.

CreatePolicyClient.insertPolicy in paymaster-services sets PolicyStatus.ACTIVE for every new policy. The only exception is a policy created with a gas pump, which starts PENDING_APPROVAL, and gas pumps aren't part of the public docs. Sponsorship, ERC-20, and Solana policies all go through this insert, and it has worked this way since paymaster-services#227 (January 2025).

Related Issues

Found during the prod smoke test for webhook request signing (#1730). A sponsorship policy created through POST /api/gasManager/policy came back with "status": "active".

Changes Made

  • src/openapi/admin/admin.yaml: the Create Policy description now says the new policy is active and can be used right away.
  • content/wallets/pages/transactions/pay-gas-with-any-token/index.mdx: replaced the "New policies start inactive" step and its PUT .../status call with a note that the policy can be used right away. The removed step was harmless, since setting an active policy to active is a no-op, but it was unnecessary.

Testing

  • Created a policy through the prod Admin API and confirmed the response had "status": "active"
  • admin.yaml still parses (js-yaml); the change is text inside an existing block scalar
  • I have run the validation scripts (pnpm run validate). Not run locally; relying on CI
  • I have checked that the documentation builds correctly. Relying on the preview build

Create Policy returns an active policy: CreatePolicyClient.insertPolicy in paymaster-services sets PolicyStatus.ACTIVE for every policy created without a gas pump. Update the Create Policy reference and drop the now-unneeded activation step from the pay-gas-with-any-token guide.

Co-authored-by: Cursor <cursoragent@cursor.com>
@blakecduncan
blakecduncan requested a review from a team as a code owner October 30, 2026 15:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-30T15:26:11.686534Z 4ae6f5a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

🔗 Preview Mode

Name Status Preview Updated (UTC)
Alchemy Docs ✅ Ready 🔗 Visit Preview Oct 30, 2026, 3:25 PM

This branch has not been deployed

No deployments
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