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

Method setDisplayUnit

src/qt/bitcoinamountfield.cpp:494–504  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492}
493
494void BitcoinAmountField::setDisplayUnit(const CAsset& asset)
495{
496 if (asset == Params().GetConsensus().pegged_asset) {
497 setDisplayUnit(amount->currentPeggedUnit());
498 return;
499 }
500 if (!hasAssetChoice(asset)) {
501 addAssetChoice(asset);
502 }
503 unit->setCurrentIndex(unit->findData(QVariant::fromValue(asset), Qt::UserRole));
504}
505
506void BitcoinAmountField::setDisplayUnit(int newUnit)
507{

Callers 1

unitChangedMethod · 0.45

Calls 2

setDisplayUnitFunction · 0.85
ParamsClass · 0.50

Tested by

no test coverage detected