| 492 | } |
| 493 | |
| 494 | void 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 | |
| 506 | void BitcoinAmountField::setDisplayUnit(int newUnit) |
| 507 | { |
no test coverage detected