@@ -725,7 +725,12 @@ pub fn update_cosmos_config(test: &Test) -> Result<()> {
725725 . write ( true )
726726 . truncate ( true )
727727 . open ( & config_path) ?;
728- file. write_all ( values. to_string ( ) . as_bytes ( ) ) . map_err ( |e| {
728+ file. write_all (
729+ toml:: to_string ( & values)
730+ . expect ( "Values should be converted" )
731+ . as_bytes ( ) ,
732+ )
733+ . map_err ( |e| {
729734 eyre ! ( format!( "Writing a Cosmos config file failed: {}" , e) )
730735 } ) ?;
731736
@@ -742,9 +747,12 @@ pub fn update_cosmos_config(test: &Test) -> Result<()> {
742747 . write ( true )
743748 . truncate ( true )
744749 . open ( & app_path) ?;
745- file. write_all ( values. to_string ( ) . as_bytes ( ) ) . map_err ( |e| {
746- eyre ! ( format!( "Writing a Cosmos app.toml failed: {}" , e) )
747- } ) ?;
750+ file. write_all (
751+ toml:: to_string ( & values)
752+ . expect ( "Values should be converted" )
753+ . as_bytes ( ) ,
754+ )
755+ . map_err ( |e| eyre ! ( format!( "Writing a Cosmos app.toml failed: {}" , e) ) ) ?;
748756
749757 let genesis_path = cosmos_dir. join ( "config/genesis.json" ) ;
750758 let s = std:: fs:: read_to_string ( & genesis_path)
@@ -782,7 +790,7 @@ pub fn update_cosmos_config(test: &Test) -> Result<()> {
782790 . open ( & genesis_path) ?;
783791 let writer = std:: io:: BufWriter :: new ( file) ;
784792 serde_json:: to_writer_pretty ( writer, & genesis)
785- . expect ( "Writing Cosmos genesis.toml failed" ) ;
793+ . expect ( "Writing Cosmos genesis.json failed" ) ;
786794
787795 if matches ! ( chain_type, CosmosChainType :: Osmosis ) {
788796 let client_path = cosmos_dir. join ( "config/client.toml" ) ;
@@ -800,7 +808,12 @@ pub fn update_cosmos_config(test: &Test) -> Result<()> {
800808 . write ( true )
801809 . truncate ( true )
802810 . open ( & client_path) ?;
803- file. write_all ( values. to_string ( ) . as_bytes ( ) ) . map_err ( |e| {
811+ file. write_all (
812+ toml:: to_string ( & values)
813+ . expect ( "Values should be converted" )
814+ . as_bytes ( ) ,
815+ )
816+ . map_err ( |e| {
804817 eyre ! ( format!(
805818 "Writing a Osmosis client config file failed: {}" ,
806819 e
0 commit comments