Skip to content

Fix four content-drift items flagged in #21#22

Open
kaankacar wants to merge 2 commits into
mainfrom
21-skill-content-drift-after-7-skill-restructure-4-high-priority-items
Open

Fix four content-drift items flagged in #21#22
kaankacar wants to merge 2 commits into
mainfrom
21-skill-content-drift-after-7-skill-restructure-4-high-priority-items

Conversation

@kaankacar
Copy link
Copy Markdown
Collaborator

Closes #21.

  • standards: dangling ../security/SKILL.md link → ../soroban/SKILL.md#part-3-security (security was merged into the soroban skill in refactor: restructure skill into 7 thematic sub-skills #17)
  • soroban: normalize 12 deprecated env.register_contract(_wasm)(None, X) call sites to env.register(X, ()) — both old forms are #[deprecated(note = "use \register`")]` in soroban-sdk
  • soroban: stellar contract installstellar contract upload (the current CLI keeps install as a deprecated alias that emits a warning)
  • dapp + soroban pitfalls: Freighter snippets updated to the v3 API surface — getPublicKey replaced with getAddress, setAllowed + getPublicKey flow replaced with requestAccess, and isConnected / isAllowed / signTransaction destructured for their new { ..., error? } return shapes

- standards/SKILL.md: point dangling ../security/SKILL.md link at ../soroban/SKILL.md#part-3-security (security was merged into the soroban skill during the 7-skill restructure)
- soroban/SKILL.md: normalize 12 deprecated env.register_contract(_wasm) call sites to env.register(X, ()); both old forms are #[deprecated] in soroban-sdk
- soroban/SKILL.md: rename `stellar contract install` to `stellar contract upload` (install is now a deprecated alias in the current CLI)
- dapp/SKILL.md + soroban/SKILL.md pitfalls: switch Freighter examples to the v3 API surface (getAddress / requestAccess, isConnected/isAllowed/signTransaction now return object shapes with { ..., error? })
Copilot AI review requested due to automatic review settings May 20, 2026 17:30
@kaankacar kaankacar self-assigned this May 20, 2026
@github-actions
Copy link
Copy Markdown

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://stellar.github.io/stellar-dev-skill/pr/pr-22/

Built to branch gh-pages at 2026-05-20 17:33 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes documentation/content drift across the restructured skill set by updating broken cross-skill links and modernizing Soroban/Freighter API snippets to current usage.

Changes:

  • Updates the Standards skill security reference to point at Soroban Part 3 (Security) instead of a removed security/ skill.
  • Normalizes deprecated Soroban SDK test registration examples to env.register(..., ()) and updates CLI docs from stellar contract install to stellar contract upload.
  • Updates Freighter wallet integration snippets to the v3 API surface (getAddress/requestAccess, object-shaped returns, and new signTransaction result).

Reviewed changes

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

File Description
skills/standards/SKILL.md Fixes a dangling link by pointing security guidance at Soroban’s Security section.
skills/soroban/SKILL.md Updates Soroban test examples and CLI docs; modernizes one Freighter troubleshooting snippet.
skills/dapp/SKILL.md Updates the Freighter hook example to use the v3 Freighter API.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/soroban/SKILL.md Outdated
const { isAllowed: granted } = await isAllowed();
if (!granted) {
// requestAccess prompts the user and returns { address, error }
await requestAccess();
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.

Fixed in 9abdab8. The snippet now captures requestAccess() result and throws when error is returned.

Comment thread skills/soroban/SKILL.md
Comment on lines +2410 to 2416
import { isConnected, isAllowed, requestAccess } from "@stellar/freighter-api";

async function checkFreighter() {
// Check if extension is installed
const connected = await isConnected();
if (!connected) {
const { isConnected: installed, error } = await isConnected();
if (error || !installed) {
// Prompt user to install
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.

Fixed in 9abdab8. Updated the network mismatch snippet to use Freighter v3 getNetwork() object return shape and handle error.

Comment thread skills/dapp/SKILL.md
Comment on lines +132 to +143
const { isConnected: installed, error } = await isConnected();
if (error || !installed) return;

// getAddress returns address: "" until the app has been granted access,
// so a non-empty address means we're already authorized.
const { address: addr } = await getAddress();
if (!addr) return;

const { network: net } = await getNetwork();
setConnected(true);
setAddress(addr);
setNetwork(net);
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.

Fixed in 9abdab8. The hook snippet now handles error from getAddress()/getNetwork() and validates address/network before setting connected state.

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.

Skill content drift after 7-skill restructure: 4 high-priority items

3 participants