Closed vldkhh closed 5 months ago
I fixed the UI for recent transactions. Changes are in an open PR.
@sirpy @decentralauren @L03TJ3 One thing that is not clear to me: How do I get the data for the recent transactions?
I could filter events in the smart contract, but that won't provide all of the necessary data. The amount donated in a transaction is not available on-chain. The smart contract instead knows about flow rates and the total amount a supporter has contributed.
@krisbitney i'm not sure what you mean. all data should be from the subgraph. If you mean right after user has performed an action and you want to display it for him then we need to either add some refresh for subgraph after user actions or add the action itself manually to the apollo cache
@krisbitney i'm not sure what you mean. all data should be from the subgraph. If you mean right after user has performed an action and you want to display it for him then we need to either add some refresh for subgraph after user actions or add the action itself manually to the apollo cache
No, that is not what I mean. The subgraph is itself limited to on-chain data, so modifying the subgraph won't help.
According to the figma, the transaction items in the "recent transactions" list should have G$ amounts. How do I get those amounts?
ok I see. @decentralauren @patpedrosa What type of transactions is "recent transactions" supposed to show? donations? rewards distributions? probably the name should be changed to "recent X".
@krisbitney we'll need to update the subgraph. if it is donations we can add a DonationEvent record (create it in handleSupport) for rewards distribution txs we already have the EventData records
ok I see. @decentralauren @patpedrosa What type of transactions is "recent transactions" supposed to show? donations? rewards distributions? probably the name should be changed to "recent X".
@krisbitney we'll need to update the subgraph. if it is donations we can add a DonationEvent record (create it in handleSupport) for rewards distribution txs we already have the EventData records
Yes, for sure. I can add events for donations. Still, the donation events won't have the amount donated because the contract knows only about flow rates. The amount the user donated is a function of flowRate and the duration of the flow.
Well donations are either single or a flow rate. both the donation amount and flow rate are known from the event. if it is a flow rate then we can show next to the TX - 50G$/month if it is a single donation then just show the amount - 50G$
"Transactions" is supposed to show all contract transactions, so both donations and payments. I am happy with Hadar's solution proposed above. @decentralauren
@decentralauren @patpedrosa Transaction pool is showing. What do we need to do with the "Show more" button?
@L03TJ3 make action item for loading of transaction list.
@L03TJ3 make action item for loading of transaction list.
- [ ] - should show payouts / donated amounts
The transactions list already displays in the ViewCollective
component, with payouts and donated amounts
Unable to verify on UI but in code it shows it should show both donation + stewards payment so closing.
Show more button is defined here: https://github.com/GoodDollar/GoodCollective/issues/124
What has not been added was if it is a flow rate then we can show next to the TX - 50G$/month not sure what to do with that @patpedrosa @decentralauren
Unable to verify on UI but in code it shows it should show both donation + stewards payment so closing.
Show more button is defined here: #124
What has not been added was if it is a flow rate then we can show next to the TX - 50G$/month not sure what to do with that @patpedrosa @decentralauren
It looks like I misread that and made the donation amount a flowing rate. We can show all of the donation amounts in transactions in terms of a single unit (e.g. per month), but we cannot know whether the supporter intended to donate per day, per week, per month, etc.
Closing this ticket as the open item is in #167