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

NIM-less Checkout #411

Merged
merged 4 commits into from
Apr 17, 2020
Merged

NIM-less Checkout #411

merged 4 commits into from
Apr 17, 2020

Conversation

sisou
Copy link
Member

@sisou sisou commented Apr 15, 2020

Adds a configuration option allowsCheckoutWithoutNim: (origin: string) => boolean that returns if a given origin is allowed to create Checkout requests without a NimPaymentOption.

For development, this is configured as always true by default, for the testnet this allows the CPL staging website, and for the mainnet this allows Checkout requests from non-API CPLs.

The only two necessary changes are in RequestParser lines 122-126, and in Checkout.vue, as the NIM currency is now not necessarily present anymore.

@sisou sisou added the enhancement New feature or request label Apr 15, 2020
@sisou sisou requested a review from danimoh April 15, 2020 11:46
@sisou sisou self-assigned this Apr 15, 2020
Copy link
Member

@danimoh danimoh left a comment

Choose a reason for hiding this comment

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

Just some code style changes requested.
Overall, I think / hope nothing should break by enabling nim-less checkouts.

src/config/config.local.ts Outdated Show resolved Hide resolved
src/lib/RequestParser.ts Outdated Show resolved Hide resolved
src/lib/RequestParser.ts Outdated Show resolved Hide resolved
src/views/Checkout.vue Outdated Show resolved Hide resolved
@sisou sisou merged commit 61fafd2 into master Apr 17, 2020
@sisou sisou deleted the soeren/nimless-checkout branch April 17, 2020 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants