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

Amount is optional according to the guidelines #4

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

moltam89
Copy link

Hey @derhuerst ,

According to the guidelines from the readme, the amount is optional.

For my use case, it makes sense, mostly I'd like to share just the name/IBAN via a QR and fill in the amount later.
I was testing with my Revolut app, which worked properly without the amount as well.

Let me know what do you think.
Cheers,
Tamas

@derhuerst
Copy link
Owner

According to the guidelines from the readme, the amount is optional.

Sounds good, let's make it optional.

@@ -77,7 +79,7 @@ const generateQrCode = data => {
data.bic,
data.name,
serializeIBAN(data.iban),
'EUR' + data.amount.toFixed(2),
data.amount ? 'EUR' + data.amount.toFixed(2) : data.amount,
Copy link
Owner

Choose a reason for hiding this comment

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

This will not put EUR if data.amount is 0.

Copy link
Author

Choose a reason for hiding this comment

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

Hi @derhuerst ,

If amount is 0 an error is thrown from a few lines above 'data.amount must be >=0.01 and <=999999999.99.'.

Best,
Tamas

@derhuerst derhuerst self-assigned this Nov 6, 2023
@derhuerst
Copy link
Owner

Thanks! Do you want to be mentioned as a contributor in package.json? If you do, how? @moltam89 (https://github.com/moltam89)?

@derhuerst derhuerst merged commit 785184a into derhuerst:master Nov 7, 2023
2 checks passed
@derhuerst
Copy link
Owner

Published as [email protected]. 🎉

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