discussed changes

This commit is contained in:
cyan 2025-01-02 15:53:30 +00:00
parent b722d2180c
commit 9951d15244
2 changed files with 6 additions and 6 deletions

View file

@ -267,11 +267,11 @@ abstract class MoneroWalletBase extends WalletBase<MoneroBalance,
} }
bool needExportOutputs(int amount) { bool needExportOutputs(int amount) {
// printV("viewOnlyBalance: ${monero.Wallet_viewOnlyBalance(wptr!, accountIndex: walletAddresses.account!.id)}"); // viewOnlyBalance - balance that we can spend
// printV(" balance: ${monero.Wallet_balance(wptr!, accountIndex: walletAddresses.account!.id)}"); // TODO(mrcyjanek): remove hasUnknownKeyImages when we cleanup coin control
return monero.Wallet_hasUnknownKeyImages(wptr!) || return (monero.Wallet_viewOnlyBalance(wptr!,
(monero.Wallet_viewOnlyBalance(wptr!, accountIndex: walletAddresses.account!.id) < amount) ||
accountIndex: walletAddresses.account!.id) < amount); monero.Wallet_hasUnknownKeyImages(wptr!);
} }
@override @override

View file

@ -422,7 +422,7 @@ class SendPage extends BasePage {
await Navigator.of(context).pushNamed(Routes.urqrAnimatedPage, arguments: 'export-outputs'); await Navigator.of(context).pushNamed(Routes.urqrAnimatedPage, arguments: 'export-outputs');
} }
if (monero!.needExportOutputs(sendViewModel.wallet, amount)) { if (monero!.needExportOutputs(sendViewModel.wallet, amount)) {
throw Exception("You need to export outputs first"); return;
} }
} }