Open polymorpher opened 1 month ago
Extract the SLD from what? Landing page doesn't have domain input.
From URL, people use domain to visit offers, e.g. polymorpher.country
, not https://..../offers/0x....
I understand, but you were talking about landing page, not offer page 🤣
So is this issue for page https://.../offers/[domain]
?
The landing page is the offer page, when URL hostname is not otc.country
. See https://github.com/polymorpher/dot-country-embedder/blob/main/client/src/AppRoutes.tsx for example. i.e. /
(or unmatched /*
) should be routed to the offer component. The route /offers/<address>
can also be routed to offer component but should only be used for debugging
On landing page, the system should extract the SLD (e.g.
polymorpher
frompolymorpher.country
), find out the offer address (through OTC contract), then interact with the offer contract at that address and show details of the offer. If it turns out that no offer contract exists at that address, the page should show appropriate error message.The route
/offer/:address
should only be used for debugging purposes. All links to individual offers should be pointing to<domainName>.<TLD>
(where TLD=country
) by default