Skip to content

js-legacy: Size the record account for the offset in createInitializeWriteRecord - #386

Merged
samkim-crypto merged 2 commits into
solana-program:mainfrom
Iamsohungrynow:fix/init-write-record-offset
Nov 8, 2026
Merged

samkim-crypto merged 2 commits into
solana-program:mainfrom
Iamsohungrynow:fix/init-write-record-offset

Conversation

@Iamsohungrynow

Copy link
Copy Markdown
Contributor

createInitializeWriteRecord sized the account as RECORD_META_DATA_SIZE + buffer.length but writes at offset, so any offset > 0 failed with account data too small for instruction after the account was already created. it adds the offset now and the long record test covers offset 10

@samkim-crypto samkim-crypto 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.

Thanks a lot for the fix! While you're here, can you fix writeRecord's JSDoc as well, which has the same problem? 🙏

Comment thread clients/js-legacy/src/actions.ts Resolved

@samkim-crypto samkim-crypto 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.

Thanks a lot!

@samkim-crypto
samkim-crypto merged commit 98dc901 into solana-program:main Nov 8, 2026
23 checks passed
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