-
Notifications
You must be signed in to change notification settings - Fork 0
Develop #11
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
base: main
Are you sure you want to change the base?
Develop #11
Conversation
…nt in body of request to rafiki pos service sync amount and receiverWalletAddress to be the values set by the merchant
feat(kaios-pos): add qr code reading + add payment to rafiki as test
App UI updates
| render() { | ||
| return this.state.hasError ? ( | ||
| <div className="p-6 text-center"> | ||
| <h2 className="text-xl font-semibold">Something went wrong</h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both these two lines have hardcoded text? Not localized?
| ))} | ||
| {!items.length && ( | ||
| <div className="px-3 py-6 text-center text-white-60"> | ||
| No transactions for this date. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| )} | ||
| {items.length > 0 && ( | ||
| <div className="rounded-4xl bg-green-500 mt-6 px-6 py-6 text-center text-white"> | ||
| <span data-l10n-id="email-report">Email report</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| const inputRef = useRef<HTMLSelectElement>(null); | ||
|
|
||
| const availableLanguages = [ | ||
| { code: "en-US", label: "English" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that this labels should be translated :) ro-RO would be Romanian in English language :)
| } | ||
| }, []); | ||
|
|
||
| useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we somehow not duplicate this code? Because I see that this one is quite duplicated
| <section className="space-y-2"> | ||
| <Header /> | ||
| <div className={`flex flex-col p-4 mt-4 ${0 === focused ? "active-item-bg" : ""}`}> | ||
| <span className="">Payment pointer</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translation - Payment pointer
| }; | ||
|
|
||
| if (typeof paymentPointer !== "string" || paymentPointer.trim() === "") { | ||
| throw new Error("paymentPointer missing in QR code"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate error
src/pages/SetupByQR.tsx
Outdated
| throw new Error("paymentPointer missing in QR code"); | ||
| } | ||
| if (typeof signSec !== "string" || signSec.trim() === "") { | ||
| throw new Error("signSec missing in QR code"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate error
| console.log("[SetupByQR] stored QR settings"); | ||
| } catch (err) { | ||
| const message = | ||
| err instanceof Error ? err.message : "Invalid QR configuration payload"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate error
| const videoEl = videoRef.current; | ||
|
|
||
| if (!videoEl) { | ||
| setError("Video element not available."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| const canvas = document.createElement("canvas"); | ||
| const context = canvas.getContext("2d"); | ||
| if (!context) { | ||
| setError("Unable to access canvas context."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| setError( | ||
| parseError instanceof Error | ||
| ? parseError.message | ||
| : "Unable to process QR", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
|
|
||
| const handleError = (err: unknown) => { | ||
| const message = | ||
| err instanceof Error ? err.message : "Unable to access camera."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| }, | ||
| ); | ||
| } else { | ||
| handleError(new Error("Camera API is not available on this device.")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| style={{ minWidth: 0 }} | ||
| > | ||
| <header className="text-xl font-semibold" data-l10n-id="setup-qr-title"> | ||
| Setup by QR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| {decodedValue ? ( | ||
| <div> | ||
| <div className="font-semibold" data-l10n-id="setup-qr-result-label"> | ||
| QR Data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| </div> | ||
| ) : ( | ||
| <div className="text-gray-600" data-l10n-id="setup-qr-instructions"> | ||
| {isScanning |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
| className="text-sm text-gray-600" | ||
| data-l10n-id="setup-qr-no-result" | ||
| > | ||
| No QR code detected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
src/pages/Splash.tsx
Outdated
| <div className="text-center"> | ||
| <div className="text-4xl font-extrabold tracking-tight"> | ||
| <div className="mt-12 pt-8 pb-8"> | ||
| <img src="/assets/icons/logo.png" alt="Interledger POS" className="mx-auto" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate alt text
src/pages/WaitCard.tsx
Outdated
| <p className="mt-2 text-white/70"> | ||
| Waiting for an NFC card… keep it in the field until confirmed. | ||
| </p> | ||
| <Header title="Waiting for Card" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
src/pages/WaitCard.tsx
Outdated
| </p> | ||
| )} | ||
|
|
||
| <span data-l10n-id={`statuses-${transactionStatus}-key-message`} className="mt-4 mb-2 px-4 text-xl text-center">Hold card near the reader</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate
* feat: pin page, pin component and state logic * feat: extract a TransactionStatus component
…n status options, and also integrates the pin component (#14)
* feat: language page update, menu icon and translations updates * fix: remove language hint as not needed
* feat(gpo-rr): implement gpo and read record apdu commands * feat(pos): introduce GPO and RR commands & general refactor
* feat(kaios-pos): add 9f36, df01, df02, and wrap all in 77 * chore(kaios-pos): remove clogs
No description provided.