fix(Wallet/SendModal): Using community assets in SendModal unblocked

Closes: #15766
This commit is contained in:
Michał Cieślak 2024-08-01 12:17:36 +02:00 committed by Michał
parent 5cae2edf08
commit bb05c068fa
6 changed files with 11 additions and 8 deletions

View File

@ -178,6 +178,9 @@ Item {
spacing: 8 spacing: 8
StatusListItem { StatusListItem {
// Temporarily disabled, refer to https://github.com/status-im/status-desktop/issues/15955 for details.
visible: false
Layout.fillWidth: true Layout.fillWidth: true
title: qsTr("Show community assets when sending tokens") title: qsTr("Show community assets when sending tokens")
@ -199,6 +202,7 @@ Item {
} }
} }
StatusDialogDivider { StatusDialogDivider {
visible: false
Layout.fillWidth: true Layout.fillWidth: true
} }
StatusListItem { StatusListItem {

View File

@ -318,10 +318,11 @@ Item {
root.sendModalPopup) root.sendModalPopup)
return return
} }
// Common send modal popup: // Common send modal popup:
root.sendModalPopup.preSelectedAccountAddress = fromAddress root.sendModalPopup.preSelectedAccountAddress = fromAddress
root.sendModalPopup.preSelectedSendType = Constants.SendType.Transfer root.sendModalPopup.preSelectedSendType = Constants.SendType.Transfer
root.sendModalPopup.preSelectedHoldingID = walletStore.currentViewedHoldingID root.sendModalPopup.preSelectedHoldingID = walletStore.currentViewedHoldingTokensKey
root.sendModalPopup.preSelectedHoldingType = walletStore.currentViewedHoldingType root.sendModalPopup.preSelectedHoldingType = walletStore.currentViewedHoldingType
root.sendModalPopup.onlyAssets = false root.sendModalPopup.onlyAssets = false
root.sendModalPopup.open() root.sendModalPopup.open()

View File

@ -162,8 +162,7 @@ Control {
const entry = ModelUtils.getByKey(assetsModel, "tokensKey", key) const entry = ModelUtils.getByKey(assetsModel, "tokensKey", key)
highlightedKey = key highlightedKey = key
setCurrentAndClose(entry.symbol, setCurrentAndClose(entry.symbol, entry.iconSource)
Constants.tokenIcon(entry.symbol))
root.assetSelected(key) root.assetSelected(key)
} }

View File

@ -267,8 +267,6 @@ Control {
section.property: "type" section.property: "type"
section.delegate: StatusBaseText { section.delegate: StatusBaseText {
id: sectionTitle
color: Theme.palette.baseColor1 color: Theme.palette.baseColor1
topPadding: Style.current.padding topPadding: Style.current.padding

View File

@ -108,7 +108,9 @@ QtObject {
} }
// Property and methods below are used to apply advanced token management settings to the SendModal // Property and methods below are used to apply advanced token management settings to the SendModal
readonly property bool showCommunityAssetsInSend: root._allTokensModule.showCommunityAssetWhenSendingTokens
// Temporarily disabled, refer to https://github.com/status-im/status-desktop/issues/15955 for details.
readonly property bool showCommunityAssetsInSend: true //root._allTokensModule.showCommunityAssetWhenSendingTokens
readonly property bool displayAssetsBelowBalance: root._allTokensModule.displayAssetsBelowBalance readonly property bool displayAssetsBelowBalance: root._allTokensModule.displayAssetsBelowBalance
signal displayAssetsBelowBalanceThresholdChanged() signal displayAssetsBelowBalanceThresholdChanged()

View File

@ -229,11 +229,10 @@ RightTabBaseView {
swapVisible: Global.featureFlags.swapEnabled swapVisible: Global.featureFlags.swapEnabled
onSendRequested: { onSendRequested: {
const symbol = ModelUtils.getByKey(model, "key", key, "symbol")
const modal = root.sendModal const modal = root.sendModal
modal.preSelectedSendType = Constants.SendType.Transfer modal.preSelectedSendType = Constants.SendType.Transfer
modal.preSelectedHoldingID = symbol modal.preSelectedHoldingID = key
modal.preSelectedHoldingType = Constants.TokenType.ERC20 modal.preSelectedHoldingType = Constants.TokenType.ERC20
modal.onlyAssets = true modal.onlyAssets = true
modal.open() modal.open()