Add Reimbursement app #198

Merged
bumi merged 21 commits from feature/expenses into master 2021-06-02 12:25:34 +00:00
Showing only changes of commit 44cad2d26e - Show all commits

View File

@ -37,7 +37,7 @@ const contractCalls = [
['Contribution', 'add', [{ contributorId: 1, contributorIpfsHash: 'QmWKCYGr2rSf6abUPaTYqf98urvoZxGrb7dbspFZA6oyVF', date: '2019-04-11', amount: 1500, kind: 'dev', description: '[67P/kredits-contracts] Introduce contribution token', url: '' }, { gasLimit: 350000 }]],
raucao commented 2020-05-29 09:10:25 +00:00 (Migrated from github.com)
Review

This seems inconsistent with the expense schema. I don't see how it creates the array of expenses, separate from the WBTC reimbursement. Would also be good to add two expenses for an example reimbursement from the start (ideally just the same example as in the schemas repo) for UI development.

This seems inconsistent with the expense schema. I don't see how it creates the array of expenses, separate from the WBTC reimbursement. Would also be good to add two expenses for an example reimbursement from the start (ideally just the same example as in the schemas repo) for UI development.
bumi commented 2020-05-29 09:30:06 +00:00 (Migrated from github.com)
Review

the array here is not an array of expenses but just how it is passed to the add function. see above the seeds for contributions.

The data here is not correct yet. and yep, we can add more just by c&p this line.

the array here is not an array of expenses but just how it is passed to the `add` function. see above the seeds for contributions. The data here is not correct yet. and yep, we can add more just by c&p this line.
raucao commented 2020-05-29 09:36:52 +00:00 (Migrated from github.com)
Review

the array here is not an array of expenses but just how it is passed to the add function. see above the seeds for contributions.

Yes, that's not what I meant. I meant that a reimbursement contains an array of expenses, so it needs be an array for the add function and the examples and seeds as well.

> the array here is not an array of expenses but just how it is passed to the `add` function. see above the seeds for contributions. Yes, that's not what I meant. I meant that a reimbursement contains an array of expenses, so it needs be an array for the `add` function and the examples and seeds as well.
['Contribution', 'add', [{ contributorId: 2, contributorIpfsHash: 'QmcHzEeAM26HV2zHTf5HnZrCtCtGdEccL5kUtDakAB7ozB', date: '2019-04-11', amount: 5000, kind: 'dev', description: '[67P/kredits-web] Expense UI, first draft', url: '' }, { gasLimit: 350000 }]],
['Reimbursement', 'add', [{amount: 1116000, contributorId: 1, token: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', expenses: [
['Reimbursement', 'add', [{amount: 1116000, recipientId: 1, token: '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', expenses: [
{ title: 'Server rent', description: 'Dedicated server: andromeda.kosmos.org, April 2020', amount: 61, currency: 'EUR', date: '2020-05-28' },
{ title: 'Server rent', description: 'Dedicated server: centaurus.kosmos.org, April 2020', amount: 32, currency: 'EUR', date: '2020-05-28' }
]}, { gasLimit: 300000 }]],