Skip to content

fix: correct TypeScript code examples and expected outputs in notes.md#173

Open
giwaov wants to merge 1 commit into0xMiden:mainfrom
giwaov:fix/issue-161-notes-code-bugs
Open

fix: correct TypeScript code examples and expected outputs in notes.md#173
giwaov wants to merge 1 commit into0xMiden:mainfrom
giwaov:fix/issue-161-notes-code-bugs

Conversation

@giwaov
Copy link

@giwaov giwaov commented Feb 22, 2026

Summary

Fixes #161

This PR corrects three code correctness issues in the Notes & Transactions quickstart guide.

Bugs Fixed

1. Fixed TypeScript balance output format

  • Changed Ok(1000) to 1000 to match TypeScript Number() output
  • TypeScript getBalance() returns a number, not a Result wrapper

2. Fixed send transaction log message mismatch

  • Updated expected output to match actual TypeScript console.log message
  • Was showing Rust println! format instead of TypeScript output

3. Removed unused ConsumableNoteRecord import

  • Import was copied from consume example but never used in send section
  • Cleaned up to match actual code requirements

Impact

  • Expected outputs now accurately match what the code produces
  • Developers can trust the examples when troubleshooting
  • No more confusion about Result wrappers in TypeScript

Changes

  • docs/builder/quick-start/notes.md: 2 insertions, 3 deletions

Fixes 0xMiden#161

Fixed three code correctness issues in the Notes & Transactions guide:

1. Fixed expected output format for balance check
   - Changed 'Ok(1000)' to '1000' to match TypeScript Number() output
   - TypeScript getBalance() returns a number, not a Result wrapper

2. Fixed send transaction log message in expected output
   - Changed to match actual TypeScript console.log message
   - Was showing Rust println! format instead of TypeScript output

3. Removed unused ConsumableNoteRecord import in send section
   - Import was copied from consume example but never used
   - Cleaned up to match actual code requirements

All fixes ensure expected outputs accurately reflect what the code produces.
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.

[Docs] Code example bugs in Notes & Transactions quickstart (notes.md)

1 participant