tx: fix confirmation status for new block, do not show Slatepack message after finalization
This commit is contained in:
parent
8ea388554a
commit
1c14b9aa93
2 changed files with 38 additions and 10 deletions
|
@ -339,6 +339,30 @@ impl WalletTransactions {
|
||||||
DOTS_THREE_CIRCLE,
|
DOTS_THREE_CIRCLE,
|
||||||
t!("wallets.tx_sending"))
|
t!("wallets.tx_sending"))
|
||||||
},
|
},
|
||||||
|
TxLogEntryType::ConfirmedCoinbase => {
|
||||||
|
let tx_h = tx.height.unwrap_or(1) - 1;
|
||||||
|
if tx_h != 0 {
|
||||||
|
let left_conf = height - tx_h;
|
||||||
|
if height >= tx_h && left_conf < COINBASE_MATURITY {
|
||||||
|
let conf_info = format!("{}/{}",
|
||||||
|
left_conf,
|
||||||
|
COINBASE_MATURITY);
|
||||||
|
format!("{} {} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirming"),
|
||||||
|
conf_info
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
format!("{} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirming"))
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
format!("{} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirming"))
|
||||||
|
}
|
||||||
|
},
|
||||||
_ => {
|
_ => {
|
||||||
format!("{} {}",
|
format!("{} {}",
|
||||||
DOTS_THREE_CIRCLE,
|
DOTS_THREE_CIRCLE,
|
||||||
|
@ -353,12 +377,10 @@ impl WalletTransactions {
|
||||||
let tx_h = tx.height.unwrap_or(1) - 1;
|
let tx_h = tx.height.unwrap_or(1) - 1;
|
||||||
if tx_h != 0 {
|
if tx_h != 0 {
|
||||||
let left_conf = height - tx_h;
|
let left_conf = height - tx_h;
|
||||||
let conf_info = if tx_h != 0 && height >= tx_h &&
|
if height >= tx_h && left_conf < COINBASE_MATURITY {
|
||||||
left_conf < COINBASE_MATURITY {
|
let conf_info = format!("{}/{}",
|
||||||
format!("{}/{}", left_conf, COINBASE_MATURITY)
|
left_conf,
|
||||||
} else {
|
COINBASE_MATURITY);
|
||||||
"".to_string()
|
|
||||||
};
|
|
||||||
format!("{} {} {}",
|
format!("{} {} {}",
|
||||||
DOTS_THREE_CIRCLE,
|
DOTS_THREE_CIRCLE,
|
||||||
t!("wallets.tx_confirming"),
|
t!("wallets.tx_confirming"),
|
||||||
|
@ -369,6 +391,11 @@ impl WalletTransactions {
|
||||||
DOTS_THREE_CIRCLE,
|
DOTS_THREE_CIRCLE,
|
||||||
t!("wallets.tx_confirmed"))
|
t!("wallets.tx_confirmed"))
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
format!("{} {}",
|
||||||
|
DOTS_THREE_CIRCLE,
|
||||||
|
t!("wallets.tx_confirmed"))
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
TxLogEntryType::TxSent | TxLogEntryType::TxReceived => {
|
TxLogEntryType::TxSent | TxLogEntryType::TxReceived => {
|
||||||
|
|
|
@ -203,6 +203,7 @@ impl WalletTransactionModal {
|
||||||
if let Ok(_) = res {
|
if let Ok(_) = res {
|
||||||
self.show_finalization = false;
|
self.show_finalization = false;
|
||||||
self.finalize_edit = "".to_string();
|
self.finalize_edit = "".to_string();
|
||||||
|
self.response_edit = "".to_string();
|
||||||
} else {
|
} else {
|
||||||
self.finalize_error = true;
|
self.finalize_error = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue