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:
parent
4424342dd6
commit
2e68c97c8e
|
@ -152,7 +152,7 @@ QtObject:
|
|||
return newQVariant(account.getAssets())
|
||||
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:
|
||||
if(account.getAddress() == address):
|
||||
return account.getAssets().getTokenBalanceOnChain(chainId, tokenSymbol)
|
||||
|
|
|
@ -187,7 +187,7 @@ QtObject:
|
|||
self.tmpSymbol = tokenSymbol
|
||||
|
||||
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.tmpChainId = 0
|
||||
self.tmpSymbol = "ERROR"
|
||||
|
|
|
@ -25,4 +25,5 @@ TokenDelegate {
|
|||
change24Hour.loading: true
|
||||
localeCurrencyBalance.loading: true
|
||||
textColor: Theme.palette.baseColor1
|
||||
enabled: false
|
||||
}
|
||||
|
|
|
@ -64,6 +64,7 @@ StatusListItem {
|
|||
Utils.compactAddress(modelData.from, 4) :
|
||||
""
|
||||
state: "normal"
|
||||
enabled: !loading
|
||||
asset.isImage: !loading
|
||||
asset.name: root.image
|
||||
asset.isLetterIdenticon: loading
|
||||
|
|
Loading…
Reference in New Issue