feat(@desktop/wallet): Remove network prefixes from main wallet accounts list

This commit is contained in:
Khushboo Mehta 2024-10-02 21:56:17 +02:00 committed by Khushboo-dev-cpp
parent 16a403e3e5
commit 95369bca11
4 changed files with 3 additions and 17 deletions

View File

@ -3,7 +3,6 @@ import QtQuick 2.14
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Core 0.1
import StatusQ.Core.Utils 0.1 as SQUtils
import AppLayouts.Wallet 1.0
@ -20,8 +19,7 @@ StatusListItem {
objectName: account.name
title: account.name
subTitle: SQUtils.Utils.elideText(account.address, 6, 4)
statusListItemSubTitle.customColor: sensor.containsMouse ? Theme.palette.directColor1 : Theme.palette.baseColor1
subTitle: WalletUtils.addressToDisplay(account.address, true, sensor.containsMouse)
asset.color: !!account.colorId ? Utils.getColorForId(account.colorId): ""
asset.emoji: account.emoji
asset.name: !account.emoji ? "filled-account": ""

View File

@ -267,8 +267,6 @@ ColumnLayout {
accountName: !!root.account ? root.account.name : ""
accountAddress: !!root.account ? root.account.address : ""
accountDerivationPath: !!root.account ? root.account.path : ""
// TODO: remove in when RemoveAccountConfirmationPopup.qml removes preferred networks
preferredSharingNetworkShortNames: ""
emoji: !!root.account ? root.account.emoji : ""
color: !!root.account ? Utils.getColorForId(root.account.colorId) : ""

View File

@ -69,13 +69,7 @@ Rectangle {
address: {
if (!account)
return ""
let address = account.address
const preferredChains = account.preferredSharingChainIds
if (!!preferredChains) {
const shortNames = WalletUtils.getNetworkShortNames(preferredChains, root.networkConnectionStore.filteredflatNetworks)
address = `${shortNames}${address}`
}
return address
return account.address
}
name: account ? account.name : ""
walletType: account ? account.walletType : ""
@ -108,7 +102,6 @@ Rectangle {
removeAccountConfirmation.accountName = account.name
removeAccountConfirmation.accountAddress = account.address
removeAccountConfirmation.accountDerivationPath = account.path
removeAccountConfirmation.preferredSharingChainIds = account.preferredSharingChainIds
removeAccountConfirmation.emoji = account.emoji
removeAccountConfirmation.colorId = account.colorId
removeAccountConfirmation.active = true
@ -131,7 +124,6 @@ Rectangle {
property string accountName
property string accountAddress
property string accountDerivationPath
property string preferredSharingChainIds
property string emoji
property string colorId
@ -140,7 +132,6 @@ Rectangle {
accountName: removeAccountConfirmation.accountName
accountAddress: removeAccountConfirmation.accountAddress
accountDerivationPath: removeAccountConfirmation.accountDerivationPath
preferredSharingNetworkShortNames: RootStore.getNetworkShortNames(removeAccountConfirmation.preferredSharingChainIds)
emoji: removeAccountConfirmation.emoji
color: Utils.getColorForId(removeAccountConfirmation.colorId)

View File

@ -22,7 +22,6 @@ StatusDialog {
required property string accountName
required property string accountAddress
required property string accountDerivationPath
required property string preferredSharingNetworkShortNames
required property string emoji
required property string color
@ -47,7 +46,7 @@ StatusDialog {
header: StatusDialogHeader {
headline.title: qsTr("Remove %1").arg(root.accountName)
headline.subtitle: WalletUtils.colorizedChainPrefix(root.preferredSharingNetworkShortNames) + StatusQUtils.Utils.elideText(root.accountAddress, 6, 4)
headline.subtitle: StatusQUtils.Utils.elideText(root.accountAddress, 6, 4)
actions.closeButton.onClicked: root.close()
leftComponent: StatusSmartIdenticon {
asset.emoji: root.emoji