1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 09:28:13 +00:00

feat(core): Remove coin name from CoinJoin confirmation dialog.

[no changelog]
This commit is contained in:
Andrew Kozlik 2022-10-24 20:02:37 +02:00 committed by Andrew Kozlik
parent b7f86ec158
commit 627ef9748f
5 changed files with 3 additions and 12 deletions

View File

@ -776,13 +776,10 @@ extern "C" fn new_confirm_with_info(n_args: usize, args: *const Obj, kwargs: *mu
extern "C" fn new_confirm_coinjoin(n_args: usize, args: *const Obj, kwargs: *mut Map) -> Obj {
let block = move |_args: &[Obj], kwargs: &Map| {
let coin_name: StrBuffer = kwargs.get(Qstr::MP_QSTR_coin_name)?.try_into()?;
let max_rounds: StrBuffer = kwargs.get(Qstr::MP_QSTR_max_rounds)?.try_into()?;
let max_feerate: StrBuffer = kwargs.get(Qstr::MP_QSTR_max_feerate)?.try_into()?;
let paragraphs = Paragraphs::new([
Paragraph::new(&theme::TEXT_NORMAL, "Coin name:".into()),
Paragraph::new(&theme::TEXT_BOLD, coin_name),
Paragraph::new(&theme::TEXT_NORMAL, "Maximum rounds:".into()),
Paragraph::new(&theme::TEXT_BOLD, max_rounds),
Paragraph::new(&theme::TEXT_NORMAL, "Maximum mining fee:".into()),
@ -1263,7 +1260,6 @@ pub static mp_module_trezorui2: Module = obj_module! {
/// def confirm_coinjoin(
/// *,
/// coin_name: str,
/// max_rounds: str,
/// max_feerate: str,
/// ) -> object:

View File

@ -230,7 +230,6 @@ def confirm_with_info(
# rust/src/ui/model_tt/layout.rs
def confirm_coinjoin(
*,
coin_name: str,
max_rounds: str,
max_feerate: str,
) -> object:

View File

@ -84,7 +84,7 @@ async def authorize_coinjoin(
ButtonRequestType.FeeOverThreshold,
)
await confirm_coinjoin(ctx, coin.coin_name, msg.max_rounds, max_fee_per_vbyte)
await confirm_coinjoin(ctx, msg.max_rounds, max_fee_per_vbyte)
authorization.set(msg)

View File

@ -1006,12 +1006,9 @@ async def confirm_modify_fee(
async def confirm_coinjoin(
ctx: wire.GenericContext, coin_name: str, max_rounds: int, max_fee_per_vbyte: str
ctx: wire.GenericContext, max_rounds: int, max_fee_per_vbyte: str
) -> None:
text = Text("Authorize CoinJoin", ui.ICON_RECOVERY, new_lines=False)
text.normal("Coin name: ")
text.bold(f"{coin_name}\n")
text.br_half()
text.normal("Maximum rounds: ")
text.bold(f"{max_rounds}\n")
text.br_half()

View File

@ -917,14 +917,13 @@ async def confirm_modify_fee(
async def confirm_coinjoin(
ctx: wire.GenericContext, coin_name: str, max_rounds: int, max_fee_per_vbyte: str
ctx: wire.GenericContext, max_rounds: int, max_fee_per_vbyte: str
) -> None:
await raise_if_not_confirmed(
interact(
ctx,
_RustLayout(
trezorui2.confirm_coinjoin(
coin_name=coin_name,
max_rounds=str(max_rounds),
max_feerate=f"{max_fee_per_vbyte} sats/vbyte",
)