File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -4452,7 +4452,7 @@ export class Connection {
44524452 async getFeeForMessage (
44534453 message : VersionedMessage ,
44544454 commitment ?: Commitment ,
4455- ) : Promise < RpcResponseAndContext < number > > {
4455+ ) : Promise < RpcResponseAndContext < number | null > > {
44564456 const wireMessage = toBuffer ( message . serialize ( ) ) . toString ( 'base64' ) ;
44574457 const args = this . _buildArgs ( [ wireMessage ] , commitment ) ;
44584458 const unsafeRes = await this . _rpcRequest ( 'getFeeForMessage' , args ) ;
@@ -4464,7 +4464,7 @@ export class Connection {
44644464 if ( res . result === null ) {
44654465 throw new Error ( 'invalid blockhash' ) ;
44664466 }
4467- return res . result as unknown as RpcResponseAndContext < number > ;
4467+ return res . result ;
44684468 }
44694469
44704470 /**
Original file line number Diff line number Diff line change @@ -585,7 +585,7 @@ export class Transaction {
585585 /**
586586 * Get the estimated fee associated with a transaction
587587 */
588- async getEstimatedFee ( connection : Connection ) : Promise < number > {
588+ async getEstimatedFee ( connection : Connection ) : Promise < number | null > {
589589 return ( await connection . getFeeForMessage ( this . compileMessage ( ) ) ) . value ;
590590 }
591591
You can’t perform that action at this time.
0 commit comments