-
Notifications
You must be signed in to change notification settings - Fork 918
Accept bigints in RPC error factories #3519
Conversation
🦋 Changeset detectedLatest commit: 2ee94ba The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @lorisleiva and the rest of your teammates on Graphite |
BundleMonFiles updated (7)
Unchanged files (118)
Total files change -262B -0.08% Final result: ✅ View report in BundleMon website ➡️ |
73aedaf
to
2d5d282
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, looks good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with this, but I don't think I actually understand why the numeric keypath allowlist is insufficient for this. The root data has that special case in the transport (which we could add to the subscriptions one) and for the errors-as-data (ie. instruction errors) I think we could put a keypath here:
solana-web3.js/packages/rpc-api/src/index.ts
Lines 287 to 290 in d83eaaf
simulateTransaction: [ | |
...jsonParsedAccountsConfigs.map(c => ['value', 'accounts', KEYPATH_WILDCARD, ...c]), | |
...innerInstructionsConfigs.map(c => ['value', 'innerInstructions', KEYPATH_WILDCARD, ...c]), | |
], |
Anyway, I think that what this is doing is playing fast and loose with the types, but only internal to the transport; devs will never see a bigint error code.
2d5d282
to
2ee94ba
Compare
Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up. |
This PR makes the failing tests introduced in the previous PR pass.
See #3518.