Skip to content

Commit

Permalink
ALL-5774 Fix return type for solana getFeeForMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverjantar committed Mar 19, 2024
1 parent a8b0ce9 commit c41c678
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [4.2.17] - 2024.3.19

### Fixed

- Fixed Solana RPC call for `getFeeForMessage` method. The result is now properly parsed and returns context information with value.

## [4.2.16] - 2024.2.15

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tatumio/tatum",
"version": "4.2.16",
"version": "4.2.17",
"description": "Tatum JS SDK",
"author": "Tatum",
"repository": "https://github.com/tatumio/tatum-js",
Expand Down
2 changes: 1 addition & 1 deletion src/dto/rpc/SolanaRpcSuite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ export interface SolanaRpcInterface {
getFeeForMessage: (
message: any,
options?: GetCommitmentMinContextSlotOptions,
) => Promise<JsonRpcResponse<number | null>>
) => Promise<JsonRpcResponse<SolanaTypeWithContext<number | null>>>

/**
* Get the first available block on the Solana blockchain.
Expand Down
7 changes: 5 additions & 2 deletions src/service/rpc/other/AbstractSolanaRpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,11 @@ export abstract class AbstractSolanaRpc implements SolanaRpcInterface {
getFeeForMessage(
message: any,
options?: GetCommitmentMinContextSlotOptions,
): Promise<JsonRpcResponse<number | null>> {
return this.rpcCall<JsonRpcResponse<number | null>>('getFeeForMessage', [message, options])
): Promise<JsonRpcResponse<SolanaTypeWithContext<number | null>>> {
return this.rpcCall<JsonRpcResponse<SolanaTypeWithContext<number | null>>>('getFeeForMessage', [
message,
options,
])
}

getFirstAvailableBlock(): Promise<JsonRpcResponse<number>> {
Expand Down

0 comments on commit c41c678

Please sign in to comment.