Skip to content

Commit 6ab1e71

Browse files
authored
Merge pull request #762 from Adamant-im/fix/failed-tx-status
fix: failed tx status
2 parents 1723b11 + 0e2004c commit 6ab1e71

File tree

4 files changed

+17
-18
lines changed

4 files changed

+17
-18
lines changed

src/components/LoginForm.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ import { isAllNodesOfflineError, isAllNodesDisabledError } from '@/lib/nodes/uti
6464
import { mdiEye, mdiEyeOff } from '@mdi/js'
6565
import { useSaveCursor } from '@/hooks/useSaveCursor'
6666
67-
6867
const className = 'login-form'
6968
const classes = {
7069
root: className,
@@ -181,5 +180,4 @@ export default defineComponent({
181180
}
182181
}
183182
}
184-
185183
</style>

src/components/LoginPasswordForm.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@
1313
variant="underlined"
1414
>
1515
<template #append-inner>
16-
<v-btn
17-
@click="togglePasswordVisibility"
18-
icon
19-
:ripple="false"
20-
:size="28"
21-
variant="plain"
22-
>
16+
<v-btn @click="togglePasswordVisibility" icon :ripple="false" :size="28" variant="plain">
2317
<v-icon :icon="showPassword ? mdiEye : mdiEyeOff" :size="24" />
2418
</v-btn>
2519
</template>

src/components/TransactionListItem.vue

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
<template #prepend>
55
<v-icon
66
:class="`${className}__prepend-icon`"
7-
:icon="
8-
isStringEqualCI(senderId, userId) ? mdiAirplaneTakeoff : mdiAirplaneLanding
9-
"
7+
:icon="isStringEqualCI(senderId, userId) ? mdiAirplaneTakeoff : mdiAirplaneLanding"
108
size="small"
119
/>
1210
</template>
@@ -39,7 +37,7 @@
3937
</v-list-item-title>
4038

4139
<v-list-item-subtitle :class="`${className}__date`" class="a-text-explanation-small">
42-
<span v-if="!isPendingTransaction">{{ formatDate(createdAt) }}</span>
40+
<span v-if="!isStatusVisibleTransaction">{{ formatDate(createdAt) }}</span>
4341
<span v-else-if="status" :class="`${className}__status`">{{
4442
$t(`transaction.statuses.${status}`)
4543
}}</span>
@@ -72,7 +70,6 @@ import { timestampInSec } from '@/filters/helpers'
7270
import currency from '@/filters/currencyAmountWithSymbol'
7371
import { mdiAirplaneLanding, mdiAirplaneTakeoff, mdiMessageOutline, mdiMessageText } from '@mdi/js'
7472
75-
7673
export default {
7774
mixins: [partnerName],
7875
props: {
@@ -202,9 +199,11 @@ export default {
202199
)
203200
)
204201
},
205-
isPendingTransaction() {
202+
isStatusVisibleTransaction() {
206203
return (
207-
this.status === TransactionStatus.PENDING || this.status === TransactionStatus.REGISTERED
204+
this.status === TransactionStatus.PENDING ||
205+
this.status === TransactionStatus.REGISTERED ||
206+
this.status === TransactionStatus.REJECTED
208207
)
209208
}
210209
},

src/components/transactions/TransactionTemplate.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
/>
4646
</v-list-item-title>
4747
</template>
48-
4948
<div
5049
:class="[
5150
`${className}__inconsistent-status`,
@@ -58,7 +57,7 @@
5857
size="20"
5958
style="color: #f8a061 !important"
6059
/>
61-
{{ t(`transaction.statuses.${transactionStatus}`)
60+
{{ formattedTransactionStatus
6261
}}<span v-if="inconsistentStatus">{{
6362
': ' + t(`transaction.inconsistent_reasons.${inconsistentStatus}`, { crypto })
6463
}}</span>
@@ -272,6 +271,14 @@ export default defineComponent({
272271
props.admTx && props.admTx.message ? props.admTx.message : false
273272
)
274273
274+
const isPendingQuery = computed(() => props.queryStatus === 'pending')
275+
276+
const formattedTransactionStatus = computed(() => {
277+
if (isPendingQuery.value) return Symbols.HOURGLASS
278+
279+
return t(`transaction.statuses.${props.transactionStatus}`)
280+
})
281+
275282
const statusUpdatable = computed(() => tsUpdatable(props.transactionStatus, props.crypto))
276283
const historyRate = computed(() => {
277284
if (!transaction.value) return Symbols.HOURGLASS
@@ -385,6 +392,7 @@ export default defineComponent({
385392
historyRate,
386393
rate,
387394
calculatedFee,
395+
formattedTransactionStatus,
388396
formatAmount,
389397
mdiAlertOutline,
390398
mdiChevronRight,

0 commit comments

Comments
 (0)