Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support deep link swap pairs and to tokenId (valora-inc#5216)
### Description Adds the route param toTokenId to the SwapScreenWithBack screen allowing the use of a deep link to set the to tokenId. This enables the creation of deep link which contains a swap pair or a target to token. ### Test plan Prerequisites: - Remove `isSecureOrigin` from https://github.com/valora-inc/wallet/blob/main/src/app/saga.ts#L348 for local testing. - Use iOS mainnetDev with `yarn dev:ios -e mainnetdev` Tests urls: - Swap pair: `celo://wallet/openScreen?screen=SwapScreenWithBack&fromTokenId=celo-mainnet:native&toTokenId=celo-mainnet:0x765de816845861e75a25fca122bb6898b8b1282a` - From token: `celo://wallet/openScreen?screen=SwapScreenWithBack&fromTokenId=celo-mainnet:native` - To token: `celo://wallet/openScreen?screen=SwapScreenWithBack&toTokenId=celo-mainnet:native` - No tokens: `celo://wallet/openScreen?screen=SwapScreenWithBack` ### Related issues N/A ### Backwards compatibility Yes ### Network scalability If a new NetworkId and/or Network are added in the future, the changes in this PR will: - [x] Continue to work without code changes, OR trigger a compilation error (guaranteeing we find it when a new network is added)
- Loading branch information