fix(@desktop/wallet): Handle empty activity list exception (#11399)

fixes #11354
fixes #11381
This commit is contained in:
Cuteivist 2023-07-06 14:59:26 +02:00 committed by GitHub
parent 04a63ce07d
commit ab487d40a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -174,9 +174,12 @@ QtObject:
if res.errorCode != ErrorCodeSuccess:
error "error fetching activity entries: ", res.errorCode
return
let entries = self.backendToPresentation(res.activities)
self.model.setEntries(entries, res.offset, res.hasMore)
try:
let entries = self.backendToPresentation(res.activities)
self.model.setEntries(entries, res.offset, res.hasMore)
except Exception as e:
error "Error converting activity entries: ", e.msg
proc updateFilter*(self: Controller) {.slot.} =
self.status.setLoadingData(true)

View File

@ -23,12 +23,19 @@ Item {
property var sendModalPopup
property var networkConnectionStore
onVisibleChanged: resetView()
function showSigningPhrasePopup(){
if(!hideSignPhraseModal && !RootStore.hideSignPhraseModal){
signPhrasePopup.open();
}
}
function resetView() {
if (!!rightPanelStackView.currentItem.resetView)
rightPanelStackView.currentItem.resetView()
}
SignPhraseModal {
id: signPhrasePopup
onRemindLaterClicked: hideSignPhraseModal = true
@ -89,13 +96,11 @@ Item {
anchors.fill: parent
changeSelectedAccount: function(address) {
RootStore.setFilterAddress(address)
if (!!rightPanelStackView.currentItem.resetView)
rightPanelStackView.currentItem.resetView()
root.resetView()
}
selectAllAccounts: function() {
RootStore.setFillterAllAddresses()
if (!!rightPanelStackView.currentItem.resetView)
rightPanelStackView.currentItem.resetView()
root.resetView()
}
onShowSavedAddressesChanged: {
if(showSavedAddresses)