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

Method addAssetChoice

src/qt/bitcoinamountfield.cpp:421–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421void BitcoinAmountField::addAssetChoice(const CAsset& asset)
422{
423 if (asset == Params().GetConsensus().pegged_asset) {
424 // Special handling
425 for (const auto& pegged_unit : BitcoinUnits::availableUnits()) {
426 unit->addItem(BitcoinUnits::shortName(pegged_unit), int(pegged_unit));
427 }
428 return;
429 }
430 unit->addItem(QString::fromStdString(gAssetsDir.GetIdentifier(asset)), QVariant::fromValue(asset));
431}
432
433void BitcoinAmountField::removeAssetChoice(const CAsset& asset)
434{

Callers

nothing calls this directly

Calls 2

GetIdentifierMethod · 0.80
ParamsClass · 0.50

Tested by

no test coverage detected