-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: export error log and show error modals on transaction errors #3408
base: develop
Are you sure you want to change the base?
Conversation
Deployed to feat-error-logs-export.wallet.z52da5wt.xyz, artifacts |
5535374
to
1a66f2e
Compare
Deployed to feat-error-logs-export.wallet.z52da5wt.xyz, artifacts |
1a66f2e
to
4670e10
Compare
Deployed to feat-error-logs-export.wallet.z52da5wt.xyz, artifacts |
</div> | ||
|
||
<h2 class="text-heading-4 text-center"> | ||
{{ $t('pages.errors-log-settings.disableDialog.title') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bart, would've suggest to put it into v-text
. Same in other places in this file.
<style lang="scss" scoped> | ||
@use '@/styles/variables' as *; | ||
@use '@/styles/typography'; | ||
@use '@/styles/mixins'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@use '@/styles/mixins'; |
This is not used in the file.
@@ -37,6 +37,14 @@ | |||
|
|||
<template #footer> | |||
<slot name="footer"> | |||
<BtnMain | |||
v-if="icon === 'critical' && saveErrorLogEnabled" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Decision to make it part of existing Default
modal, had a bad side effect. For example now we would get a Export error log
button for connection statuses. I think modal name Default
should not have such side effects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the existing, unused, ErrorLog modal with one that uses the Default
modal and replaces the footer
with the appropriate buttons.
@@ -91,7 +90,9 @@ export default defineComponent({ | |||
} | |||
|
|||
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
@@ -493,7 +494,7 @@ export default defineComponent({ | |||
recipient, | |||
selectedAsset, | |||
}); | |||
router.push({ name: homeRouteName.value, query: { latestTxHash: hash } }); | |||
if (hash) router.push({ name: homeRouteName.value, query: { latestTxHash: hash } }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (hash) router.push({ name: homeRouteName.value, query: { latestTxHash: hash } }); | |
if (hash) { | |
router.push({ name: homeRouteName.value, query: { latestTxHash: hash } }); | |
} |
@@ -210,7 +210,8 @@ import { Encoded } from '@aeternity/aepp-sdk'; | |||
|
|||
import type { ICreateMultisigAccount, ObjectValues } from '@/types'; | |||
import { MODAL_ADDRESS_BOOK_ACCOUNT_SELECTOR, PROTOCOLS } from '@/constants'; | |||
import { excludeFalsy, handleUnknownError } from '@/utils'; | |||
import { tg } from '@/popup/plugins/i18n'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to export tg
in this file? Every other place is using t
from i18n
module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced with t
src/lib/logger.ts
Outdated
@@ -99,10 +113,6 @@ export default class Logger { | |||
time: Date.now(), | |||
}; | |||
WalletStorage.set(STORAGE_KEYS.errorLog, [...errorLog, logEntry]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Idea was also to collect data only for last month/week (better consult it).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed to keep the last 1000 entries. Updated the code and wording of the Error Log Settings page.
4670e10
to
3c602d3
Compare
Deployed to feat-error-logs-export.wallet.z52da5wt.xyz, artifacts |
/> | ||
</IconBoxed> | ||
</div> | ||
<h2 class="text-heading-4 text-center" v-text="$t('pages.errors-log-settings.disableDialog.title')" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have an unspoken rule to have each attribute at a new line in the template.
3c602d3
to
7a8d224
Compare
Deployed to feat-error-logs-export.wallet.z52da5wt.xyz, artifacts |
closes: #3039