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

Function fixup

src/qt/bitcoinamountfield.cpp:53–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51 }
52
53 void fixup(QString &input) const override
54 {
55 bool valid;
56 CAmount val;
57
58 if (input.isEmpty() && !m_allow_empty) {
59 valid = true;
60 val = m_min_amount;
61 } else {
62 valid = false;
63 val = parse(input, &valid);
64 }
65
66 if(valid)
67 {
68 val = qBound(m_min_amount, val, m_max_amount);
69 input = GUIUtil::formatAssetAmount(current_asset, val, currentUnit, BitcoinUnits::SeparatorStyle::ALWAYS, false);
70 lineEdit()->setText(input);
71 }
72 }
73
74 int currentPeggedUnit() const
75 {

Callers

nothing calls this directly

Calls 3

parseFunction · 0.85
formatAssetAmountFunction · 0.85
setTextMethod · 0.80

Tested by

no test coverage detected