Skip to content

Commit

Permalink
Merge remote-tracking branch 'shillo/elysium-lelantus' into elysium-l…
Browse files Browse the repository at this point in the history
…elantus
  • Loading branch information
sproxet committed Dec 22, 2021
2 parents 4a01ccf + 667f008 commit f1b293f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 63 deletions.
2 changes: 1 addition & 1 deletion src/qt/createtokendialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void CreateTokenDialog::onCreateButtonClicked()
}

std::string fromAddress = ui->addressLineEdit->text().toStdString();
if (fromAddress.size() == 0 || !!model->validateAddress(ui->addressLineEdit->text())) {
if (fromAddress.size() == 0 || !model->validateAddress(ui->addressLineEdit->text())) {
ui->addressLineEdit->setValid(false);
Q_EMIT message(tr("Invalid address"), tr("Invalid FIRO address entered."), CClientUIInterface::MSG_ERROR);
return;
Expand Down
20 changes: 10 additions & 10 deletions src/qt/elysiumprivatesenddialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,14 @@ void ElysiumPrivateSendDialog::updateAmountFieldValidators()
bool divisible = isPropertyDivisible(propertyId);
if (divisible) {
ui->amountLineEdit->setValidator(divisibleQuantityValidator);
ui->referenceAmountLineEdit->setValidator(divisibleQuantityValidator);
// ui->referenceAmountLineEdit->setValidator(divisibleQuantityValidator);
} else {
ui->amountLineEdit->setValidator(indivisibleQuantityValidator);
ui->referenceAmountLineEdit->setValidator(indivisibleQuantityValidator);
// ui->referenceAmountLineEdit->setValidator(indivisibleQuantityValidator);
}

FormatElysiumAmount(ui->amountLineEdit, divisible);
FormatElysiumAmount(ui->referenceAmountLineEdit, divisible);
// FormatElysiumAmount(ui->referenceAmountLineEdit, divisible);
}

void ElysiumPrivateSendDialog::onClearButtonClicked()
Expand All @@ -156,7 +156,7 @@ void ElysiumPrivateSendDialog::clear()
{
ui->sendToLineEdit->clear();
ui->amountLineEdit->clear();
ui->referenceAmountLineEdit->clear();
// ui->referenceAmountLineEdit->clear();
}

void ElysiumPrivateSendDialog::onSendButtonClicked()
Expand Down Expand Up @@ -189,12 +189,12 @@ void ElysiumPrivateSendDialog::onSendButtonClicked()
return;
}

amountString = ui->referenceAmountLineEdit->text().toStdString();
int64_t referenceAmount = amountString.size() == 0 ? 0 : elysium::StrToInt64(amountString, divisible);
if ((0.01 * COIN) < referenceAmount) {
Q_EMIT message(tr("Invalid reference amount"), tr("Reference amount higher is than 0.01 FIRO."), CClientUIInterface::MSG_ERROR);
return;
}
// amountString = ui->referenceAmountLineEdit->text().toStdString();
int64_t referenceAmount = 0; //amountString.size() == 0 ? 0 : elysium::StrToInt64(amountString, divisible);
// if ((0.01 * COIN) < referenceAmount) {
// Q_EMIT message(tr("Invalid reference amount"), tr("Reference amount higher is than 0.01 FIRO."), CClientUIInterface::MSG_ERROR);
// return;
// }

if (!IsFeatureActivated(FEATURE_LELANTUS, GetHeight())) {
Q_EMIT message(tr("Lelantus Error"), tr("Lelantus feature is not activated yet."), CClientUIInterface::MSG_ERROR);
Expand Down
49 changes: 0 additions & 49 deletions src/qt/forms/elysiumprivatesenddialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -155,55 +155,6 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="referenceAmountLabel">
<property name="text">
<string>Reference Amount:</string>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="referenceAmountLineEdit">
<property name="minimumSize">
<size>
<width>133</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>240</width>
<height>16777215</height>
</size>
</property>
<property name="toolTip">
<string>If left empty a default amount will be used.</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="placeholderText">
<string>(Optional)</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
Expand Down
6 changes: 3 additions & 3 deletions src/qt/walletview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ void WalletView::setupElysiumTokensPage()
setupToolboxPage();

elysiumTokensTabs = new QTabWidget();
elysiumTokensTabs->addTab(elysiumPrivateSendPage, tr("Send"));
elysiumTokensTabs->addTab(elyAssetsPage, tr("Balances"));
elysiumTokensTabs->addTab(elysiumPrivateSendPage, tr("Send"));
elysiumTokensTabs->addTab(mintTokenPage, tr("Anonymize"));
elysiumTokensTabs->addTab(elysiumTransactionsView, tr("Transactions"));
elysiumTokensTabs->addTab(createTokenPage, tr("Create"));
elysiumTokensTabs->addTab(mintTokenPage, tr("Anonymize"));
elysiumTokensTabs->addTab(manageTokenPage, tr("Manage Tokens"));
elysiumTokensTabs->addTab(manageTokenPage, tr("Managed Tokens"));
elysiumTokensTabs->addTab(toolboxPage, tr("Toolbox"));

auto pageLayout = new QVBoxLayout();
Expand Down

0 comments on commit f1b293f

Please sign in to comment.