fix(ens): Various ENS-related UI fixes (#10492)

This commit is contained in:
Igor Sirotin 2023-05-01 23:32:36 +03:00 committed by GitHub
parent abf58b008f
commit 7dfd13ca77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 12 additions and 16 deletions

View File

@ -6,7 +6,7 @@ password = input()
hasher = sha3.keccak_256() hasher = sha3.keccak_256()
hasher.update(password.encode()) hasher.update(password.encode())
hash = '0x' + hasher.hexdigest().upper() hash = '0x' + hasher.hexdigest()
pyperclip.copy(hash) pyperclip.copy(hash)
print(f'Hash: {hash} is copied to clipboard') print(f'Hash: {hash} is copied to clipboard')

View File

@ -143,7 +143,11 @@ QtObject:
var response: JsonNode var response: JsonNode
try: try:
response = status_ens.getEnsUsernames().result let rpcResponse = status_ens.getEnsUsernames()
if rpcResponse.error != nil:
error "failed to get ens usernames", procName="getAllMyEnsUsernames", error = $rpcResponse.error
return
response = rpcResponse.result
except Exception as e: except Exception as e:
error "error occurred", procName="getAllMyEnsUsernames", msg = e.msg error "error occurred", procName="getAllMyEnsUsernames", msg = e.msg
return return

View File

@ -82,9 +82,7 @@ StatusSectionLayout {
root.store.backButtonName = "" root.store.backButtonName = ""
if (currentIndex === Constants.settingsSubsection.ensUsernames) { if (currentIndex === Constants.settingsSubsection.contacts) {
ensContainer.item.goToStart()
} else if (currentIndex === Constants.settingsSubsection.contacts) {
root.store.backButtonName = root.store.getNameForSubsection(Constants.settingsSubsection.messaging) root.store.backButtonName = root.store.getNameForSubsection(Constants.settingsSubsection.messaging)
} else if (currentIndex === Constants.settingsSubsection.wallet) { } else if (currentIndex === Constants.settingsSubsection.wallet) {
walletView.item.resetStack() walletView.item.resetStack()

View File

@ -230,6 +230,7 @@ Item {
amISender: false amISender: false
sender.displayName: root.ensUsernamesStore.preferredUsername sender.displayName: root.ensUsernamesStore.preferredUsername
sender.profileImage.assetSettings.isImage: true sender.profileImage.assetSettings.isImage: true
sender.profileImage.assetSettings.color: Utils.colorForPubkey(root.ensUsernamesStore.pubkey)
sender.profileImage.name: root.ensUsernamesStore.icon sender.profileImage.name: root.ensUsernamesStore.icon
} }
} }

View File

@ -31,26 +31,19 @@ Item {
signal goToWelcome(); signal goToWelcome();
signal goToList(); signal goToList();
function goToStart(){
if(ensView.ensUsernamesStore.ensUsernamesModel.count > 0){
goToList();
} else {
goToWelcome();
}
}
Layout.fillHeight: true Layout.fillHeight: true
Layout.fillWidth: true Layout.fillWidth: true
clip: true clip: true
DSM.StateMachine { DSM.StateMachine {
id: stateMachine id: stateMachine
initialState: welcomeState initialState: ensView.ensUsernamesStore.ensUsernamesModel.count > 0 ? listState : welcomeState
running: true running: true
DSM.State { DSM.State {
id: welcomeState id: welcomeState
onEntered: loader.sourceComponent = welcome onEntered: loader.sourceComponent = welcome
DSM.SignalTransition { DSM.SignalTransition {
targetState: searchState targetState: searchState
signal: next signal: next

View File

@ -40,7 +40,7 @@ Item {
anchors.top: parent.top anchors.top: parent.top
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
source: Style.png("ens-header-" + Style.current.name + "@2x") source: Style.png("ens/ens-header-" + Style.current.name + "@2x")
cache: false cache: false
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB