Open .slatepack file with the app #13

Merged
ardocrat merged 28 commits from slatepack_ext_file into master 2024-09-16 19:08:27 +03:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit d6ec4213ab - Show all commits

View file

@ -204,8 +204,10 @@ impl WalletTransactions {
});
}
let wallet_loaded = wallet.foreign_api_port().is_some();
// Draw button to show transaction finalization.
if tx.can_finalize {
if wallet_loaded && tx.can_finalize {
let (icon, color) = (CHECK, Some(Colors::green()));
View::item_button(ui, Rounding::default(), icon, color, || {
cb.hide_keyboard();
@ -214,7 +216,6 @@ impl WalletTransactions {
}
// Draw button to cancel transaction.
let wallet_loaded = wallet.foreign_api_port().is_some();
if wallet_loaded && tx.can_cancel() {
let (icon, color) = (PROHIBIT, Some(Colors::red()));
View::item_button(ui, Rounding::default(), icon, color, || {

View file

@ -140,8 +140,10 @@ impl WalletTransactionModal {
return;
}
let wallet_loaded = wallet.foreign_api_port().is_some();
// Draw button to show transaction finalization or transaction info.
if tx.can_finalize {
if wallet_loaded && tx.can_finalize {
let (icon, color) = if self.show_finalization {
(FILE_TEXT, None)
} else {
@ -161,7 +163,6 @@ impl WalletTransactionModal {
}
// Draw button to cancel transaction.
let wallet_loaded = wallet.foreign_api_port().is_some();
if wallet_loaded && tx.can_cancel() {
View::item_button(ui, Rounding::default(), PROHIBIT, Some(Colors::red()), || {
cb.hide_keyboard();