Skip to content

Conversation

@boosik-sol
Copy link
Contributor

@boosik-sol boosik-sol commented May 26, 2025

setRpc should return rpc object, so I fixed it.

@boosik-sol boosik-sol changed the title fix: setRpc return rpc object Fix: setRpc return rpc object May 26, 2025
@wjthieme
Copy link
Member

wjthieme commented May 26, 2025

What is this needed for (not opposed to this change but just trying to understand in what scenario this would be useful)?

@boosik-sol
Copy link
Contributor Author

What is this needed for (not opposed to this change but just trying to understand in what scenario this would be useful)?

This change is related to ticket LIQ-1211.
When working with whirlpool ts-sdk, developer often wants to reuse an exsiting RPC client - I ran into the same need while writing examples, since we can't assume the developer will only use Orca-SDK's functions.

As a result, we tend to write code like this,

const rpc = createSolanaRpc(...);
await setRpc(...);

rpc.someMethod(...);

If setRpc returned the RPC object, we could cut down on duplicate code and give developers more flexibility to take advantage of other Solana(from solana-kit) features.

@boosik-sol boosik-sol force-pushed the boosik/return-rpc branch from 22d887d to 80a8b2b Compare May 26, 2025 13:50
Copy link
Member

@wjthieme wjthieme left a comment

Choose a reason for hiding this comment

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

🚀

@boosik-sol boosik-sol merged commit 63a5323 into main May 26, 2025
6 checks passed
@boosik-sol boosik-sol deleted the boosik/return-rpc branch May 26, 2025 13:58
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.

3 participants