You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Temporary success screen while the transactions are finalizing...
Full receipt when "Buying from Seller Listing"**
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):
The carbonmark API provides all relevant data for this page including the purchase price and the quantity
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
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
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
Success Modal when "buying from pool"
Compare with Receipt PAGE when "Buying from Seller Listing"
Temporary success screen while the transactions are finalizing...
Full receipt when "Buying from Seller Listing"**
Problem
When "Buying from a Seller Listing" the flow is as such:
The first screenshot above shows these checks on the server:
The second screenshot above shows these checks on the server:
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):
api.carbonmark.com/api/purchases/<TXN_HASH>
See an example page with data from Carbonmark APIInstead, 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
carbonmark.com/purchases/pools/<TOKEN_ADDRESS>/<HASH>
?carbonmark.com/purchases/pools/<USER_ADDRESS>/<HASH>
?The text was updated successfully, but these errors were encountered: