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 Iuri Matias
parent f57dd4332e
commit 39d533acd4
6 changed files with 11 additions and 8 deletions

View File

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

View File

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

View File

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

View File

@ -267,8 +267,6 @@ Control {
section.property: "type"
section.delegate: StatusBaseText {
id: sectionTitle
color: Theme.palette.baseColor1
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
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
signal displayAssetsBelowBalanceThresholdChanged()

View File

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