Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Cart - API - Trigger Donations + Donation Success Screen #41

Open
10 tasks done
codingshot opened this issue Jan 17, 2024 · 4 comments
Open
10 tasks done
Assignees
Labels
feature-request new feature request ft-cart Any tickets related to the Cart feature & donations. QF MVP Required for Quadratic Funding MVP

Comments

@codingshot
Copy link
Member

codingshot commented Jan 17, 2024

Problem

Need to be able to transact on cart

User Story(s):

As a donor, I want to transact on the cart, so that I can actually make donatiosn

Description

Cart uses NEAR API JS to trigger transactions.

Acceptance Criteria

  • cart pull donation, referral fee information
  • cart pull referral amount, protocol fees from donate.potlock.near contract (subject to change -> make this a global variable in app)
  • cart pull fee breakdown from pot referenced in cart (pulls from any referral fees from donations) and protocol and chef fees as according to contract
  • makes a call for each donation and donation for pot
  • estimate gas correctly
  • show success of donation, show transaction hash and open in nearblocks
  • if not logged in popup wallet selector to login
  • when logged in show if enough balance (in future we should add onramp for this)
  • Donation success screen show share to twitter, facbeook linkedin. Share tags the handle on twitter if applicable and tags them (check current impelentation
  • Successful donations are cleared from cart

Limitations

  • make sure to estimate gas correctly
  • passing in referrals in storage and properly passing in contract
  • checking if somone has permission for nadabot

Resources

@codingshot codingshot added the feature-request new feature request label Jan 17, 2024
@codingshot codingshot changed the title [FEATURE] Cart - API - Trigger Donations [FEATURE] Cart - API - Trigger Donations + Donation Success Screen Jan 18, 2024
@lachlanglen
Copy link

@phuongfunny I added one more item to Acceptance Criteria (clear successful donations from cart)

@lachlanglen lachlanglen added ft-cart Any tickets related to the Cart feature & donations. QF MVP Required for Quadratic Funding MVP labels Jan 31, 2024
@phuongfunny
Copy link
Collaborator

@lachlanglen hello sir, how can we can get refferral id?

@lachlanglen
Copy link

@phuongfunny when a user clicks the "share" icon on a project profile, it adds the user's NEAR account ID to the copied URL for them to share, e.g. https://alpha.potlock.org/project/opact_near.near?referrerId=lachlan.near (note referrerId query param)

When a user visits a project profile and adds the project to their cart, you need to check for the referrerId query param in the URL; if it is present, you should record it in the cart item, and then you will ultimately pass this ID as referrer_id with the donation transaction.

Does this make sense?

@vonhatcuong
Copy link
Collaborator

@lachlanglen please check it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request new feature request ft-cart Any tickets related to the Cart feature & donations. QF MVP Required for Quadratic Funding MVP
Projects
Status: In review
Status: Sprint Backlog
Status: In Progress
Development

No branches or pull requests

5 participants