Getline-Network / getline

Distributed P2P Lending System
https://getline.in
Apache License 2.0
9 stars 6 forks source link

After investment investors cannot see loan under "my investment section" #80

Closed kwikiel closed 6 years ago

kwikiel commented 6 years ago

http://www.demo.getline.in/#/invest/my-investments

However borrower sees this loan under his own "my investments" section

q3k commented 6 years ago

Seems like a metabackend bug.

q3k commented 6 years ago

It's not a metabackend bug.

It seems like the frontend is asking for loans owned by (ie. created by) the currently logged in user. This, of course, will returns their own loans, not loans in which they've invested.

https://github.com/Getline-Network/getline/blob/50ec3d0fb4e46c24bfc57598f913da86055d9f79/frontend/src/api/invest.ts#L51-L57

I will introduce a metabackend GetLoans query parameter to return all loans into which a certain user has invested, then fix the frontend.