diff --git a/wallet/core/src/tx/generator/test.rs b/wallet/core/src/tx/generator/test.rs index a073a0fb7..1818fe414 100644 --- a/wallet/core/src/tx/generator/test.rs +++ b/wallet/core/src/tx/generator/test.rs @@ -3,7 +3,7 @@ use crate::error::Error; use crate::result::Result; use crate::tx::{Fees, MassCalculator, PaymentDestination}; -use crate::utxo::{NetworkParams, UtxoEntryReference}; +use crate::utxo::UtxoEntryReference; use crate::{tx::PaymentOutputs, utils::kaspa_to_sompi}; use kaspa_addresses::Address; use kaspa_consensus_core::config::params::Params; @@ -782,14 +782,12 @@ fn test_generator_fan_out_1() -> Result<()> { use kaspa_consensus_core::mass::calc_storage_mass; let network_id = test_network_id(); - let network_params = NetworkParams::from(network_id); let consensus_params = Params::from(network_id); let storage_mass = calc_storage_mass( false, [100000000, 8723579967].into_iter(), [20000000, 25000000, 31000000].into_iter(), - network_params.kip9_version, consensus_params.storage_mass_parameter, ); diff --git a/wallet/core/src/wasm/tx/mass.rs b/wallet/core/src/wasm/tx/mass.rs index ac843ff7f..2414bc908 100644 --- a/wallet/core/src/wasm/tx/mass.rs +++ b/wallet/core/src/wasm/tx/mass.rs @@ -111,18 +111,12 @@ pub fn calculate_unsigned_transaction_fee( pub fn calculate_storage_mass(network_id: NetworkIdT, input_values: &NumberArray, output_values: &NumberArray) -> Result> { let network_id = NetworkId::try_owned_from(network_id)?; let consensus_params = Params::from(network_id); - let network_params = NetworkParams::from(network_id); let input_values = Array::from(input_values).to_vec().iter().map(|v| v.as_f64().unwrap() as u64).collect::>(); let output_values = Array::from(output_values).to_vec().iter().map(|v| v.as_f64().unwrap() as u64).collect::>(); - let storage_mass = calc_storage_mass( - false, - input_values.into_iter(), - output_values.into_iter(), - network_params.kip9_version, - consensus_params.storage_mass_parameter, - ); + let storage_mass = + calc_storage_mass(false, input_values.into_iter(), output_values.into_iter(), consensus_params.storage_mass_parameter); Ok(storage_mass) }