Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

fix: update method name and fix test timeout issue #24757

Conversation

marcnjaramillo
Copy link
Contributor

Problem

Summary of Changes

Fixes #

#24730

@mergify mergify bot added the community Community contribution label Apr 27, 2022
@mergify mergify bot requested a review from a team April 27, 2022 19:45
@jstarry jstarry requested review from steveluscher and removed request for a team April 28, 2022 03:04
Copy link
Contributor

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

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

What did you think about @t-nelson's feedback that this method belongs on Message belongs on Connection and should take a Message as input?

Rust SDK: https://docs.rs/solana-client/latest/solana_client/rpc_client/struct.RpcClient.html#method.get_fee_for_message
JSON API: https://docs.solana.com/developing/clients/jsonrpc-api#getfeeformessage

@@ -490,7 +490,7 @@ export class Transaction {
/**
* Get the estimated fee associated with a transaction
*/
async getEstimatedFee(connection: Connection): Promise<number> {
async getFeeForMessage(connection: Connection): Promise<number> {
Copy link
Contributor

Choose a reason for hiding this comment

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

Because this is live, we have little choice but to support the old name for a while, deprecated. If you landed this PR, anyone calling getEstimatedFee would find their software no longer compiles with TypeScript (at best) or works in production (at worst).

Rename it, but also create a new method with the old name, that just calls straight through to the one with the new name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, will do!

@t-nelson
Copy link
Contributor

What did you think about @t-nelson's feedback that this method belongs on Message belongs on Connection and should take a Message as input?

nice save 😉

@steveluscher
Copy link
Contributor

Hey, at least I owned up to it. 🤣

@mergify mergify bot dismissed steveluscher’s stale review April 28, 2022 06:21

Pull request has been modified.

@mergify mergify bot requested a review from a team April 28, 2022 06:21
@marcnjaramillo marcnjaramillo force-pushed the update-transaction-test branch 2 times, most recently from 133e01b to 7889487 Compare April 28, 2022 06:26
@marcnjaramillo marcnjaramillo force-pushed the update-transaction-test branch from 4510f95 to a3c8304 Compare May 5, 2022 02:06
@marcnjaramillo
Copy link
Contributor Author

I can't seem to resolve the package-loc.json merge conflicts. I thought I had it, but then the conflicts showed up again.

@marcnjaramillo
Copy link
Contributor Author

Fixed with #25210

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants