chore(@desktop/wallet): Show wallet activity (#12946)

This commit is contained in:
Cuteivist 2023-12-06 11:59:32 +01:00 committed by GitHub
parent d7614beb99
commit 0b26070833
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 14 deletions

View File

@ -175,6 +175,14 @@ QtObject:
QtProperty[string] txHashIn:
read = getTxHashIn
proc getTxHash*(self: ActivityDetails): string {.slot.} =
if self.txHashOut.len > 0:
return self.txHashOut
return self.txHashIn
QtProperty[string] txHash:
read = getTxHash
proc getInput*(self: ActivityDetails): string {.slot.} =
return self.input

View File

@ -341,16 +341,24 @@ Item {
TransactionDataTile {
width: parent.width
title: qsTr("%1 Tx hash").arg(transactionHeader.networkName)
subTitle: d.isDetailsValid ? d.details.txHashOut : ""
visible: !!subTitle
subTitle: d.isDetailsValid ? d.details.txHash : ""
visible: !!subTitle && !transactionHeader.isMultiTransaction
buttonIconName: "more"
onButtonClicked: addressMenu.openTxMenu(this, subTitle, [d.networkShortName])
}
TransactionDataTile {
width: parent.width
title: qsTr("%1 Tx hash").arg(transactionHeader.networkNameOut)
subTitle: d.isDetailsValid ? d.details.txHashOut : ""
visible: !!subTitle && transactionHeader.isMultiTransaction
buttonIconName: "more"
onButtonClicked: addressMenu.openTxMenu(this, subTitle, [d.networkShortNameOut])
}
TransactionDataTile {
width: parent.width
title: qsTr("%1 Tx hash").arg(transactionHeader.networkNameIn)
subTitle: d.isDetailsValid ? d.details.txHashIn : ""
visible: !!subTitle
visible: !!subTitle && transactionHeader.isMultiTransaction
buttonIconName: "more"
onButtonClicked: addressMenu.openTxMenu(this, subTitle, [d.networkShortNameIn])
}

View File

@ -337,12 +337,17 @@ StatusListItem {
if (!!detailsObj.protocol) {
details += qsTr("Using") + endl + detailsObj.protocol + endl2
}
if (root.isMultiTransaction) {
if (!!detailsObj.txHashOut) {
details += qsTr("%1 Tx hash").arg(root.networkName) + endl + detailsObj.txHashOut + endl2
details += qsTr("%1 Tx hash").arg(root.networkNameOut) + endl + detailsObj.txHashOut + endl2
}
if (!!detailsObj.txHashIn) {
details += qsTr("%1 Tx hash").arg(networkNameIn) + endl + detailsObj.txHashIn + endl2
details += qsTr("%1 Tx hash").arg(root.networkNameIn) + endl + detailsObj.txHashIn + endl2
}
} else if (!!detailsObj.txHash) {
details += qsTr("%1 Tx hash").arg(root.networkName) + endl + detailsObj.txHash + endl2
}
const protocolFromContractAddress = "" // TODO fill protocol contract address for 'from' network for Bridge and Swap
if (!!detailsObj.protocol && !!protocolFromContractAddress) {
details += qsTr("%1 %2 contract address").arg(root.networkName).arg(detailsObj.protocol) + endl
@ -384,10 +389,10 @@ StatusListItem {
}
details += qsTr("Nonce") + endl + detailsObj.nonce + endl2
if (type === Constants.TransactionType.Bridge) {
details += qsTr("Included in Block on %1").arg(networkName) + endl
details += qsTr("Included in Block on %1").arg(networkNameOut) + endl
details += detailsObj.blockNumberOut + endl2
if (detailsObj.blockNumberIn > 0) {
details += qsTr("Included in Block on %1").arg(networkNameOut) + endl
details += qsTr("Included in Block on %1").arg(networkNameIn) + endl
details += detailsObj.blockNumberIn + endl2
}
} else {

View File

@ -39,10 +39,7 @@ ColumnLayout {
}
}
onVisibleChanged: {
if (!visible)
return
Component.onCompleted: {
filterPanelLoader.active = true
if (RootStore.transactionActivityStatus.isFilterDirty) {
WalletStores.RootStore.currentActivityFiltersStore.applyAllFilters()