fix(@desktop/wallet): Update wallet account color correctly (#11008)
This commit is contained in:
parent
a465417981
commit
f0b42ad672
|
@ -160,6 +160,10 @@ Item {
|
|||
id: transactionDetailView
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
onVisibleChanged: {
|
||||
if (!visible)
|
||||
transaction = null
|
||||
}
|
||||
sendModal: root.sendModal
|
||||
contactsStore: root.contactsStore
|
||||
visible: (stack.currentIndex === 3)
|
||||
|
|
|
@ -73,11 +73,17 @@ Item {
|
|||
readonly property var prefixAndAddress: Utils.splitToChainPrefixAndAddress(root.address)
|
||||
readonly property bool isContact: contactData.isContact
|
||||
readonly property bool isWallet: !isContact && !!walletAddressName
|
||||
property var contactData: Utils.getContactDetailsAsJson(d.contactPubKey)
|
||||
property string savedAddressName: !!root.rootStore ? root.rootStore.getNameForSavedWalletAddress(root.address) : ""
|
||||
property string walletAddressName: !!root.rootStore ? root.rootStore.getNameForWalletAddress(root.address) : ""
|
||||
property string walletAddressEmoji: !!root.rootStore ? root.rootStore.getEmojiForWalletAddress(root.address) : ""
|
||||
property string walletAddressColor: !!root.rootStore ? root.rootStore.getColorForWalletAddress(root.address) : ""
|
||||
property var contactData
|
||||
property string savedAddressName
|
||||
property string walletAddressName
|
||||
property string walletAddressEmoji
|
||||
property string walletAddressColor
|
||||
|
||||
Component.onCompleted: {
|
||||
refreshContactData()
|
||||
refreshSavedAddressName()
|
||||
refreshWalletAddress()
|
||||
}
|
||||
|
||||
function refreshContactData() {
|
||||
d.contactData = Utils.getContactDetailsAsJson(d.contactPubKey)
|
||||
|
@ -90,7 +96,7 @@ Item {
|
|||
function refreshWalletAddress() {
|
||||
d.walletAddressName = !!root.rootStore ? root.rootStore.getNameForWalletAddress(root.address) : ""
|
||||
d.walletAddressEmoji = !!root.rootStore ? root.rootStore.getEmojiForWalletAddress(root.address) : ""
|
||||
d.walletAddressColor = !!root.rootStore ? root.rootStore.getColorForWalletAddress(root.address) : ""
|
||||
d.walletAddressColor = Utils.getColorForId(!!root.rootStore ? root.rootStore.getColorForWalletAddress(root.address) : "")
|
||||
}
|
||||
|
||||
function getName() {
|
||||
|
|
Loading…
Reference in New Issue