Skip to content

Conversation

@muckee
Copy link

@muckee muckee commented Nov 10, 2024

The existing code uses the RPC_URL constant defined in the constant.ts file to instantiate a new web3 connection.

With these changes, a Connection can be optionally passed to the getOptimalComputeUnitLimitAndPrice function, which is used to override the connection defined in the constructor of the FeeService class when Connection.simulateTransaction is executed.

Additionally, inside the referral.ts file, the referral provider's connection property is passed to feeService.getOptimalComputeUnitLimitAndPrice to ensure that the fee service can make use of custom RPC URLs passed to the provider.

@vercel
Copy link

vercel bot commented Nov 10, 2024

@NerdMuckee is attempting to deploy a commit to the wowcats Team on Vercel.

A member of the Team first needs to authorize it.

@muckee muckee changed the title Support optional custom RPC URL in FeeService class fix: Allow custom RPC URL in FeeService class Nov 10, 2024
@muckee
Copy link
Author

muckee commented Nov 12, 2024

Just thought to mention...

I decided to forward the connection as a separate parameter, instead of adding it to the payload described by GetOptimalComputeUnitLimitAndPricePayload.

I assumed that your intended definition of 'payload' describes data included in the blockchain interaction, as opposed to all of the data passed as props within JS.

Let me know if you want me to edit the PR so that the connection is passed as one of the properties of GetOptimalComputeUnitLimitAndPricePayload, instead of as a separate parameter.

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