Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix validation message overflow #1882

Merged
merged 2 commits into from
Jul 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions atomic_defi_design/Dex/Wallet/SendModal.qml
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ MultipageModal
{
if (!is_validate_address_busy)
{
needFix = false
address_data = api_wallet_page.validate_address_data
if (address_data.reason !== "")
{
Expand All @@ -235,7 +236,7 @@ MultipageModal
}
if (address_data.convertible)
{
reason.text = address_data.reason;
reason.text = address_data.reason;
if (needFix!==true) needFix = true;
}
}
Expand Down Expand Up @@ -329,7 +330,7 @@ MultipageModal
{
visible: errorView && input_address.text !== ""
Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true
Layout.preferredWidth: 380
spacing: 4

Item { Layout.fillWidth: true }
Expand All @@ -339,16 +340,21 @@ MultipageModal
id: reason

Layout.alignment: Qt.AlignVCenter
Layout.preferredWidth: 320

wrapMode: Text.WrapAtWordBoundaryOrAnywhere
wrapMode: Label.Wrap
color: Dex.CurrentTheme.noColor
text_value: qsTr("The address has to be mixed case.")
}

DefaultButton
{
enabled: !root.is_send_busy
visible: needFix
visible: {
console.log("needFix: " + needFix)
smk762 marked this conversation as resolved.
Show resolved Hide resolved
console.log("address_data.convertible: " + address_data.convertible)
smk762 marked this conversation as resolved.
Show resolved Hide resolved
return needFix
}

Layout.alignment: Qt.AlignVCenter
Layout.leftMargin: 10
Expand Down Expand Up @@ -659,7 +665,7 @@ MultipageModal
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: DefaultText.AlignHCenter

wrapMode: Text.Wrap
wrapMode: Label.Wrap
color: Style.colorRed
text_value: qsTr("Custom Fee can't be higher than the amount") + "\n"
+ qsTr("You have %1", "AMT TICKER").arg(General.formatCrypto("", API.app.get_balance(General.getFeesTicker(current_ticker_infos)), General.getFeesTicker(current_ticker_infos)))
Expand All @@ -672,7 +678,7 @@ MultipageModal
Layout.topMargin: 16
Layout.alignment: Qt.AlignHCenter
horizontalAlignment: DefaultText.AlignHCenter
wrapMode: Text.Wrap
wrapMode: Label.Wrap
visible: !fee_error.visible && !hasFunds()

color: Dex.CurrentTheme.noColor
Expand All @@ -690,6 +696,7 @@ MultipageModal
visible: root.is_send_busy
}


// Footer
RowLayout
{
Expand Down