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: {
transactions: [
{
type: 'created',
type: 'creation',
balance: 100,
decayStart: 0,
decayEnd: 0,
@ -27,7 +27,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
},
},
{
type: 'created',
type: 'creation',
balance: 200,
decayStart: 0,
decayEnd: 0,
@ -58,10 +58,8 @@ const mocks = {
query: apolloQueryMock,
},
$toasted: {
global: {
error: toastedErrorMock,
},
},
}
const propsData = {

View File

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