mirror of
https://github.com/jwinterm/grin-wallet.git
synced 2026-10-17 07:11:36 +02:00
remove height argument from fee related functions as per fixpastfees RFC (#602)
* remove height argument from fee related functions as per fixpastfees RFC * Cargo.lock updated from cargo update -p grin_core
This commit is contained in:
@@ -12,7 +12,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::core::consensus::YEAR_HEIGHT;
|
||||
use crate::core::core::FeeFields;
|
||||
use crate::core::core::{self, amount_to_hr_string};
|
||||
use crate::core::global;
|
||||
@@ -191,7 +190,7 @@ pub fn txs(
|
||||
let amount_debited_str = core::amount_to_hr_string(t.amount_debited, true);
|
||||
let amount_credited_str = core::amount_to_hr_string(t.amount_credited, true);
|
||||
let fee = match t.fee {
|
||||
Some(f) => format!("{}", core::amount_to_hr_string(f.fee(cur_height), true)),
|
||||
Some(f) => format!("{}", core::amount_to_hr_string(f.fee(), true)),
|
||||
None => "None".to_owned(),
|
||||
};
|
||||
let net_diff = if t.amount_credited >= t.amount_debited {
|
||||
@@ -418,13 +417,13 @@ pub fn estimate(
|
||||
if dark_background_color_scheme {
|
||||
table.add_row(row![
|
||||
bFC->strategy,
|
||||
FR->amount_to_hr_string(fee_fields.fee(2*YEAR_HEIGHT), false), // apply fee mask past HF4
|
||||
FR->amount_to_hr_string(fee_fields.fee(), false), // apply fee mask past HF4
|
||||
FY->amount_to_hr_string(total, false),
|
||||
]);
|
||||
} else {
|
||||
table.add_row(row![
|
||||
bFD->strategy,
|
||||
FR->amount_to_hr_string(fee_fields.fee(2*YEAR_HEIGHT), false), // apply fee mask past HF4
|
||||
FR->amount_to_hr_string(fee_fields.fee(), false), // apply fee mask past HF4
|
||||
FY->amount_to_hr_string(total, false),
|
||||
]);
|
||||
}
|
||||
@@ -486,7 +485,7 @@ pub fn payment_proof(tx: &TxLogEntry) -> Result<(), Error> {
|
||||
None => "None".to_owned(),
|
||||
};
|
||||
let fee = match tx.fee {
|
||||
Some(f) => f.fee(2 * YEAR_HEIGHT), // apply fee mask past HF4
|
||||
Some(f) => f.fee(), // apply fee mask past HF4
|
||||
None => 0,
|
||||
};
|
||||
let amount = if tx.amount_credited >= tx.amount_debited {
|
||||
|
||||
Reference in New Issue
Block a user