Skip to content

Conversation

@steveluscher
Copy link
Contributor

The only place that @solana/web3.js is used in this shim – in a non-type position – is here. We can make a mock of PublicKey here which breaks the last dependency on the actual implementation of @solana/web3.js. Now all that is used from that package are the types.

@steveluscher
Copy link
Contributor Author

steveluscher commented Nov 18, 2024

I don't know if this now means that we should move @solana/web3.js out of dependencies and into peerDependencies or devDependencies but I'm going to all that thinking up to @buffalojoec

'SysvarStakeHistory1111111111111111111111111'
);
const SYSVAR_STAKE_HISTORY_ADDRESS = {
toBase58: () => 'SysvarStakeHistory1111111111111111111111111',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This works, because the only thing that parseAccountInfo() ever does with this thing is to call toBase58() on it.

‘Thin interfaces.’

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.

1 participant