filter transactions for type creation due to the first transaction is always a decay

This commit is contained in:
Moriz Wahl 2022-01-10 16:40:30 +01:00
parent c4cbc50da0
commit 3abce024ba
2 changed files with 5 additions and 7 deletions

View File

@ -8,7 +8,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
transactionList: { transactionList: {
transactions: [ transactions: [
{ {
type: 'created', type: 'creation',
balance: 100, balance: 100,
decayStart: 0, decayStart: 0,
decayEnd: 0, decayEnd: 0,
@ -27,7 +27,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
}, },
}, },
{ {
type: 'created', type: 'creation',
balance: 200, balance: 200,
decayStart: 0, decayStart: 0,
decayEnd: 0, decayEnd: 0,
@ -58,9 +58,7 @@ const mocks = {
query: apolloQueryMock, query: apolloQueryMock,
}, },
$toasted: { $toasted: {
global: { error: toastedErrorMock,
error: toastedErrorMock,
},
}, },
} }

View File

@ -30,10 +30,10 @@ export default {
}, },
}) })
.then((result) => { .then((result) => {
this.items = result.data.transactionList.transactions this.items = result.data.transactionList.transactions.filter((t) => t.type === 'creation')
}) })
.catch((error) => { .catch((error) => {
this.$toasted.global.error(error.message) this.$toasted.error(error.message)
}) })
}, },
}, },