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 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)
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue