Skip to content

docs: flag pre-Cadence 1.0 syntax in fcl.mutate example#2807

Merged
peterargue merged 3 commits into
masterfrom
flag-cadence-1.0-in-readme-example
Apr 24, 2026
Merged

docs: flag pre-Cadence 1.0 syntax in fcl.mutate example#2807
peterargue merged 3 commits into
masterfrom
flag-cadence-1.0-in-readme-example

Conversation

@Aliserag
Copy link
Copy Markdown
Contributor

Summary

The `fcl.mutate` code snippet in the README (lines 125–133) uses pre-Cadence 1.0 syntax that no longer compiles against current Cadence:

  • `prepare(account: AuthAccount)` — `AuthAccount` was removed in 1.0, replaced with `auth(...) &Account`
  • `account.borrow<...>(from: ...)` — borrow moved to `account.storage.borrow`
  • `Profile.privatePath` — private paths were removed; storage is the only valid path domain

This PR only adds a `> Note:` callout above the code block pointing readers to the Cadence migration guide. It does not rewrite the snippet itself, because writing a correct 1.0 replacement requires knowing the current Profile demo contract's storage path (which may have changed).

A follow-up PR can replace the snippet with a current working example once the Profile demo contract's API is confirmed.

Test plan

  • Note renders above the code block on GitHub
  • Existing code block unchanged

The transaction snippet in the fcl.mutate example uses AuthAccount,
account.borrow, and a private path — all replaced in Cadence 1.0 with
auth(...) &Account, account.storage.borrow, and storage-only paths.

This commit only adds a note calling out the discrepancy; rewriting
the snippet requires knowing the current Profile demo contract's
storage path, which is outside this README's scope.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-sdk-demo Ready Ready Preview, Comment Apr 24, 2026 5:02pm

Request Review

@Aliserag Aliserag requested a review from a team as a code owner April 23, 2026 01:49
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

⚠️ No Changeset found

Latest commit: 817f775

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@peterargue peterargue merged commit 5e44c67 into master Apr 24, 2026
8 checks passed
@peterargue peterargue deleted the flag-cadence-1.0-in-readme-example branch April 24, 2026 17:09
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.

2 participants