Skip to content

Rename token example's approve arg to live_until_ledger - #415

Merged
leighmcculloch merged 1 commit into
mainfrom
rename-token-live-until-ledger
Sep 9, 2026
Merged

Rename token example's approve arg to live_until_ledger#415
leighmcculloch merged 1 commit into
mainfrom
rename-token-live-until-ledger

Conversation

@leighmcculloch

@leighmcculloch leighmcculloch commented Sep 9, 2026

Copy link
Copy Markdown
Member

What

Rename the approve allowance parameter and its internal storage field in the token example from expiration_ledger to live_until_ledger.

Why

The soroban-sdk v27.0.1 (stellar/rs-soroban-sdk#1932) renamed this argument on both TokenInterface and StellarAssetInterface to align with the SEP-41 spec and this is just keeping the names updated everywhere we can.

The event field still has the old name because that was updated in v28 of the sdk, so we can't update it yet here where the examples are still on v27.

Known limitations

N/A

@leighmcculloch
leighmcculloch requested a review from a team September 9, 2026 06:45
@leighmcculloch
leighmcculloch marked this pull request as ready for review September 9, 2026 06:45
Copilot AI balanced review requested due to automatic review settings September 9, 2026 06:45
@leighmcculloch
leighmcculloch enabled auto-merge (squash) September 9, 2026 06:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the token example’s allowance terminology with Soroban SDK v27 and SEP-41 while retaining the existing event schema.

Changes:

  • Renames the approve argument and internal allowance field to live_until_ledger.
  • Preserves the event field name expiration_ledger.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
token/src/storage_types.rs Renames the stored allowance field.
token/src/contract.rs Updates approve while preserving event compatibility.
token/src/allowance.rs Propagates the renamed field through allowance logic.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@leighmcculloch
leighmcculloch merged commit 1f5aeb5 into main Sep 9, 2026
142 checks passed
@leighmcculloch
leighmcculloch deleted the rename-token-live-until-ledger branch September 9, 2026 16:26
@leighmcculloch

Copy link
Copy Markdown
Member Author

Follow up in the stellar-docs:

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.

3 participants