GoodDollar / GoodCollective

Monorepo for GoodCollective (Segmented UBI and Direct Payments Pool)
MIT License
3 stars 1 forks source link

[BUG] Missing “Approval” Modal or wrong logic #94

Closed vldkhh closed 5 months ago

vldkhh commented 6 months ago

Pat vaguely remember Hadar saying that we could combine approval to trigger a donation. If not, we need a modal asking people to approve, then to donate. Pat went through 2 donation flows to be able to donate.

Approval: https://celoscan.io/tx/0xf196b165c9f2e9cb73725cc2de7af12369179f64c214dd68aaf199d2076b01c2

Donation: https://celoscan.io/tx/0x095bf947ac24e4d702d7c56981e9019f33b419a5100d54cd749e246754dd0cab

patpedrosa commented 6 months ago

This ticket needs tech clarification.

@sirpy I remember you saying something about it being possible to approve+sign our token at once, which is why we did not design a modal asking people to approve the token. Is that correct?

krisbitney commented 6 months ago

There is an approval modal. Approval is a separate transaction from donation.

patpedrosa commented 6 months ago

@krisbitney There's an approval token swap modal. That's for swap transactions. I'm referring to the contract approval that happens prior to a token transfer transaction. One-time donations in the default token of the pool do not require swaps - but they do require approve token + sign transfer.

Screen Shot 2024-01-12 at 17.43.13.png
krisbitney commented 6 months ago

Okay, I understand. That's very cool. Thanks!

vldkhh commented 6 months ago

image

krisbitney commented 6 months ago

image

@sirpy @L03TJ3

sirpy commented 6 months ago

@patpedrosa @krisbitney For single donations with G$ there's in the sdk a method called supportSingleTransferAndCall This doesn't require token approval.

krisbitney commented 6 months ago

@patpedrosa @krisbitney For single donations with G$ there's in the sdk a method called supportSingleTransferAndCall This doesn't require token approval.

The supportSingleBatch doesn't require token approval, but I thought supportSingleTransferAndCall did. When I removed approval from one-time donations, I started getting revert errors from supportSingleTransferAndCall and switched to supportSingleBatch.

sirpy commented 6 months ago

ok support single batch should also work with G$ without approves.

krisbitney commented 6 months ago

ok support single batch should also work with G$ without approves.

We are not asking for approval on one-time donations. That was fixed weeks ago.

L03TJ3 commented 5 months ago

image

@vldkhh can you clarify again when this exactly happend. was this after you confirm the transaction in your wallet?

L03TJ3 commented 5 months ago

@L03TJ3 - [ ] - align with gooddapp modals

look into need for approve token X

krisbitney commented 5 months ago

@L03TJ3 - [ ] - align with gooddapp modals

look into need for approve token X

I'm not sure what is being requested regarding modals, but I believe this issue is completed.

L03TJ3 commented 5 months ago

@krisbitney all these pings to myself are for me and was not considered to be in scope or applied to you :)

patpedrosa commented 5 months ago

@L03TJ3 @vldkhh Let's close this ticket. We'll review the modals and create a new ticket once we have product/design specs.