Skip to content

Commit

Permalink
ENS Profiles (#3116)
Browse files Browse the repository at this point in the history
* ENS Registration: Upload Avatar/Cover (#2967)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* Polish

* Fix lint errors

* Fix android

* PR review

* ENS Registration: Choose NFT Avatar (#2969)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* WIP

* Polish

* WIP

* WIP

* Fix lint errors

* useMemo

* WIP

* rename

* Merge

* PR review

* remove ios changes

* @benisgold/ens i18n (#2983)

i18n

* @benisgold/apply accent color (#2989)

* applied accent color to confirm registration button

* applied accent color to gas speed button

* @esteban/registration watcher (#2978)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* profiles enabled

* fix ens action dispatch

* WIP UI

* use hardhat by default REVERT

* refactor rap action types

* refactor action execution

* hook handler handling commit tx

* handle 60 secs wait

* add register hook in handler

* handler working as expected

* sending raps correctly skipping multicall

* Revert "use hardhat by default REVERT"

This reverts commit fa0e8e30a3f801afb8f721c97a798a3df619a312.

* use block confirmation time

* secs in a year util

* types

* Revert "Revert "use hardhat by default REVERT""

This reverts commit 839f301be7946ab49aff3a86246ac23221f64ea5.

* more types

* better type names

* lint

* fix watch tx confirmation step

* simulate tx confirmation wait

* simulate tx confirmation wait REVERT

* hardcode initial multicall estimation

* persistence working

* useENSPendingRegistrations

* save register with config tx hash in registration

* remove hardhat hacks to watch txs

* Revert "Revert "Revert "use hardhat by default REVERT"""

This reverts commit d0c13d721dbb48ab5bc9b3e5b8d29ff30a37304d.

* entities

* Update src/hooks/useENSPendingRegistrations.tsx

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* type

* fix type

* key value object

* merge lint

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update redux on input change (#2994)

* Profiles: Edit ENS Profile (part 1) (#2984)

* WIP

* WIP

* wip

* WIP

* WIP

* Fix lint issues

* Refactor

* Fixes

* fix debug layout

* Fix

* @esteban/handle records transactions (#2991)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* profiles enabled

* fix ens action dispatch

* WIP UI

* use hardhat by default REVERT

* refactor rap action types

* refactor action execution

* hook handler handling commit tx

* handle 60 secs wait

* add register hook in handler

* handler working as expected

* sending raps correctly skipping multicall

* Revert "use hardhat by default REVERT"

This reverts commit fa0e8e30a3f801afb8f721c97a798a3df619a312.

* use block confirmation time

* secs in a year util

* types

* Revert "Revert "use hardhat by default REVERT""

This reverts commit 839f301be7946ab49aff3a86246ac23221f64ea5.

* more types

* better type names

* lint

* fix watch tx confirmation step

* simulate tx confirmation wait

* simulate tx confirmation wait REVERT

* hardcode initial multicall estimation

* persistence working

* useENSPendingRegistrations

* save register with config tx hash in registration

* remove hardhat hacks to watch txs

* Revert "Revert "Revert "use hardhat by default REVERT"""

This reverts commit d0c13d721dbb48ab5bc9b3e5b8d29ff30a37304d.

* entities

* Update src/hooks/useENSPendingRegistrations.tsx

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* type

* fix type

* key value object

* merge lint

* enable multicall dummy gas estimate again

* HARDHAT HARDCODED REVERT

* dont send multicall if the records arent valid

* use records from state

* use multicall estimation on estimated network fee

* fix get rent price

* send setText if only one text is added to the records

* revert some dev settings

* use confirmedAt

* Revert "HARDHAT HARDCODED REVERT"

This reverts commit 775fa3645cb00927b250ac523fa20c90bfa3f22c.

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* restrict watching wallets (#2992)

* Use changedRecords for commit phase (#3002)

* @benisgold/fix bio android (#2995)

- Fixed size of input box for bio record on android
- Make input boxes not scrollable on android

* Fix edit ENS for .eth that have no records (#3006)

* Profiles: ENS Expanded State (#2997)

* add ens fab REVERT

* init route

* check registration

* use Box

* wip

* Tweaks

* omit GradientInput

* register ENS feature flag (#2874)

* flag

* RegisterENSFlowNavigator

* Profiles: ENS Search Input (#2888)

* Add Cover component; height prop to Box; text/heading hooks

* Add space

* Export text/heading hooks

* wip

* WIP

* WIP

* Fixes

* refactor

* memo

* WIP

* Refactor

* Tweaks

* remove skia

* revert

* revert

* revert

* tweaks

* Revert

* Refactor gradients

* refactor

* Refactor

* Fix dark mode gradients

* add contents (#2896)

* Update SearchInputGradientBackground.tsx

* Android beta link in Readme (#2894)

* polygon nfts (#2893)

* ui: add l2 disclaimer + explainer

* ui: dark disclaimer

* polygon/v2 parser

* types, v2 api url and change parsers

* refactor nft fetching to handle multiple networks

* rm log

* block -> allow

* filter out bad nfts

* stop fetching on error

* dont show price info for non mainnet nfts

* yarn audit

* network type

* explainer - disclaimer

* check current address

* nft block explorer

* dont check prices for poaps and polygon

* Cleanup of should stop fetching param and typescript

* Fix: include network in nft block explorer function

* Fix linting issues

Co-authored-by: jinchung <jin.chung17@gmail.com>

* Fix

Co-authored-by: Esteban Miño <efmino@uc.cl>
Co-authored-by: Terry Sahaidak <tasssik@gmail.com>
Co-authored-by: Skylar Barrera <skylar.barrera@gmail.com>
Co-authored-by: jinchung <jin.chung17@gmail.com>

* Inline > Row

* Profiles: ENS Registration Action Buttons (#2892)

* Add Cover component; height prop to Box; text/heading hooks

* Add space

* Export text/heading hooks

* wip

* WIP

* WIP

* Fixes

* refactor

* memo

* WIP

* Refactor

* Tweaks

* remove skia

* revert

* revert

* revert

* tweaks

* Revert

* WIP

* Refactor gradients

* refactor

* Refactor

* Add action buttons for ENS registration

* Fix dark mode gradients

* Inline > Row

* ens registration search result indicators (#2876)

added indicators that shows whether an ens name is available or taken, how much it costs, and when it expires

* @esteban/ens utils (#2911)

* ensdomains ensjs types

* add ens abis

* add some utils methods, resolver, available and rentPrice

* rm enjs

* useENS hook

* comments

* add js-sha3

* add base registrar implementation

* add getNameExpires

* only use registrationDate from subgraph

* Update src/helpers/ens.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* change name to useENSRegistration

* move queries inside hook

* reorg methods and hook

* move formatters to hook

* get everything from hook

* dont use all methods if not needed, by availability

* handle hook status

* everything in the same state in hook

* nameIsValid

* rent price per year in fiat

* add formatRentPrice

* toLocaleDateString instead

* isInvalidLength

* useQuery FTW

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Add inline validation for ENS search (#2918)

* Add inline validation for ENS search

* refactor

* can not -> cannot

* Update

* Update

* Update RegisterEnsSheet.js

* Update tests

* Profiles: Register ENS navigation foundation (#2913)

* Add ENS Navigation

* Remove screens

* Fix conflicts

* Rename component

* Fix keyboard issue

* @benisgold/additional indicators (#2917)

* created indicators for registration fee and ens age
* formatted expiration date and rent price

* @esteban/ens state manager (#2935)

* add redux ensRegistration

* add some redux methods

* include kens app keys as enum

* rm unused code

* @benisgold/profile screen nav buttons (#2937)

add profile screen nav buttons

* @esteban/network fee estimations (#2924)

* add dummy txs

* create utility methods for each ens registration methods that we'll use

* WIP estimates for multicall

* estimate gas for all txs

* cleaner code

* estimateENSSetNameGasLimit

* rename ENSRegistrationTransactionType

* rename ownerAddress

* use estimateENSTransactionGaslimit to manage estimations

* convertAmountAndPriceToNativeDisplay skip decimals

* estimateENSRegistrationGasLimit

* get and format estimatedTotalCost

* better code

* estimated costs

* useENSRegistrationEstimations

* bignumber for rentprice

* makeCommitmentWithConfig
 instead of makeCommitment

* useENSRegistrationCosts

* rename some ens search sheet vars

* use rent price to trigger useQuery

* estimateENSTransactionGasLimit

* export helpers

* lint

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* lint from latest commits

* running now

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Create ENS profile form (#2938)

* Add ENS Navigation

* Remove screens

* Fix conflicts

* Rename component

* WIP

* Fix keyboard issue

* WIP

* WIP

* WIP

* FIX

* Fix android

* Fix issues

* Fixes

* Profiles: ENS Registration – Review Costs UI (#2947)

* WIP

* Polish

* Add tests for addDisplay

* Refactor

* Fix stale time on useENSRegistration

* Fix lint

* Refactor

* Add Hold to Buy and hint text

* Fix issue where keyboard toggle wasn't showing on android (#2952)

* @benisgold/ens header (#2945)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* small fixes

* RQ v3

* Profiles: ENS navigation fixes (#2957)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* Fix ens nav

* Fix

* Fix

* Refactor

* Make android cool

* Fixes

* PR review

* Move const up

Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>

* @benisgold/confirm screen header (#2956)

* added dividers and header to confirm screen

* apply drop shadows

* lint

* Fix

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* @esteban/txs raps (#2953)

* create raps and actions

* create actions for raps with correct types

* add gas button to confirmation screen

* estimateENSRegisterSetRecordsAndNameGasLimit

* create raps for commit and register/multicall/setName txs

* make registrations redux by account and name

* use redux currentRegistrationName in state

* update useEnsProfile to new format

* WIP saving commit tx params in state

* final tweeks to txs

* auto review comments

* onlt commit tx in confirm screen

* more auto review comments

* lint raptypes

* rm some comments

* some review comments

* Update src/entities/ensRegistration.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Fix ENS profile form

* block sending commit tx

* align confirmation and gas speed buttons

* remove waitENS boilerplate

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* added cover/avatar placeholders (#2961)

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Polish avatar/cover & add loading skeletons (#2958)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* Fix ENS navigation

* progress

* Fix ens nav

* Fix

* Fix

* Refactor

* Make android cool

* Fixes

* PR review

* Move const up

* More polish

* Fix

* More polish

Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>

* @esteban/ens profiles review comments (#2968)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* fix ens action dispatch

* Update src/handlers/ens.ts

Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>

* ENS Registration: Upload Avatar/Cover (#2967)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* Polish

* Fix lint errors

* Fix android

* PR review

* @esteban/more comments review (#2975)

* add cover to multicall estimation

* remove js-sha3

* replace action names for consts

* timeunit secs in a year

* remove await in dispatch

* WIP

* WIP

* Remove useDebounceString (#2980)

* Register ENS: Inline style optimisation & PR comments (#2977)

* Optimise inline styles

* PR comments

* ENS Registration: Choose NFT Avatar (#2969)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* WIP

* Polish

* WIP

* WIP

* Fix lint errors

* useMemo

* WIP

* rename

* Merge

* PR review

* remove ios changes

* wip

* WIP

* WIP

* Fix lint issues

* WIP

* @benisgold/ens i18n (#2983)

i18n

* Refactor

* Revert ios/

* Fixes

* @benisgold/apply accent color (#2989)

* applied accent color to confirm registration button

* applied accent color to gas speed button

* @esteban/registration watcher (#2978)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* profiles enabled

* fix ens action dispatch

* WIP UI

* use hardhat by default REVERT

* refactor rap action types

* refactor action execution

* hook handler handling commit tx

* handle 60 secs wait

* add register hook in handler

* handler working as expected

* sending raps correctly skipping multicall

* Revert "use hardhat by default REVERT"

This reverts commit fa0e8e30a3f801afb8f721c97a798a3df619a312.

* use block confirmation time

* secs in a year util

* types

* Revert "Revert "use hardhat by default REVERT""

This reverts commit 839f301be7946ab49aff3a86246ac23221f64ea5.

* more types

* better type names

* lint

* fix watch tx confirmation step

* simulate tx confirmation wait

* simulate tx confirmation wait REVERT

* hardcode initial multicall estimation

* persistence working

* useENSPendingRegistrations

* save register with config tx hash in registration

* remove hardhat hacks to watch txs

* Revert "Revert "Revert "use hardhat by default REVERT"""

This reverts commit d0c13d721dbb48ab5bc9b3e5b8d29ff30a37304d.

* entities

* Update src/hooks/useENSPendingRegistrations.tsx

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* type

* fix type

* key value object

* merge lint

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update redux on input change (#2994)

* refactor unique token expanded state to be more composable

* WIP

* Profiles: Edit ENS Profile (part 1) (#2984)

* WIP

* WIP

* wip

* WIP

* WIP

* Fix lint issues

* Refactor

* Fixes

* fix debug layout

* Fix

* some serious alpha happening here

* Fix edit ENS for .eth that have no records

* wip

* WIP

* WIP

* Refactor

* Add loading states

* i18n

* Fix

* PR review

* revert

* Add explainers

Co-authored-by: Esteban Miño <efmino@uc.cl>
Co-authored-by: Terry Sahaidak <tasssik@gmail.com>
Co-authored-by: Skylar Barrera <skylar.barrera@gmail.com>
Co-authored-by: jinchung <jin.chung17@gmail.com>
Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>
Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>

* @esteban/edit profiles to transactions (#3004)

* HARDHAT REVERT THIS

* add edit step to handler

* fix records updates

* use from addres to estimate multicall

* estimate gas depending on multicall or set text

* cleanup

* createSetRecordsENSRap

* some cleanup

* registration steps cleanup

* Revert "HARDHAT REVERT THIS"

This reverts commit 7ac16439ec97702bb31d861146687462893c03ae.

* some clean up

* clean up txs handler

* way cleaner code

* add formatENSActionParams

* revert some last changes

* useFocusEffect

* Fixes for dark mode (#3025)

* allow ENS edition only for controller (#3010)

* iis ens owner checks

* is owner from hook

* fix lint

* fetch reverse record (#3031)

* Profiles: ENS Registration – Add field validation (#3019)

* add ens fab REVERT

* init route

* check registration

* use Box

* wip

* Tweaks

* omit GradientInput

* register ENS feature flag (#2874)

* flag

* RegisterENSFlowNavigator

* Profiles: ENS Search Input (#2888)

* Add Cover component; height prop to Box; text/heading hooks

* Add space

* Export text/heading hooks

* wip

* WIP

* WIP

* Fixes

* refactor

* memo

* WIP

* Refactor

* Tweaks

* remove skia

* revert

* revert

* revert

* tweaks

* Revert

* Refactor gradients

* refactor

* Refactor

* Fix dark mode gradients

* add contents (#2896)

* Update SearchInputGradientBackground.tsx

* Android beta link in Readme (#2894)

* polygon nfts (#2893)

* ui: add l2 disclaimer + explainer

* ui: dark disclaimer

* polygon/v2 parser

* types, v2 api url and change parsers

* refactor nft fetching to handle multiple networks

* rm log

* block -> allow

* filter out bad nfts

* stop fetching on error

* dont show price info for non mainnet nfts

* yarn audit

* network type

* explainer - disclaimer

* check current address

* nft block explorer

* dont check prices for poaps and polygon

* Cleanup of should stop fetching param and typescript

* Fix: include network in nft block explorer function

* Fix linting issues

Co-authored-by: jinchung <jin.chung17@gmail.com>

* Fix

Co-authored-by: Esteban Miño <efmino@uc.cl>
Co-authored-by: Terry Sahaidak <tasssik@gmail.com>
Co-authored-by: Skylar Barrera <skylar.barrera@gmail.com>
Co-authored-by: jinchung <jin.chung17@gmail.com>

* Inline > Row

* Profiles: ENS Registration Action Buttons (#2892)

* Add Cover component; height prop to Box; text/heading hooks

* Add space

* Export text/heading hooks

* wip

* WIP

* WIP

* Fixes

* refactor

* memo

* WIP

* Refactor

* Tweaks

* remove skia

* revert

* revert

* revert

* tweaks

* Revert

* WIP

* Refactor gradients

* refactor

* Refactor

* Add action buttons for ENS registration

* Fix dark mode gradients

* Inline > Row

* ens registration search result indicators (#2876)

added indicators that shows whether an ens name is available or taken, how much it costs, and when it expires

* @esteban/ens utils (#2911)

* ensdomains ensjs types

* add ens abis

* add some utils methods, resolver, available and rentPrice

* rm enjs

* useENS hook

* comments

* add js-sha3

* add base registrar implementation

* add getNameExpires

* only use registrationDate from subgraph

* Update src/helpers/ens.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* change name to useENSRegistration

* move queries inside hook

* reorg methods and hook

* move formatters to hook

* get everything from hook

* dont use all methods if not needed, by availability

* handle hook status

* everything in the same state in hook

* nameIsValid

* rent price per year in fiat

* add formatRentPrice

* toLocaleDateString instead

* isInvalidLength

* useQuery FTW

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Add inline validation for ENS search (#2918)

* Add inline validation for ENS search

* refactor

* can not -> cannot

* Update

* Update

* Update RegisterEnsSheet.js

* Update tests

* Profiles: Register ENS navigation foundation (#2913)

* Add ENS Navigation

* Remove screens

* Fix conflicts

* Rename component

* Fix keyboard issue

* @benisgold/additional indicators (#2917)

* created indicators for registration fee and ens age
* formatted expiration date and rent price

* @esteban/ens state manager (#2935)

* add redux ensRegistration

* add some redux methods

* include kens app keys as enum

* rm unused code

* @benisgold/profile screen nav buttons (#2937)

add profile screen nav buttons

* @esteban/network fee estimations (#2924)

* add dummy txs

* create utility methods for each ens registration methods that we'll use

* WIP estimates for multicall

* estimate gas for all txs

* cleaner code

* estimateENSSetNameGasLimit

* rename ENSRegistrationTransactionType

* rename ownerAddress

* use estimateENSTransactionGaslimit to manage estimations

* convertAmountAndPriceToNativeDisplay skip decimals

* estimateENSRegistrationGasLimit

* get and format estimatedTotalCost

* better code

* estimated costs

* useENSRegistrationEstimations

* bignumber for rentprice

* makeCommitmentWithConfig
 instead of makeCommitment

* useENSRegistrationCosts

* rename some ens search sheet vars

* use rent price to trigger useQuery

* estimateENSTransactionGasLimit

* export helpers

* lint

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* lint from latest commits

* running now

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Create ENS profile form (#2938)

* Add ENS Navigation

* Remove screens

* Fix conflicts

* Rename component

* WIP

* Fix keyboard issue

* WIP

* WIP

* WIP

* FIX

* Fix android

* Fix issues

* Fixes

* Profiles: ENS Registration – Review Costs UI (#2947)

* WIP

* Polish

* Add tests for addDisplay

* Refactor

* Fix stale time on useENSRegistration

* Fix lint

* Refactor

* Add Hold to Buy and hint text

* Fix issue where keyboard toggle wasn't showing on android (#2952)

* @benisgold/ens header (#2945)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* small fixes

* RQ v3

* Profiles: ENS navigation fixes (#2957)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* Fix ens nav

* Fix

* Fix

* Refactor

* Make android cool

* Fixes

* PR review

* Move const up

Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>

* @benisgold/confirm screen header (#2956)

* added dividers and header to confirm screen

* apply drop shadows

* lint

* Fix

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* @esteban/txs raps (#2953)

* create raps and actions

* create actions for raps with correct types

* add gas button to confirmation screen

* estimateENSRegisterSetRecordsAndNameGasLimit

* create raps for commit and register/multicall/setName txs

* make registrations redux by account and name

* use redux currentRegistrationName in state

* update useEnsProfile to new format

* WIP saving commit tx params in state

* final tweeks to txs

* auto review comments

* onlt commit tx in confirm screen

* more auto review comments

* lint raptypes

* rm some comments

* some review comments

* Update src/entities/ensRegistration.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Fix ENS profile form

* block sending commit tx

* align confirmation and gas speed buttons

* remove waitENS boilerplate

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* added cover/avatar placeholders (#2961)

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Polish avatar/cover & add loading skeletons (#2958)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* Fix ENS navigation

* progress

* Fix ens nav

* Fix

* Fix

* Refactor

* Make android cool

* Fixes

* PR review

* Move const up

* More polish

* Fix

* More polish

Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>

* @esteban/ens profiles review comments (#2968)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* fix ens action dispatch

* Update src/handlers/ens.ts

Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>

* ENS Registration: Upload Avatar/Cover (#2967)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* Polish

* Fix lint errors

* Fix android

* PR review

* @esteban/more comments review (#2975)

* add cover to multicall estimation

* remove js-sha3

* replace action names for consts

* timeunit secs in a year

* remove await in dispatch

* WIP

* WIP

* Remove useDebounceString (#2980)

* Register ENS: Inline style optimisation & PR comments (#2977)

* Optimise inline styles

* PR comments

* ENS Registration: Choose NFT Avatar (#2969)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* WIP

* Polish

* WIP

* WIP

* Fix lint errors

* useMemo

* WIP

* rename

* Merge

* PR review

* remove ios changes

* wip

* WIP

* WIP

* Fix lint issues

* WIP

* @benisgold/ens i18n (#2983)

i18n

* Refactor

* Revert ios/

* Fixes

* @benisgold/apply accent color (#2989)

* applied accent color to confirm registration button

* applied accent color to gas speed button

* @esteban/registration watcher (#2978)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* profiles enabled

* fix ens action dispatch

* WIP UI

* use hardhat by default REVERT

* refactor rap action types

* refactor action execution

* hook handler handling commit tx

* handle 60 secs wait

* add register hook in handler

* handler working as expected

* sending raps correctly skipping multicall

* Revert "use hardhat by default REVERT"

This reverts commit fa0e8e30a3f801afb8f721c97a798a3df619a312.

* use block confirmation time

* secs in a year util

* types

* Revert "Revert "use hardhat by default REVERT""

This reverts commit 839f301be7946ab49aff3a86246ac23221f64ea5.

* more types

* better type names

* lint

* fix watch tx confirmation step

* simulate tx confirmation wait

* simulate tx confirmation wait REVERT

* hardcode initial multicall estimation

* persistence working

* useENSPendingRegistrations

* save register with config tx hash in registration

* remove hardhat hacks to watch txs

* Revert "Revert "Revert "use hardhat by default REVERT"""

This reverts commit d0c13d721dbb48ab5bc9b3e5b8d29ff30a37304d.

* entities

* Update src/hooks/useENSPendingRegistrations.tsx

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* type

* fix type

* key value object

* merge lint

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update redux on input change (#2994)

* refactor unique token expanded state to be more composable

* WIP

* Profiles: Edit ENS Profile (part 1) (#2984)

* WIP

* WIP

* wip

* WIP

* WIP

* Fix lint issues

* Refactor

* Fixes

* fix debug layout

* Fix

* some serious alpha happening here

* Fix edit ENS for .eth that have no records

* wip

* WIP

* WIP

* Refactor

* Add loading states

* i18n

* Fix

* PR review

* revert

* Add explainers

* Add field validation

* revert ios

* Fix

* fix eslint

* Add startsWith

* Fix error

Co-authored-by: Esteban Miño <efmino@uc.cl>
Co-authored-by: Terry Sahaidak <tasssik@gmail.com>
Co-authored-by: Skylar Barrera <skylar.barrera@gmail.com>
Co-authored-by: jinchung <jin.chung17@gmail.com>
Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>
Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>

* profiles: two step flow screens & reverse records (#3033)

* HARDHAT REVERT

* SIMULATE TX CONFIRMATION WAIT REVERT

* step titles

* estimated cost in eth

* reorder components

* reorder sheet

* dummy ui

* content and action by step

* switcher

* sendReverseRecord boolean

* some cleanup

* edit dummy step

* move UI to components

* handle reverse record

* enable button when step gas limit is available

* Revert "SIMULATE TX CONFIRMATION WAIT REVERT"

This reverts commit c71da12f69fbfc85613265f4fcc76e8f4ab25cc3.

* Revert "HARDHAT REVERT"

This reverts commit 970258c69466582d7f9e8bc87b562bf29e83ef55.

* use box aligned items to center

* profiles: handle resolver when editing profile (#3035)

* use accent color for gas speed button and custom gas (#3036)

* use accent color for gas speed button and custom gas

* use accent color

* Profiles: Profile Sheet (without asset list) (#3026)

* add ens fab REVERT

* init route

* check registration

* use Box

* wip

* Tweaks

* omit GradientInput

* register ENS feature flag (#2874)

* flag

* RegisterENSFlowNavigator

* Profiles: ENS Search Input (#2888)

* Add Cover component; height prop to Box; text/heading hooks

* Add space

* Export text/heading hooks

* wip

* WIP

* WIP

* Fixes

* refactor

* memo

* WIP

* Refactor

* Tweaks

* remove skia

* revert

* revert

* revert

* tweaks

* Revert

* Refactor gradients

* refactor

* Refactor

* Fix dark mode gradients

* add contents (#2896)

* Update SearchInputGradientBackground.tsx

* Android beta link in Readme (#2894)

* polygon nfts (#2893)

* ui: add l2 disclaimer + explainer

* ui: dark disclaimer

* polygon/v2 parser

* types, v2 api url and change parsers

* refactor nft fetching to handle multiple networks

* rm log

* block -> allow

* filter out bad nfts

* stop fetching on error

* dont show price info for non mainnet nfts

* yarn audit

* network type

* explainer - disclaimer

* check current address

* nft block explorer

* dont check prices for poaps and polygon

* Cleanup of should stop fetching param and typescript

* Fix: include network in nft block explorer function

* Fix linting issues

Co-authored-by: jinchung <jin.chung17@gmail.com>

* Fix

Co-authored-by: Esteban Miño <efmino@uc.cl>
Co-authored-by: Terry Sahaidak <tasssik@gmail.com>
Co-authored-by: Skylar Barrera <skylar.barrera@gmail.com>
Co-authored-by: jinchung <jin.chung17@gmail.com>

* Inline > Row

* Profiles: ENS Registration Action Buttons (#2892)

* Add Cover component; height prop to Box; text/heading hooks

* Add space

* Export text/heading hooks

* wip

* WIP

* WIP

* Fixes

* refactor

* memo

* WIP

* Refactor

* Tweaks

* remove skia

* revert

* revert

* revert

* tweaks

* Revert

* WIP

* Refactor gradients

* refactor

* Refactor

* Add action buttons for ENS registration

* Fix dark mode gradients

* Inline > Row

* ens registration search result indicators (#2876)

added indicators that shows whether an ens name is available or taken, how much it costs, and when it expires

* @esteban/ens utils (#2911)

* ensdomains ensjs types

* add ens abis

* add some utils methods, resolver, available and rentPrice

* rm enjs

* useENS hook

* comments

* add js-sha3

* add base registrar implementation

* add getNameExpires

* only use registrationDate from subgraph

* Update src/helpers/ens.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* change name to useENSRegistration

* move queries inside hook

* reorg methods and hook

* move formatters to hook

* get everything from hook

* dont use all methods if not needed, by availability

* handle hook status

* everything in the same state in hook

* nameIsValid

* rent price per year in fiat

* add formatRentPrice

* toLocaleDateString instead

* isInvalidLength

* useQuery FTW

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Add inline validation for ENS search (#2918)

* Add inline validation for ENS search

* refactor

* can not -> cannot

* Update

* Update

* Update RegisterEnsSheet.js

* Update tests

* Profiles: Register ENS navigation foundation (#2913)

* Add ENS Navigation

* Remove screens

* Fix conflicts

* Rename component

* Fix keyboard issue

* @benisgold/additional indicators (#2917)

* created indicators for registration fee and ens age
* formatted expiration date and rent price

* @esteban/ens state manager (#2935)

* add redux ensRegistration

* add some redux methods

* include kens app keys as enum

* rm unused code

* @benisgold/profile screen nav buttons (#2937)

add profile screen nav buttons

* @esteban/network fee estimations (#2924)

* add dummy txs

* create utility methods for each ens registration methods that we'll use

* WIP estimates for multicall

* estimate gas for all txs

* cleaner code

* estimateENSSetNameGasLimit

* rename ENSRegistrationTransactionType

* rename ownerAddress

* use estimateENSTransactionGaslimit to manage estimations

* convertAmountAndPriceToNativeDisplay skip decimals

* estimateENSRegistrationGasLimit

* get and format estimatedTotalCost

* better code

* estimated costs

* useENSRegistrationEstimations

* bignumber for rentprice

* makeCommitmentWithConfig
 instead of makeCommitment

* useENSRegistrationCosts

* rename some ens search sheet vars

* use rent price to trigger useQuery

* estimateENSTransactionGasLimit

* export helpers

* lint

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update src/hooks/useENSRegistrationCosts.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* lint from latest commits

* running now

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Create ENS profile form (#2938)

* Add ENS Navigation

* Remove screens

* Fix conflicts

* Rename component

* WIP

* Fix keyboard issue

* WIP

* WIP

* WIP

* FIX

* Fix android

* Fix issues

* Fixes

* Profiles: ENS Registration – Review Costs UI (#2947)

* WIP

* Polish

* Add tests for addDisplay

* Refactor

* Fix stale time on useENSRegistration

* Fix lint

* Refactor

* Add Hold to Buy and hint text

* Fix issue where keyboard toggle wasn't showing on android (#2952)

* @benisgold/ens header (#2945)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* small fixes

* RQ v3

* Profiles: ENS navigation fixes (#2957)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* Fix ens nav

* Fix

* Fix

* Refactor

* Make android cool

* Fixes

* PR review

* Move const up

Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>

* @benisgold/confirm screen header (#2956)

* added dividers and header to confirm screen

* apply drop shadows

* lint

* Fix

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* @esteban/txs raps (#2953)

* create raps and actions

* create actions for raps with correct types

* add gas button to confirmation screen

* estimateENSRegisterSetRecordsAndNameGasLimit

* create raps for commit and register/multicall/setName txs

* make registrations redux by account and name

* use redux currentRegistrationName in state

* update useEnsProfile to new format

* WIP saving commit tx params in state

* final tweeks to txs

* auto review comments

* onlt commit tx in confirm screen

* more auto review comments

* lint raptypes

* rm some comments

* some review comments

* Update src/entities/ensRegistration.ts

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Fix ENS profile form

* block sending commit tx

* align confirmation and gas speed buttons

* remove waitENS boilerplate

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* added cover/avatar placeholders (#2961)

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: Polish avatar/cover & add loading skeletons (#2958)

* added placeholder cover photo and messed about with slack sheet top padding

* avatar placeholder

* added ens name header and partial implementation of accent color based on ens avatar

* isInvalid is broken

* add Skip button and adjust gradients

* added loading network fees text

* fix invisible TintButtons on android

* fix android sheet handle

* fix rebase and adjust layout

* adjust hide keyboard button positioning and add correct colors

* check if form is empty

* more color

* lint

* Fix ENS navigation

* progress

* Fix ens nav

* Fix

* Fix

* Refactor

* Make android cool

* Fixes

* PR review

* Move const up

* More polish

* Fix

* More polish

Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>

* @esteban/ens profiles review comments (#2968)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* fix ens action dispatch

* Update src/handlers/ens.ts

Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>

* ENS Registration: Upload Avatar/Cover (#2967)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* Polish

* Fix lint errors

* Fix android

* PR review

* @esteban/more comments review (#2975)

* add cover to multicall estimation

* remove js-sha3

* replace action names for consts

* timeunit secs in a year

* remove await in dispatch

* WIP

* WIP

* Remove useDebounceString (#2980)

* Register ENS: Inline style optimisation & PR comments (#2977)

* Optimise inline styles

* PR comments

* ENS Registration: Choose NFT Avatar (#2969)

* WIP

* WIP

* WIP

* Spinner.js -> .tsx

* revert

* WIP

* Polish

* WIP

* WIP

* Fix lint errors

* useMemo

* WIP

* rename

* Merge

* PR review

* remove ios changes

* wip

* WIP

* WIP

* Fix lint issues

* WIP

* @benisgold/ens i18n (#2983)

i18n

* Refactor

* Revert ios/

* Fixes

* @benisgold/apply accent color (#2989)

* applied accent color to confirm registration button

* applied accent color to gas speed button

* @esteban/registration watcher (#2978)

* add flag to featureFlaf hook

* export ens addresses from references ens

* actions rm

* ENS_DOMAIN to helper

* EnsRegistrationActionTypes create

* disable profiles by default

* profiles enabled

* fix ens action dispatch

* WIP UI

* use hardhat by default REVERT

* refactor rap action types

* refactor action execution

* hook handler handling commit tx

* handle 60 secs wait

* add register hook in handler

* handler working as expected

* sending raps correctly skipping multicall

* Revert "use hardhat by default REVERT"

This reverts commit fa0e8e30a3f801afb8f721c97a798a3df619a312.

* use block confirmation time

* secs in a year util

* types

* Revert "Revert "use hardhat by default REVERT""

This reverts commit 839f301be7946ab49aff3a86246ac23221f64ea5.

* more types

* better type names

* lint

* fix watch tx confirmation step

* simulate tx confirmation wait

* simulate tx confirmation wait REVERT

* hardcode initial multicall estimation

* persistence working

* useENSPendingRegistrations

* save register with config tx hash in registration

* remove hardhat hacks to watch txs

* Revert "Revert "Revert "use hardhat by default REVERT"""

This reverts commit d0c13d721dbb48ab5bc9b3e5b8d29ff30a37304d.

* entities

* Update src/hooks/useENSPendingRegistrations.tsx

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* type

* fix type

* key value object

* merge lint

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Update redux on input change (#2994)

* refactor unique token expanded state to be more composable

* WIP

* Profiles: Edit ENS Profile (part 1) (#2984)

* WIP

* WIP

* wip

* WIP

* WIP

* Fix lint issues

* Refactor

* Fixes

* fix debug layout

* Fix

* some serious alpha happening here

* Fix edit ENS for .eth that have no records

* wip

* WIP

* WIP

* Refactor

* Add loading states

* i18n

* Fix

* PR review

* revert

* Add explainers

* WIP

* WIP

* WIP

* Add first txn tag

* WIP

* WIP

* WIP

* PR review

* Android fixes

Co-authored-by: Esteban Miño <efmino@uc.cl>
Co-authored-by: Terry Sahaidak <tasssik@gmail.com>
Co-authored-by: Skylar Barrera <skylar.barrera@gmail.com>
Co-authored-by: jinchung <jin.chung17@gmail.com>
Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>
Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>

* Profiles: ENS call-to-action banner placeholder (#3046)

* WIP

* Add ENS call-to-action banner

* @esteban/speed up commit (#3042)

* HARDHAT REVERT

* SIMULATE TX CONFIRMATION WAIT REVERT

* get transaction by hash

* navigate to speed up screen

* WaitCommitmentConfirmationContent

* support for multiple commit tx hashes in the registration state

* onSendTransactionCallback

* replace commit  has when speeding up

* clean interface

* Revert "SIMULATE TX CONFIRMATION WAIT REVERT"

This reverts commit 32745222fd4f543c6e0910f44798f936d90a3579.

* Revert "HARDHAT REVERT"

This reverts commit 73fb87db998e9c901994d4a74bcee08fe62aee18.

* Profiles: Defer image upload (#3047)

* Defer image upload until confirm register sheet

* move upload to register phase

* @benisgold/fix multiline spillage (#3050)

* use experimental flag for edit ens (#3063)

* Crop cover photo (#3075)

* Add edit button if u own ur ens (#3074)

* Profiles: Profile Sheet Assets (#3052)

* Init work

* WIP

* WIP

* WIP

* WIP

* WIP

* useENSResolveName

* WIP

* Refactor

* Fixes

Co-authored-by: osdnk <micosa97@gmail.com>

* Profiles: On-chain text records data warning (#3082)

* Add warning explainer for data stored on-chain

* Update

* Profiles: profiles ENS avatar  (#3081)

* on press avatar go or edit profile

* pfp in tx list

* useWalletENS

* working

* better code

* add avatar url to watch profile

* fix emoji picker

* import wallet with image

* dont update wallets if nothing changed

* more on press avatar

* rename useWalletENSAvatar

* rm comments

* bug updating wallet images

* fetch images when importing

* fetch images when importing if flag enabled

* fix edit

* isowner into useENSprofile hook

* @benisgold/create profile button (#3083)

create profile button

Co-authored-by: Ben Goldberg <bengoldberg@rainbow.me>

* Profiles: correctly estimate fees with records (#3064)

* fix crash

* edit action with images

* editing costs

* lint stuff

* correctly use records to estimate network fees:
:

* edigt todo

* fix

* export debug

* lint

* Profiles: check enough eth for registration (#3073)

* add checks

* insufficient_eth

* use default disaled background color

* Profiles: e2e (#3051)

* init flow spec

* todos

* go to flow

* search taken name

* go to records view

* check price and network fee

* skip with no records

* assign records

* start registration

* start registration

* wip

* go to profiles screen after confirming

* HARDHAT REVERT

* check name from tests

* Revert "HARDHAT REVERT"

This reverts commit a271135853fe7116dece9cd0051d6e0276850e27.

* working with banner

* fix lint

* fix discover e2e disabling profiles

* delays

* comment all tests

* logs e2e

* rm lint bitrise

* passing

* with syncronization

* banner?

* rm delay

* checks

* add some logs

* remove lint

* eslint-disable-next-line no-console

* uncomment tests

* REVERT remove flows

* remove failing

* remove failing

* remove failing

* rm some taps

* try release mode

* Should check review button

* always visible

* navigation changes

* with disableSynchronization

* tap by text

* rm some views if testing

* comment text

* move action buttons to component

* Use

* add audit ci

* not absolute when testing

* remove typing

* another try

* move action buttons

* animate:

* use ENSAssignRecordsBottomActions depending of is_testing

* Revert "REVERT remove flows"

This reverts commit af53b7d80fd6b17d4d6f2e15bc38cc8d511e19ff.

* undo bitrise changes

* enable profiles flag in flow

* lint

* no need to modify flag now

* audit ci as develop

* end of line

* Plug in animations

Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>
Co-authored-by: Wojtek Witkowski <hi@wojtek.im>

* Plug in animations for ENS profiles (#3091)

* Add ENS Animations + fix linter

* Tweak dark mode colors

* Profiles: some bug fixes (#3100)

* fix stuck disabled bool

* fix insufficient gas label

* fix estimateENSRegisterSetRecords

* adjust sheet height depending on edit and avatar

* lint

* align speed up to bottom

* add buffer to waiting period

* Profiles: Handle image picker permissions (#3104)

* add useImagePicker hooks

* lang

* use hook in avatar

* update copy

* lint

* fix e2e (#3108)

* touch

* Profiles: fix addDisplay (#3111)

* Profiles: fix expanded state in name with non-ASCII characters (#3112)

* Profiles: go to profile on avatar press android (#3119)

* open action sheet on android as well

* better code

* add lang

* Profiles: 60 secs wait from COMMIT tx (#3113)

* check 60 secs passed on a block level:

* ens wait back to 60 secs again

* a bit cleanerr

* ready to register if IS_TESTING

* check tests

* add comments

* promise all

* getBlockMsTimestamp

* Profiles: extend expiration date (#3125)

* create new raps

* gas estimations for new raps

* estimateENSSetRecordsGasLimit rename

* add gas limit and actions to action handler hook

* modify regex

* add edit button

* pass ens name

* move UI components to its own files

* renew components

* estimate gas for renew

* estimate renew from hook

* estimate gas by step

* format RegistrationReviewRows

* handle search ens costs

* abc

* mode

* REGISTRATION_MODES

* lint

* token info buttons

* create addonComponent

* deeplink route to profile sheet (#3134)

* @benisgold/profiles analytics (#3126)

* @benisgold/fix multiline spillage (#3050)

* progress

* moved things around and added etherscan urls

* remove comment

* finished, except for user properties

* profile tracking hook

* got the analytics hook working

* finished + lint

* uncomment analytics debug line

* remove this

* remove unneeded analytics

* Fix incorrect "Confirm Registration" placeholder – RNBW-3130 (#3141)

* Profiles: (Android) Fix issue when attempting to edit ENS profile (#3142)

* Fix weird edit ens issues on Android

* Fix misaligned @ for twitter input; fix keyboard when warning sheet is open

* Fix issue where uploading avatar and then removing a field will remove the avatar (#3143)

* Fix issue where couldn't upload photos on android (#3144)

* Profiles phase 2 minor review comments (#3154)

* Revert "Set up codepush (#3109)"

This reverts commit 2defc4bdd8c2b3556375c373ec21c05e3f5ea87a.

* rename RapExchangeActionParameters

* lang useOnAvatarPress

* lang NFTBriefTokenInfoRow

* lang RegistrationCover

* lang watch

* lang edit profile

* tests

* remove unused e2e

* Revert "Revert "Set up codepush (#3109)""

This reverts commit cc7bfe1b0834bf4f9b2e774c89d0bd105a61bc18.

* use helpers

* swipe up dev settings

* swipe up dev settings

* all passing

* Profiles: QA send user after editing (#3153)

* send users to profile after editing

* gotoprofiles

* lint

* Profiles: ENS Registration Intro Screen (#3121)

* WIP

* WIP 🤙

* WIP

* Massage android

* Fix

* PR feedback

* Profiles: Persist search value between ENS registration screens (#3156)

* Persist ENS search value between screens

* Use ENS_DOMAIN

* make navigator lazy (#3159)

* Profiles: grab accent color from avatar in edit (#3168)

* Profiles: Add zoomable image preview to ENS cover photos (#3115)

* zoomable cover for ens cover photo

* Fix ZoomableWrapper issue on android

* Fixes

* Profiles: Add ability to remove ENS image records (#3155)

* Add ability to remove ens photos

* Update UniqueTokenExpandedState.tsx

* Update UniqueTokenExpandedState.tsx

* Update UniqueTokenExpandedState.tsx

* Profiles: pending registrations (#3137)

* fetch avatar when searching

* seach up to 8

* use ens records enum

* check profiles enabled

* profiles enabled

* initial component using hook

* add avatar if defined

* in progress

* navigate to ens confirmation

* navigate

* one  last step

* disable switch if no gas

* usePersistentDominantColorFromImage

* removeRegistration

* add alert when removing registration

* resolve images

* registrationImages

* use getENSNFTAvatarUrl

* ens search scrollable

* DEFAULT VALUE

* create mode

* ens search

* pending registrations

* lang

* empty avatar

* Update src/components/ens-registration/PendingRegistrations/PendingRegistrations.tsx

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* lang

* remove   AccentColorProvider,

* divider in search component

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: fix onavatar press (#3166)

* reorder options

* press actions

* fix empty image bug

* methods

* Profiles: adjust confirm screen in small screens (#3163)

* Countdown Timer Component for ENS registration (#3158)

* Countdown Timer Component for ENS registration

* codeowners + change export

* convert components to TS + DS

* Profiles: Enable long press on duration field (#3157)

* Enable long press duration

* Update src/components/ens-registration/RegistrationReviewRows/RegistrationReviewRows.tsx

Co-authored-by: Esteban Miño <efmino@uc.cl>

* Update src/components/ens-registration/RegistrationReviewRows/RegistrationReviewRows.tsx

Co-authored-by: Esteban Miño <efmino@uc.cl>

* Update RegistrationReviewRows.tsx

Co-authored-by: Esteban Miño <efmino@uc.cl>

* Fix hourglass animation on android

* address PR comments (#3171)

* Profiles: improve ens search (#3120)

* fetch avatar when searching

* seach up to 8

* use ens records enum

* check profiles enabled

* profiles enabled

* Profiles: Log upload image errors (#3173)

* Profiles: phase two final review comments (#3176)

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r841382298

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r844576102

* ens records lang

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r845569875

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r845725066

* use getENSRegistrarControllerContract

* tweak paddings and register screen

* export and remove

* Profiles: Only show ENS on-chain data warning once per user (#3170)

* Save onchain data disclaimer state

* Fixes

* Profiles: merge ens phase 2 (#3178)

* Refactor postinstall.sh to reduce code duplication and improve error handling (#3132)

* Refactor postinstall.sh to reduce code duplication and improve error handling

* Clean whitespace

* Fix broken line break

* Fix possibility to scroll with scroll indicator on unique asset image preview (#3150)

Co-authored-by: Jakub Adamczyk <jakub@rainbow.me>

* Remove smile emoji from label (#3160)

* Profiles: adjust confirm screen in small screens (#3163)

* Countdown Timer Component for ENS registration (#3158)

* Countdown Timer Component for ENS registration

* codeowners + change export

* convert components to TS + DS

* Fix hourglass animation on android

* address PR comments (#3171)

* exclude pin creation for isReadOnly mode (#3161)

* Update audit-ci allowlist (#3175)

Co-authored-by: jinchung <jin.chung17@gmail.com>

* Profiles: Log upload image errors (#3173)

* Profiles: phase two final review comments (#3176)

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r841382298

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r844576102

* ens records lang

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r845569875

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r845725066

* use getENSRegistrarControllerContract

* tweak paddings and register screen

* export and remove

Co-authored-by: Tomasz Czajęcki <tomek.czajecki@gmail.com>
Co-authored-by: Jakub Adamczyk <jkk.adamczyk@gmail.com>
Co-authored-by: Jakub Adamczyk <jakub@rainbow.me>
Co-authored-by: Wojtek Witkowski <hi@wojtek.im>
Co-authored-by: moxey.eth <jakemoxey@gmail.com>
Co-authored-by: Taras Perun <48593211+perunt@users.noreply.github.com>
Co-authored-by: Bruno Barbieri <brunobar79@gmail.com>
Co-authored-by: jinchung <jin.chung17@gmail.com>

* Update ProfileSheet header (#3174)

* Profiles: Fix keyboard inconsistencies (#3169)

* fix keyboard issues

* Fixes

* fix android crash

* Profiles: Fallback to ENS metadata API when OpenSea metadata not available yet (#3148)

* Add fallback for ENS metadata

* refactor

* refactor

* Fix

* Profiles: Misc fixes (#3193)

* fix keyboard issues

* Fixes

* fix android crash

* RNBW-3263

* RNBW-3251

* Fixes

* More fixes

* Fix

* remove hideAvatar

* Update confirm sheet ui (#3197)

* Profiles: additional records sheet (#3172)

* add routes and additional records wip

* additional records

* default config sheet

* add more records

* TextEncoder polyfill

* content hash validations

* adjust height

* move validation to one method

* move import fast-text-encoding

* typo

* isPrimaryDisplayRecord

* dotsButtonIsSelected

* handle additional ens sheet height

* lint

* fix bad renaming

* get fixed values with getENSRegistrationGasLimit

* remove expired incomplete ens registrations (#3167)

* Profiles: separate data for incomplete profiles by ens name (#3182)

* Profiles: several bug fixes (#3190)

* RNBW-3264

* RNBW-3263

* RNBW-3241

* RNBW-3223

* do not show empty avatar in pending registrations

* RNBW-3224

* fixit

* add option to extend any ens name

* rename from comments

* add recordKeysWithValue

* Profiles: ens navigator horizontal swipe (#3205)

* enable stack swipe if name available

* fix is testing

* Profiles: improve gas handling (#3183)

* get fixed values with getENSRegistrationGasLimit

* usequeries for each tx

* working

* estimate gas txs

* use recoil to store gas validation

* commit working

* do not update fee on confirm

* update records

* step gas limit working

* edit working

* renew working

* records

* getQueryData refactor

* getGasParams

* get gas params

* Revert "get gas params"

This reverts commit b9bbc911fad2c8013581d280ee783581b7f46ff4.

* Revert "getGasParams"

This reverts commit 03d494848af98c3a91e46bd392f62aeb782f322d.

* Revert "getQueryData refactor"

This reverts commit f58e05f7fadca0c5d0df7f1d0ad3b8e5192bb875.

* handle gas updates in background

* use query all around

* fix insufficient ETH in commit

* remove gas params request

* use reverse record from hook

* remove recoil

* merge

* istesting

* Profiles: 60 secs wait from COMMIT tx (#3113)

* check 60 secs passed on a block level:

* ens wait back to 60 secs again

* a bit cleanerr

* ready to register if IS_TESTING

* check tests

* add comments

* promise all

* getBlockMsTimestamp

* Drop metadata.ens.domains fallback in favour of The Graph + ImgixImg (#3211)

* Profiles: primary ens name explainer sheet (#3191)

* ENS Profile zoomable images (#3184)

* Update header

* Extend ImagePreviewOverlay to work for multiple instances

* remove redundant animationProgress

* PR comments

* Fix

* Fixes

* Profiles: Make ordering of action buttons match order of fields (#3212)

* Make ordering of action buttons match order of fields

* oops

* Remove lines from gradient (#3222)

* Profiles: Intro Screen polishhh (#3221)

* Polish

* Revert

* Profiles: bio hyperlinks (#3218)

* get accent color in ens confirm

* add hyperlinks

* recordsDescription

* create own components

* handling links correctly

* add additional height to profile intro

* fix regex

* hyper link weight regular

* Profiles: set primary from expanded ens (#3194)

* add switch

* send to primary tx confirmation

* with explainer

* ENS Registration Steps Progress Component (#3210)

* ENS Registration Steps Progress Component

* Use accentColor

* isAnimatingFill change

* add paddings

* Revert "isAnimatingFill change"

This reverts commit d1408d3eacab9fe57e9fa0577b8842951a6cc5c3.

* use magic memo + padding

* step

Co-authored-by: Esteban Miño <efmino@uc.cl>

* Profiles: intro screen updates (#3219)

* use primary name if any

* add context menu

* lang

* magnifyingglass.circle

* add missing util

* Profiles polish (#3225)

* fetch account ens in register ens section

* revalidateCollectibleInBackground only for unknown ens

* remove staletime

* Profiles: merge phase 2 to phase 3 (#3227)

* merge

* import text

* add line to auditci

* remove old ens

* remove old ens

* usePersistentDominantColorFromImage with lowResUrl

* Fix ENS NFT regressions (#3230)

Co-authored-by: moxey.eth <jakemoxey@gmail.com>

* Profiles: fix unintended side effects of TokenInfoItem changes (#3228)

* Fix zoomable images on intro screen (#3231)

* Profiles: Choose NFT as cover photo (#3232)

* WIP

* WIP

* WIP

* WIP

* Fixes

* Profiles: Various fixes (#3239)

* Fix

* Fix

* Profiles: improve ens discovery (#3240)

* Profiles: don't normalize search input display text (#3226)

* Pulsing checkmark when visible for more than 2s (#3251)

* Profiles: improve costs hook (#3238)

* wip

* add memos

* revert some changes

* more cleanup

* sign fix

* use step in ens search costs hook

* use step in ens search costs hook

* Profiles: more fixes (#3252)

* more fixes

* use accent color when speed up correctly

* enable watcher

* add ens_domain

* rm fix

* Fix scroll issues (#3257)

* Profiles: final flows e2e (#3248)

* Refactor postinstall.sh to reduce code duplication and improve error handling (#3132)

* Refactor postinstall.sh to reduce code duplication and improve error handling

* Clean whitespace

* Fix broken line break

* Fix possibility to scroll with scroll indicator on unique asset image preview (#3150)

Co-authored-by: Jakub Adamczyk <jakub@rainbow.me>

* Remove smile emoji from label (#3160)

* Profiles: adjust confirm screen in small screens (#3163)

* Countdown Timer Component for ENS registration (#3158)

* Countdown Timer Component for ENS registration

* codeowners + change export

* convert components to TS + DS

* Fix hourglass animation on android

* address PR comments (#3171)

* exclude pin creation for isReadOnly mode (#3161)

* Update audit-ci allowlist (#3175)

Co-authored-by: jinchung <jin.chung17@gmail.com>

* Profiles: Log upload image errors (#3173)

* Fix blank charts (#3107)

* Do not rerender chart if it's empty

* make linter happy

* Add additional memo

* Profiles: phase two final review comments (#3176)

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r841382298

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r844576102

* ens records lang

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r845569875

* https://github.com/rainbow-me/rainbow/pull/2979\#discussion_r845725066

* use getENSRegistrarControllerContract

* tweak paddings and register screen

* export and remove

* Bump moment from 2.29.1 to 2.29.2 (#3177)

* Fedora V1  (#3149)

* Fix vulnerability in 2.x async (#3186)

* update sendable check (#3165)

* update sendable check

* add erc721 to sendable nft types

* Add Fedora branch indicator (#3185)

* add another async vuln (#3198…
  • Loading branch information
15 people committed Jun 2, 2022
1 parent 6b3b08d commit fd47036
Show file tree
Hide file tree
Showing 282 changed files with 17,792 additions and 3,354 deletions.
2 changes: 2 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -30,6 +30,8 @@ src/components/unique-token @osdnk @terrysahaidak @jkadamczyk
src/components/floating-emojis @osdnk @terrysahaidak @jkadamczyk
src/components/buttons/hold-to-authorize @osdnk @terrysahaidak @jkadamczyk
src/components/icons/svg/ProgressIcon.tsx @osdnk @terrysahaidak @jkadamczyk
src/components/large-countdown-clock @pugson @osdnk @terrysahaidak
src/components/step-indicator @pugson @osdnk @terrysahaidak

# APP CONFIG
src/config @osdnk @brunobar79 @skylarbarrera
Expand Down
3 changes: 0 additions & 3 deletions e2e/deeplinks.spec.js
Expand Up @@ -44,7 +44,6 @@ describe('Deeplinks spec', () => {

it('Should navigate to the Wallet screen after tapping on "Import Wallet"', async () => {
await Helpers.disableSynchronization();
await Helpers.checkIfVisible('wallet-info-input');
await Helpers.waitAndTap('wallet-info-submit-button');
if (device.getPlatform() === 'android') {
await Helpers.checkIfVisible('pin-authentication-screen');
Expand All @@ -55,8 +54,6 @@ describe('Deeplinks spec', () => {
}
await Helpers.checkIfVisible('wallet-screen', 40000);
await Helpers.enableSynchronization();
// Waiting 10s for MATIC assets to show up
await Helpers.delay(20000);
});

it('should be able to handle ethereum payments urls for ETH (mainnet)', async () => {
Expand Down
62 changes: 62 additions & 0 deletions e2e/discoverSheetFlow.spec.js
Expand Up @@ -42,7 +42,13 @@ describe('Discover Sheet Flow', () => {
await Helpers.enableSynchronization();
});

it('Should navigate to the Profile screen after swiping right', async () => {
await Helpers.swipe('wallet-screen', 'right', 'slow');
await Helpers.checkIfVisible('profile-screen');
});

it('Should navigate to Discover screen after tapping Discover Button', async () => {
await Helpers.swipe('profile-screen', 'left', 'slow');
await Helpers.waitAndTap('discover-button');
await Helpers.checkIfVisible('discover-header');
});
Expand Down Expand Up @@ -182,6 +188,62 @@ describe('Discover Sheet Flow', () => {
await Helpers.waitAndTap('pools-list-oneDayVolumeUSD');
await Helpers.checkIfVisible('pools-section-oneDayVolumeUSD');
});

it('Should navigate to the Wallet screen after swiping right', async () => {
await Helpers.swipe('discover-home', 'down', 'slow');
await Helpers.swipe('discover-sheet', 'right', 'slow');
await Helpers.checkIfVisible('wallet-screen');
});

it('Should navigate to the Profile screen after swiping right again', async () => {
await Helpers.swipe('wallet-screen', 'right', 'slow');
await Helpers.checkIfVisible('profile-screen');
});

it('Should navigate to Settings Modal after tapping Settings Button', async () => {
await Helpers.waitAndTap('settings-button');
await Helpers.checkIfVisible('settings-modal');
});

it('Should navigate to Developer Settings after tapping Developer Section', async () => {
await Helpers.waitAndTap('developer-section');
await Helpers.checkIfVisible('developer-settings-modal');
});

it('Should make ENS Profiles available', async () => {
await Helpers.swipe('developer-settings-modal', 'up', 'slow');
await Helpers.tapByText('ENS Profiles');
await Helpers.tapByText('Done');
});

it('Should go to Discover screen', async () => {
await Helpers.swipe('profile-screen', 'left', 'slow');
await Helpers.swipe('wallet-screen', 'left', 'slow');
await Helpers.checkIfVisible('ens-register-name-banner');
});

it('Should search and open Profile for rainbowwallet.eth', async () => {
await Helpers.waitAndTap('search-fab');
await Helpers.typeText(
'discover-search-input',
'rainbowwallet.eth\n',
true
);
await Helpers.checkIfVisible(
'discover-currency-select-list-contact-row-rainbowwallet.eth'
);
await Helpers.checkIfNotVisible(
'discover-currency-select-list-exchange-coin-row-ETH'
);
await Helpers.waitAndTap(
'discover-currency-select-list-contact-row-rainbowwallet.eth'
);
});

it('Should watch wallet from Profile sheet', async () => {
await Helpers.waitAndTap('profile-sheet-watch-button');
});

afterAll(async () => {
// Reset the app state
await device.clearKeychain();
Expand Down
47 changes: 10 additions & 37 deletions e2e/hardhatTransactionFlow.spec.js
Expand Up @@ -3,11 +3,8 @@
/* eslint-disable jest/expect-expect */
import { exec } from 'child_process';
import { Contract } from '@ethersproject/contracts';
import { JsonRpcProvider } from '@ethersproject/providers';
import { Wallet } from '@ethersproject/wallet';
import WalletConnect from '@walletconnect/client';
import { convertUtf8ToHex } from '@walletconnect/utils';
import { ethers } from 'ethers';
import * as Helpers from './helpers';
import kittiesABI from '@rainbow-me/references/cryptokitties-abi.json';
import erc20ABI from '@rainbow-me/references/erc20-abi.json';
Expand All @@ -17,26 +14,13 @@ let uri = null;
let account = null;

const RAINBOW_WALLET_DOT_ETH = '0x7a3d05c70581bD345fe117c06e45f9669205384f';
const TESTING_WALLET = '0x3Cb462CDC5F809aeD0558FBEe151eD5dC3D3f608';

const CRYPTOKITTIES_ADDRESS = '0x06012c8cf97BEaD5deAe237070F9587f8E7A266d';
const ETH_ADDRESS = 'eth';
const BAT_TOKEN_ADDRESS = '0x0d8775f648430679a709e98d2b0cb6250d2887ef';
const CRYPTOKITTIES_ADDRESS = '0x06012c8cf97BEaD5deAe237070F9587f8E7A266d';

const getProvider = () => {
if (!getProvider._instance) {
getProvider._instance = new JsonRpcProvider(
device.getPlatform() === 'ios'
? process.env.HARDHAT_URL_IOS
: process.env.HARDHAT_URL_ANDROID,
'any'
);
}
return getProvider._instance;
};

const isNFTOwner = async address => {
const provider = getProvider();
const provider = Helpers.getProvider();
const kittiesContract = new Contract(
CRYPTOKITTIES_ADDRESS,
kittiesABI,
Expand All @@ -47,7 +31,7 @@ const isNFTOwner = async address => {
};

const getOnchainBalance = async (address, tokenContractAddress) => {
const provider = getProvider();
const provider = Helpers.getProvider();
if (tokenContractAddress === ETH_ADDRESS) {
const balance = await provider.getBalance(RAINBOW_WALLET_DOT_ETH);
return balance;
Expand All @@ -62,21 +46,6 @@ const getOnchainBalance = async (address, tokenContractAddress) => {
}
};

const sendETHtoTestWallet = async () => {
const provider = getProvider();
// Hardhat account 0 that has 10000 ETH
const wallet = new Wallet(
'0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
provider
);
// Sending 20 ETH so we have enough to pay the tx fees even when the gas is too high
await wallet.sendTransaction({
to: TESTING_WALLET,
value: ethers.utils.parseEther('20'),
});
return true;
};

beforeAll(async () => {
// Connect to hardhat
await exec('yarn hardhat');
Expand Down Expand Up @@ -125,6 +94,10 @@ describe('Hardhat Transaction Flow', () => {
await Helpers.enableSynchronization();
});

it('Should send ETH to test wallet"', async () => {
await Helpers.sendETHtoTestWallet();
});

it('Should navigate to the Profile screen after swiping right', async () => {
await Helpers.swipe('wallet-screen', 'right', 'slow');
await Helpers.checkIfVisible('profile-screen');
Expand Down Expand Up @@ -155,8 +128,6 @@ describe('Hardhat Transaction Flow', () => {
}

it('Should show Hardhat Toast after pressing Connect To Hardhat', async () => {
await sendETHtoTestWallet();

await Helpers.waitAndTap('hardhat-section');
await Helpers.checkIfVisible('testnet-toast-Hardhat');
await Helpers.swipe('profile-screen', 'left', 'slow');
Expand Down Expand Up @@ -206,7 +177,6 @@ describe('Hardhat Transaction Flow', () => {
await Helpers.swipe('profile-screen', 'left', 'slow');
});
it('Should show completed swap ETH -> ERC20 (DAI)', async () => {
try {
await Helpers.checkIfVisible('Swapped-Ethereum');
Expand All @@ -229,6 +199,9 @@ describe('Hardhat Transaction Flow', () => {
);
await Helpers.waitAndTap('CryptoKitties-family-header');
await Helpers.tapByText('Arun Cattybinky');
await Helpers.waitAndTap('gas-speed-custom');
await Helpers.waitAndTap('speed-pill-urgent');
await Helpers.waitAndTap('gas-speed-done-button');
await Helpers.waitAndTap('send-sheet-confirm-action-button', 20000);
await Helpers.tapAndLongPress('send-confirmation-button');
await Helpers.checkIfVisible('profile-screen');
Expand Down
33 changes: 33 additions & 0 deletions e2e/helpers.js
@@ -1,4 +1,10 @@
import { JsonRpcProvider } from '@ethersproject/providers';
import { Wallet } from '@ethersproject/wallet';
import { expect } from 'detox';
import { ethers } from 'ethers';

const TESTING_WALLET = '0x3Cb462CDC5F809aeD0558FBEe151eD5dC3D3f608';

const DEFAULT_TIMEOUT = 8000;
// eslint-disable-next-line eslint-comments/disable-enable-pair
/* eslint-disable no-undef */
Expand Down Expand Up @@ -200,3 +206,30 @@ export function delay(ms) {
}, ms);
});
}

export function getProvider() {
if (!getProvider._instance) {
getProvider._instance = new JsonRpcProvider(
device.getPlatform() === 'ios'
? process.env.HARDHAT_URL_IOS
: process.env.HARDHAT_URL_ANDROID,
'any'
);
}
return getProvider._instance;
}

export async function sendETHtoTestWallet() {
const provider = getProvider();
// Hardhat account 0 that has 10000 ETH
const wallet = new Wallet(
'0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
provider
);
// Sending 20 ETH so we have enough to pay the tx fees even when the gas is too high
await wallet.sendTransaction({
to: TESTING_WALLET,
value: ethers.utils.parseEther('20'),
});
return true;
}
2 changes: 2 additions & 0 deletions e2e/init.js
Expand Up @@ -3,6 +3,8 @@
require('dotenv').config({ path: '.env' });

beforeAll(async () => {
await device.clearKeychain();

await device.launchApp();

await device.setURLBlacklist([
Expand Down

0 comments on commit fd47036

Please sign in to comment.