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

[carbonmark] Pool purchase success - align Modal to figma design #1215

Closed
4 tasks
ladytrekker opened this issue Jun 15, 2023 · 2 comments
Closed
4 tasks

[carbonmark] Pool purchase success - align Modal to figma design #1215

ladytrekker opened this issue Jun 15, 2023 · 2 comments

Comments

@ladytrekker
Copy link
Contributor

ladytrekker commented Jun 15, 2023

Description

Comment from this PR #1191
=> Replacing the Success Modal when "buying from pool" with actual static NEXTJS page (URL to be discussed)

Relevant subgraph:
https://thegraph.com/hosted-service/subgraph/klimadao/polygon-bridged-carbon

  • Example query
  • => missing: total price, project

Success Modal when "buying from pool"

image

Compare with Receipt PAGE when "Buying from Seller Listing"

Temporary success screen while the transactions are finalizing...

Screenshot 2023-06-14 at 4 52 45 PM

Full receipt when "Buying from Seller Listing"**

Screenshot 2023-06-14 at 4 53 10 PM

Problem

When "Buying from a Seller Listing" the flow is as such:

The first screenshot above shows these checks on the server:

  • is the transaction hash in the URL valid?
  • If so, check if the Carbonmark API already has data for this purchase?
  • NO ? => render page with placeholder

The second screenshot above shows these checks on the server:

  • is the transaction hash in the URL valid?
  • If so, check if the Carbonmark API already has data for this purchase?
  • YES ? => render page with all data from Carbonmark API for this specific purchase ID

Because when buying from a seller listing, the transaction is an interaction with the carbonmark contract.
The purchase is saved on the Carbonmark API side and we can render a new static page late at any time (just pass the hash to the URL):

Instead, when "Buying from a Pool " the flow is as such:

The redeem transaction is an interaction with the retirement aggregator contract.
There is no API for "give me all data from a pool purchase with transaction hash XYZ".
Also the RA does not provide any method for that.
In this case, we would need to query the subgraph to create new static page for every transaction.
The query should give back: total price including fees, poolToken, quantity, project.

TODO

  • find out how to get all relevant data from a pool purchase
  • Depending on the needed inputs for this queries the final receipt page URL is constructed
  • => carbonmark.com/purchases/pools/<TOKEN_ADDRESS>/<HASH> ?
  • => or carbonmark.com/purchases/pools/<USER_ADDRESS>/<HASH> ?
  • create a new purchase page for nextJS (depending on URL structure above)
  • Render the same receipt component as for "Buy from Seller Listing"
@Atmosfearful
Copy link
Collaborator

Atmosfearful commented Jun 19, 2023

OK so in summary this is a research item: lets ice box this for now until we finish migrating all flows and resolving bigger QA issues.

@Atmosfearful Atmosfearful changed the title [buy from pool] Replace Success Modal with static nextJS page [carbonmark] Pool purchase success - align Modal to figma design Jan 3, 2024
@jabby09
Copy link
Member

jabby09 commented Feb 26, 2024

this will be covered off by #2290

@jabby09 jabby09 closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

3 participants