| 377 | return m_wallet->FillPSBT(psbtx, complete, sighash_type, sign, bip32derivs, n_signed); |
| 378 | } |
| 379 | WalletBalances getBalances() override |
| 380 | { |
| 381 | const auto bal = GetBalance(*m_wallet); |
| 382 | WalletBalances result; |
| 383 | result.balance = bal.m_mine_trusted; |
| 384 | result.unconfirmed_balance = bal.m_mine_untrusted_pending; |
| 385 | result.immature_balance = bal.m_mine_immature; |
| 386 | result.have_watch_only = haveWatchOnly(); |
| 387 | if (result.have_watch_only) { |
| 388 | result.watch_only_balance = bal.m_watchonly_trusted; |
| 389 | result.unconfirmed_watch_only_balance = bal.m_watchonly_untrusted_pending; |
| 390 | result.immature_watch_only_balance = bal.m_watchonly_immature; |
| 391 | } |
| 392 | return result; |
| 393 | } |
| 394 | bool tryGetBalances(WalletBalances& balances, uint256& block_hash) override |
| 395 | { |
| 396 | TRY_LOCK(m_wallet->cs_wallet, locked_wallet); |
no test coverage detected