feat(lite): wire send + new-address GUI to the lite controller (M3/M4)
Route the existing receive/balance/send UI to the lite controller in lite builds, with no per-tab UI changes — the existing buttons just work: - App::createNewZAddress / createNewTAddress: lite branch calls lite_wallet_->newAddress() (synchronous local key derivation), injects the new address into WalletState so the UI selects it next frame, and invokes the receive-tab callback. Placed before the full-node !connected guard. - App::sendTransaction: lite branch builds a LiteSendRequest (DRGX -> zatoshis, memo; `from`/`fee` ignored since the backend selects inputs and adds the fee), fires the controller's async broadcast, and stashes the send_tab callback. - App::update: drains takeBroadcastResult() and delivers txid/error to the stored callback, so the send_tab's existing "sending.../sent" flow works unchanged. All branches guard on lite_wallet_ (null in full-node). Verified: lite app + test suite + full-node variant all build/link clean; hygiene clean. Backup/import UI (export seed/keys, import) is deferred — it needs new secret-display UI rather than an existing button. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -407,6 +407,14 @@ void App::update()
|
||||
if (lite_wallet_->takeRefreshedModel(liteModel)) {
|
||||
wallet::applyLiteRefreshModelToWalletState(liteModel, state_);
|
||||
}
|
||||
// Deliver a completed async send/shield result to the waiting send_tab callback.
|
||||
wallet::LiteBroadcastResult broadcast;
|
||||
if (lite_wallet_->takeBroadcastResult(broadcast)) {
|
||||
if (lite_send_callback_) {
|
||||
lite_send_callback_(broadcast.ok, broadcast.ok ? broadcast.txid : broadcast.error);
|
||||
lite_send_callback_ = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
async_tasks_.reapCompleted();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user