dominant-strategies / quaipay

Other
7 stars 5 forks source link

feat: add active address modal with pill to receive screen #249

Closed juanmanso closed 1 year ago

juanmanso commented 1 year ago

Description

Following the latest design on Figma, it is required to have a pill button instead of the ShareControl that will enable the user to change active addresses (by changing their zone context state value).

To do so, we simply used the QuaiPayButton component that already implemented the functionality and supports a right icon. The only thing worth mentioning here is that we used alignSelf: 'center' to avoid having it stretching to the entire width of the screen (default behaviour is alignSelf: 'stretch') .

Most importantly, since we needed to show the user the domain name based on the zone they had, we implemented some refactors to relate zones <> regions <> domains. To do so, we created a couple of enums and put everything dependant on zones (to avoid multiple cascading maps). Additionally, we fixed the obj mapping of zones and regions to correctly portrait the specification (link).

Related links

Proof

Demo (iPhone SE 2020)