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

Point of Sale: Square integration #1259

Merged
merged 17 commits into from
Jan 19, 2023
Merged

Point of Sale: Square integration #1259

merged 17 commits into from
Jan 19, 2023

Conversation

kaloudis
Copy link
Contributor

Description

This PR adds a Point of Sale interface for Square terminals

This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Configuration change
  • Locales update
  • Quality assurance
  • Other

Checklist

  • I’ve run yarn run tsc and made sure my code compiles correctly
  • I’ve run yarn run lint and made sure my code didn’t contain any problematic patterns
  • I’ve run yarn run prettier and made sure my code is formatted correctly
  • I’ve run yarn run test and made sure all of the tests pass

Testing

If you modified or added a utility file, did you add new unit tests?

  • No, I’m a fool
  • Yes
  • N/A

I have tested this PR on the following platforms (please specify OS version and phone model/VM):

  • Android
  • iOS

I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):

  • LND (REST)
  • LND (Lightning Node Connect)
  • Core Lightning (c-lightning-REST)
  • Core Lightning (Spark)
  • Eclair
  • LndHub

Locales

  • I’ve added new locale text that requires translations
  • I’m aware that new translations should be made on the Zeus Transfix page and not directly to this repo

Third Party Dependencies and Packages

  • Contributors will need to run yarn after this PR is merged in
  • 3rd party dependencies have been modified:
    • verify that package.json and package-lock.json have been properly updated
    • verify that dependencies are installed for both iOS and Android platforms

Other:

  • Changes were made that require an update to the README
  • Changes were made that require an update to onboarding

@kaloudis kaloudis marked this pull request as draft January 13, 2023 23:56
Copy link
Contributor

@Talej Talej left a comment

Choose a reason for hiding this comment

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

A couple of general items

  • Should the balance / keypad views still be accessible? I couldn't find any way to get back to them with POS enabled

  • Was occasionally getting this error popping up. Not really sure what was causing it - maybe related to fetching fiat rates?

IMG_9197

views/Wallet/Wallet.tsx Outdated Show resolved Hide resolved
views/Wallet/PosPane.tsx Outdated Show resolved Hide resolved
const { getRate, loading } = FiatStore;
const { item } = order;
return (
<TouchableHighlight
Copy link
Contributor

Choose a reason for hiding this comment

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

  • While fiat rate was being fetched the order couldn't be viewed but it wasn't entirely obvious why... maybe touchability needs to be disabled while rates are loaded?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This should be covered by the flashing Fetching fiat rates at the top of the screen but will revisit if there's confusion out in the field

views/Wallet/PosPane.tsx Outdated Show resolved Hide resolved
views/Wallet/PosPane.tsx Show resolved Hide resolved
views/Wallet/PosPane.tsx Outdated Show resolved Hide resolved
@Talej
Copy link
Contributor

Talej commented Jan 17, 2023

Just one more item I have found this morning. I created an invoice and paid the invoice by switching between apps on the same device. It looks like because of that the order didn't get marked as paid even though the invoice was paid.

This was using LND over clearnet.

Maybe there's a bug or perhaps it needs a way to manually mark an order as paid just as a fallback?

IMG_9221

IMG_9222

@kaloudis kaloudis marked this pull request as ready for review January 18, 2023 23:50
@kaloudis
Copy link
Contributor Author

@Talej I think the listener gets killed when you navigate away from it. Will evaluate it.

Will assess this weekend whether to build the mark function into the UI or if it's OK to just have staff do that from the Square terminal. Likely needs an admin menu.

@kaloudis kaloudis merged commit 0d03f23 into ZeusLN:master Jan 19, 2023
@kaloudis kaloudis deleted the pos branch January 19, 2023 00:35
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.

2 participants