MCPcopy Create free account
hub / github.com/ElementsProject/elements / setBalance

Method setBalance

src/qt/sendcoinsdialog.cpp:720–733  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720void SendCoinsDialog::setBalance(const interfaces::WalletBalances& balances)
721{
722 if(model && model->getOptionsModel())
723 {
724 CAmount balance = valueFor(balances.balance, ::policyAsset);
725 if (model->wallet().hasExternalSigner()) {
726 ui->labelBalanceName->setText(tr("External balance:"));
727 } else if (model->wallet().privateKeysDisabled()) {
728 balance = valueFor(balances.watch_only_balance, ::policyAsset);
729 ui->labelBalanceName->setText(tr("Watch-only balance:"));
730 }
731 ui->labelBalance->setText(BitcoinUnits::formatWithUnit(model->getOptionsModel()->getDisplayUnit(), balance));
732 }
733}
734
735void SendCoinsDialog::updateDisplayUnit()
736{

Callers

nothing calls this directly

Calls 7

valueForFunction · 0.85
hasExternalSignerMethod · 0.80
setTextMethod · 0.80
privateKeysDisabledMethod · 0.80
getDisplayUnitMethod · 0.80
getOptionsModelMethod · 0.45
walletMethod · 0.45

Tested by

no test coverage detected