lib/cryptum/api.rb in cryptum-0.0.297 vs lib/cryptum/api.rb in cryptum-0.0.298

- old
+ new

@@ -558,12 +558,13 @@ fiat_portfolio.last[:total_holdings] = format( '%0.8f', total_holdings ) - File.open(fiat_portfolio_file, 'w') do |f| - f.puts fiat_portfolio.to_json - end + File.write( + fiat_portfolio_file, + JSON.pretty_generate(fiat_portfolio) + ) crypto_portfolio rescue StandardError => e raise e end