fix(@desktop/wallet): Wallet: user can click on dummy loading items from activity-history and open an empty transaction view

fixes #10083
This commit is contained in:
Khushboo Mehta 2023-04-07 13:03:59 +02:00 committed by Khushboo-dev-cpp
parent 4424342dd6
commit 2e68c97c8e
4 changed files with 4 additions and 2 deletions

View File

@ -152,7 +152,7 @@ QtObject:
return newQVariant(account.getAssets()) return newQVariant(account.getAssets())
return nil return nil
proc getTokenBalanceOnChain1*(self: Model, address: string, chainId: int, tokenSymbol: string): CurrencyAmount = proc getTokenBalanceOnChain*(self: Model, address: string, chainId: int, tokenSymbol: string): CurrencyAmount =
for account in self.items: for account in self.items:
if(account.getAddress() == address): if(account.getAddress() == address):
return account.getAssets().getTokenBalanceOnChain(chainId, tokenSymbol) return account.getAssets().getTokenBalanceOnChain(chainId, tokenSymbol)

View File

@ -187,7 +187,7 @@ QtObject:
self.tmpSymbol = tokenSymbol self.tmpSymbol = tokenSymbol
proc getPreparedTokenBalanceOnChain*(self: View): QVariant {.slot.} = proc getPreparedTokenBalanceOnChain*(self: View): QVariant {.slot.} =
let currencyAmount = self.model.getTokenBalanceOnChain1(self.tmpAddress, self.tmpChainId, self.tmpSymbol) let currencyAmount = self.model.getTokenBalanceOnChain(self.tmpAddress, self.tmpChainId, self.tmpSymbol)
self.tmpAddress = "" self.tmpAddress = ""
self.tmpChainId = 0 self.tmpChainId = 0
self.tmpSymbol = "ERROR" self.tmpSymbol = "ERROR"

View File

@ -25,4 +25,5 @@ TokenDelegate {
change24Hour.loading: true change24Hour.loading: true
localeCurrencyBalance.loading: true localeCurrencyBalance.loading: true
textColor: Theme.palette.baseColor1 textColor: Theme.palette.baseColor1
enabled: false
} }

View File

@ -64,6 +64,7 @@ StatusListItem {
Utils.compactAddress(modelData.from, 4) : Utils.compactAddress(modelData.from, 4) :
"" ""
state: "normal" state: "normal"
enabled: !loading
asset.isImage: !loading asset.isImage: !loading
asset.name: root.image asset.name: root.image
asset.isLetterIdenticon: loading asset.isLetterIdenticon: loading