fix(desktop/wallet): Fixed `Save` button not enabled when ENS name
is entered in address input in when adding a new saved address. Fixes #10640
This commit is contained in:
parent
b27954904b
commit
e122c2e3c7
|
@ -129,6 +129,10 @@ def step(context, account_name, amount, token, chain_name, password):
|
|||
def step(context, name, address):
|
||||
_walletScreen.add_saved_address(name, address)
|
||||
|
||||
@When("the user adds a saved address named \"|any|\" and ENS name \"|any|\"")
|
||||
def step(context, name, ens_name):
|
||||
_walletScreen.add_saved_address(name, ens_name)
|
||||
|
||||
@When("the user edits a saved address with name \"|any|\" to \"|any|\"")
|
||||
def step(context, name, new_name):
|
||||
_walletScreen.edit_saved_address(name, new_name)
|
||||
|
|
|
@ -22,13 +22,16 @@ Feature: Status Desktop Wallet
|
|||
When the user deletes the saved address with name "<new_name>"
|
||||
Then the name "<new_name>" is not in the list of saved addresses
|
||||
|
||||
When the user adds a saved address named "<name>" and ENS name "<ens_name>"
|
||||
Then the name "<name>" is in the list of saved addresses
|
||||
|
||||
# Test for toggling favourite button is disabled until favourite functionality is enabled
|
||||
# When the user adds a saved address named "<name>" and address "<address>"
|
||||
# And the user toggles favourite for the saved address with name "<name>"
|
||||
# Then the saved address "<name>" has favourite status "true"
|
||||
Examples:
|
||||
| name | address | new_name |
|
||||
| bar | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | foo |
|
||||
| name | address | new_name | ens_name |
|
||||
| bar | 0x8397bc3c5a60a1883174f722403d63a8833312b7 | foo | status.eth |
|
||||
|
||||
|
||||
#############################################
|
||||
|
|
|
@ -45,13 +45,13 @@ StatusDialog {
|
|||
readonly property int validationMode: root.edit ?
|
||||
StatusInput.ValidationMode.Always
|
||||
: StatusInput.ValidationMode.OnlyWhenDirty
|
||||
readonly property bool valid: addressInput.valid && nameInput.valid && root.address !== Constants.zeroAddress
|
||||
readonly property bool valid: addressInput.valid && nameInput.valid
|
||||
property bool chainShortNamesDirty: false
|
||||
readonly property bool dirty: nameInput.input.dirty || chainShortNamesDirty
|
||||
|
||||
readonly property var chainPrefixRegexPattern: /[^:]+\:?|:/g
|
||||
readonly property string visibleAddress: root.address == Constants.zeroAddress ? "" : root.address
|
||||
readonly property bool addressInputIsENS: !visibleAddress
|
||||
readonly property bool addressInputIsENS: !!root.ens
|
||||
|
||||
/// Ensures that the \c root.address and \c root.chainShortNames are not reset when the initial text is set
|
||||
property bool initialized: false
|
||||
|
@ -135,7 +135,7 @@ StatusDialog {
|
|||
StatusValidator {
|
||||
errorMessage: addressInput.plainText ? qsTr("Please enter a valid address or ENS name.") : ""
|
||||
validate: function (t) {
|
||||
return Utils.isValidAddressWithChainPrefix(t) || Utils.isValidEns(t)
|
||||
return t !== Constants.zeroAddress && (Utils.isValidAddressWithChainPrefix(t) || Utils.isValidEns(t))
|
||||
? true : { actual: t }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue