Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: support VersionedMessage in getFeeForMessage #28996

Merged
merged 1 commit into from Nov 30, 2022

Conversation

joncinque
Copy link
Contributor

Problem

As noticed in https://solana.stackexchange.com/questions/4597/how-getfeeformessage-for-versioned-transaction, we can't use getFeeForMessage with a versioned message.

Summary of Changes

Similar to how versioned and legacy transactions are supported in sendTransaction, accept VersionedMessage in getFeeForMessage, and serialize it properly.

There's some mismatch in how the types are defined between VersionedTransaction and VersionedMessage, so here's the type definition for reference:

export type VersionedMessage = Message | MessageV0;

Fixes #

@github-actions github-actions bot added the web3.js Related to the JavaScript client label Nov 30, 2022
@codecov
Copy link

codecov bot commented Nov 30, 2022

Codecov Report

Merging #28996 (56e2694) into master (4267a15) will decrease coverage by 0.7%.
The diff coverage is n/a.

❗ Current head 56e2694 differs from pull request most recent head 062bab0. Consider uploading reports for the commit 062bab0 to get more accurate results

@@            Coverage Diff            @@
##           master   #28996     +/-   ##
=========================================
- Coverage    77.1%    76.4%   -0.8%     
=========================================
  Files          55       55             
  Lines        2934     3084    +150     
  Branches      408      454     +46     
=========================================
+ Hits         2264     2358     +94     
- Misses        529      568     +39     
- Partials      141      158     +17     

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.

final_63879b0994ebe9001e444c11_892576

@steveluscher steveluscher merged commit 337621d into solana-labs:master Nov 30, 2022
@joncinque joncinque deleted the web-fee branch November 30, 2022 18:47
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
web3.js Related to the JavaScript client
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants