diff --git a/src/app_service/service/transaction/service.nim b/src/app_service/service/transaction/service.nim index 734e736bc7..7a2bc06648 100644 --- a/src/app_service/service/transaction/service.nim +++ b/src/app_service/service/transaction/service.nim @@ -383,6 +383,8 @@ QtObject: return transactions.MultiTransactionType.MultiTransactionSwap of SendType.Approve: return transactions.MultiTransactionType.MultiTransactionApprove + of SendType.Bridge: + return transactions.MultiTransactionType.MultiTransactionBridge else: return transactions.MultiTransactionType.MultiTransactionSend diff --git a/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml b/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml index 2ac8a2bfbd..723d3dd151 100644 --- a/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml +++ b/ui/app/AppLayouts/Wallet/popups/TransactionAddressMenu.qml @@ -345,7 +345,6 @@ StatusMenu { StatusAction { id: sendToAddressAction enabled: false - visibleOnDisabled: true text: { switch(d.addressType) { case TransactionAddressMenu.AddressType.Sender: diff --git a/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml b/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml index 2ba56367a5..7e40a99ef1 100644 --- a/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml +++ b/ui/app/AppLayouts/Wallet/views/TransactionDetailView.qml @@ -101,7 +101,7 @@ Item { return outSymbol || !transaction.tokenOutAddress ? formatted : "%1 (%2)".arg(formatted).arg(Utils.compactAddress(transaction.tokenOutAddress, 4)) } readonly property real feeEthValue: d.details ? RootStore.getFeeEthValue(d.details.totalFees) : 0 - readonly property real feeFiatValue: d.isTransactionValid ? RootStore.getFiatValue(d.feeEthValue, Constants.ethToken) : 0 + readonly property real feeFiatValue: RootStore.getFiatValue(d.feeEthValue, Constants.ethToken) readonly property int transactionType: d.isTransactionValid ? WalletStores.RootStore.transactionType(transaction) : Constants.TransactionType.Send readonly property bool isBridge: d.transactionType === Constants.TransactionType.Bridge @@ -289,7 +289,7 @@ Item { case Constants.TransactionType.Swap: return Constants.tokenIcon(d.inSymbol) case Constants.TransactionType.Bridge: - return Style.svg(RootStore.Icon(d.transaction.chainIdIn)) ?? Style.svg("network/Network=Custom") + return Style.svg(ModelUtils.getByKey(RootStore.flatNetworks, "chainId", d.transaction.chainIdIn, "iconUrl")) ?? Style.svg("network/Network=Custom") default: return "" } diff --git a/ui/imports/shared/controls/TransactionDelegate.qml b/ui/imports/shared/controls/TransactionDelegate.qml index 3190e05c79..b93b9fc80a 100644 --- a/ui/imports/shared/controls/TransactionDelegate.qml +++ b/ui/imports/shared/controls/TransactionDelegate.qml @@ -61,8 +61,6 @@ StatusListItem { readonly property double inFiatValue: isModelDataValid && isMultiTransaction ? rootStore.getFiatValue(inCryptoValue, modelData.inSymbol): 0.0 readonly property double outCryptoValue: isModelDataValid ? modelData.outAmount : 0.0 readonly property double outFiatValue: isModelDataValid && isMultiTransaction ? rootStore.getFiatValue(outCryptoValue, modelData.outSymbol): 0.0 - readonly property double feeCryptoValue: 0.0 // TODO fill when bridge data is implemented - readonly property double feeFiatValue: 0.0 // TODO fill when bridge data is implemented readonly property string networkColor: isModelDataValid ? SQUtils.ModelUtils.getByKey(rootStore.flatNetworks, "chainId", modelData.chainId, "chainColor") : "" readonly property string networkName: isModelDataValid ? SQUtils.ModelUtils.getByKey(rootStore.flatNetworks, "chainId", modelData.chainId, "chainName") : "" readonly property string networkNameIn: isMultiTransaction ? SQUtils.ModelUtils.getByKey(rootStore.flatNetworks, "chainId", modelData.chainIdIn, "chainName") : "" @@ -589,8 +587,8 @@ StatusListItem { return qsTr("%1 to %2 on %3").arg(outTransactionValue).arg(inTransactionValue).arg(networkName) case Constants.TransactionType.Bridge: if (allAccounts) - return qsTr("%1 from %2 to %3 in %4").arg(inTransactionValue).arg(networkNameOut).arg(networkNameIn).arg(fromAddress) - return qsTr("%1 from %2 to %3").arg(inTransactionValue).arg(networkNameOut).arg(networkNameIn) + return qsTr("%1 from %2 to %3 in %4").arg(outTransactionValue).arg(networkNameOut).arg(networkNameIn).arg(fromAddress) + return qsTr("%1 from %2 to %3").arg(outTransactionValue).arg(networkNameOut).arg(networkNameIn) case Constants.TransactionType.ContractDeployment: const name = addressNameTo || addressNameFrom return qsTr("Via %1 on %2").arg(name).arg(networkName) @@ -807,7 +805,6 @@ StatusListItem { .arg(Theme.palette.successColor1) .arg(inValue) case Constants.TransactionType.Bridge: - return "−" + root.rootStore.formatCurrencyAmount(feeCryptoValue, modelData.symbol) case Constants.TransactionType.Approve: default: return "" @@ -853,7 +850,6 @@ StatusListItem { return "-%1 / +%2".arg(root.rootStore.formatCurrencyAmount(root.outFiatValue, root.currentCurrency)) .arg(root.rootStore.formatCurrencyAmount(root.inFiatValue, root.currentCurrency)) case Constants.TransactionType.Bridge: - return "−" + root.rootStore.formatCurrencyAmount(root.feeFiatValue, root.currentCurrency) case Constants.TransactionType.Approve: default: return ""