File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ mod nft;
5757
5858const METAPLEX_PROGRAM_ID : & str = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" ;
5959
60+ const FEE_CAP : u64 = 20000 ;
61+
6062fn read_keypair ( path : PathBuf ) -> TransportResult < Keypair > {
6163 let keypair = solana_sdk:: signature:: read_keypair_file ( path)
6264 . map_err ( |e| TransportError :: InvalidKeyfile ( e. to_string ( ) ) ) ?;
@@ -1512,8 +1514,11 @@ impl SolanaTransport {
15121514 fee += f. prioritization_fee ;
15131515 }
15141516 info ! ( "Estimate fee: {} in lamports" , fee) ;
1515- // XXX: We add a fixed amount to recommended fee
1516- Ok ( fee + 10000 )
1517+ if fee > FEE_CAP {
1518+ info ! ( "Use {} fee cap" , FEE_CAP ) ;
1519+ fee = FEE_CAP ;
1520+ }
1521+ Ok ( fee)
15171522 }
15181523
15191524 fn get_min_lamports ( & self , account_len : usize ) -> TransportResult < u64 > {
You can’t perform that action at this time.
0 commit comments