feat: completing the add watch account flow [PERA-3771]#219
Conversation
| pasteButton: { | ||
| alignSelf: 'flex-start', | ||
| backgroundColor: theme.colors.tabBarButton, | ||
| borderRadius: 999, |
There was a problem hiding this comment.
we should maybe have a theme.radius or something for these? Or maybe just pick theme.spacing.xxl or something?
There was a problem hiding this comment.
Created a new border radius section on the theme.
| <PasteAddressButton | ||
| address={clipboardAddress} | ||
| onPress={handlePasteAddress} | ||
| /> |
There was a problem hiding this comment.
Woudl it maybe make sense to move the useClipboardAddress into the PastAddressButton? Otherwise it's just a Paste button and it doesn't really matter what you paste right?
I will say this paste feature is a little scary - there was a recent supply chain attack where people attacked the clipboard and replaced the address with a lexigraphically similar address which is scary. I wonder whether we should build in a UX guard here so the user has to confirm they want to paste from the clip board or something?
There was a problem hiding this comment.
@wjbeau I'd actually rather ask if we really want to keep it. This is saving exactly a single press. In iOS you need to press the field for the "paste" option to show up. In Android some keyboards will even show the copied value in the suggestions as soon as you press the field. So I really can't see much value this is adding to this screen.
Should we bother trying to make it safer instead of simply removing this button?
There was a problem hiding this comment.
Good question - let's maybe remove that for now and post in Slack for a discussion
| import { useAppNavigation } from '@hooks/useAppNavigation' | ||
| import { useTheme } from '@rneui/themed' | ||
| import { useWebView } from '@modules/webview' | ||
| import { WATCH_ACCOUNT_SUPPORT_URL } from '@perawallet/wallet-core-config' |
There was a problem hiding this comment.
I think the rest of our URLs are in the zod schema so we should probably be consistent and make this config.watchAccountSupportUrl or something?
packages/config/src/constants.ts
Outdated
| export const RECOVERY_PASSPHRASE_SUPPORT_URL = | ||
| 'https://support.perawallet.app/en/article/recover-or-import-an-algorand-account-with-recovery-passphrase-11gdh1y/' |
There was a problem hiding this comment.
we should maybe move this at the same time?
The reason I think we should move them into the config is so that in future we could add the ability to remotely override some of the config from firebase or something which would give us cool flexibility.
Pull Request Template
Description
Related Issues
Checklist
Additional Notes