Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Added address screen #648

Merged
merged 31 commits into from
Oct 21, 2022
Merged

feat: Added address screen #648

merged 31 commits into from
Oct 21, 2022

Conversation

daviroo
Copy link
Contributor

@daviroo daviroo commented Oct 12, 2022

No description provided.

@daviroo daviroo changed the title Add address screen feat: Added address screen Oct 12, 2022
@daviroo daviroo force-pushed the add-set-address-modal branch from 404c490 to 1b82248 Compare October 17, 2022 14:02
Copy link
Contributor

@UncleSamtoshi UncleSamtoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, left a few comments!

titleStyle: TextProps
}) => {
const [isDropdownOpen, setIsDropdownOpen] = React.useState(false)
const open = useSharedValue(false)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the state for isDropdownOpen and open be consolidated or do we need both?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure actually. I'm still learning how react-native-reanimated works. The useSharedValue hook runs outside the react lifecycle which is why it's usually tied to UI events to increase FPS. I'll test using that value locally and see if it works.


// TODO: Return all of these values from the API?

export const getPosUrl = (network: INetwork, address: string): string => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These methods will have to change to fit our new way of keeping track of different galoy instances. Instead of assuming there is only one regtest, testnet, and mainnet instance and then translating that to a galoy backend, we will have different galoy backend options (staging, local, bbw/prod) and ultimately ask the backend for the bitcoin network that it is on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah agreed - but we don't currently have the backend setup to return all these things right? I would suggest we separate out that change in a different PR anyway since it's not related to this work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested locally and it didn't work using the shared value.

app/screens/address-screen/set-address-modal.tsx Outdated Show resolved Hide resolved
app/screens/address-screen/address-screen.tsx Outdated Show resolved Hide resolved
@daviroo daviroo marked this pull request as ready for review October 18, 2022 17:18
@daviroo daviroo requested a review from UncleSamtoshi October 18, 2022 17:18
@UncleSamtoshi
Copy link
Contributor

UncleSamtoshi commented Oct 18, 2022

A couple feedback items for this page:

  • bbw.sv does not currently work for lnurl, but pay.bbw.svdoes
  • The cash register url needs to have merchant\[username] as its path
  • Can we center the drop down, info, and merchant icons with the text that they are inline with
  • We should make sure the text fields are able to properly contain longer URL's
  • Can the top white bar be removed
    AddressMarkups

@UncleSamtoshi
Copy link
Contributor

For the information modal, I think it would be good if we tried to stick to a consistent design throughout the app. Maybe we could try and extract a generic component from the DestinationInformation.tsx that is shown below or copy the layout/styling.
IMAGE 2022-10-18 14:39:40
IMAGE 2022-10-18 14:39:38

@UncleSamtoshi
Copy link
Contributor

A final development consideration is I think we should try and standardize our strategy for icons throughout the app. In some places we use the icons from react native elements https://reactnativeelements.com/docs/components/icon and in others we are using SVGs. I think it would probably be preferred to use the react native elements option as it has some default support for theming and is one less things to maintain vs managing svgs. I am open to other alternatives, although I think it would be good for us to establish a pattern around it.

@samerbuna
Copy link
Contributor

A final development consideration is I think we should try and standardize our strategy for icons throughout the app. In some places we use the icons from react native elements https://reactnativeelements.com/docs/components/icon and in others we are using SVGs. I think it would probably be preferred to use the react native elements option as it has some default support for theming and is one less things to maintain vs managing svgs. I am open to other alternatives, although I think it would be good for us to establish a pattern around it.

It would be great if we adopt an option where we can use the same icons for both mobile and web wallets.

@UncleSamtoshi UncleSamtoshi merged commit a310e8f into main Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants