Skip to content

Commit de60f9a

Browse files
committed
Allow disabling CreditCard providers in the config
1 parent 7bcfb93 commit de60f9a

File tree

4 files changed

+9
-0
lines changed

4 files changed

+9
-0
lines changed

src/components/modals/BuyOptionsModal.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@
202202
<script lang="ts">
203203
import { computed, defineComponent, onMounted, ref } from '@vue/composition-api';
204204
import { PageBody, FiatAmount, Tooltip, InfoCircleSmallIcon, CircleSpinner } from '@nimiq/vue-components';
205+
import Config from 'config';
205206
import Modal from './Modal.vue';
206207
import CountrySelector from '../CountrySelector.vue';
207208
import CountryFlag from '../CountryFlag.vue';
@@ -238,11 +239,13 @@ export default defineComponent({
238239
});
239240
240241
const isMoonpayAvailable = computed(() => { // eslint-disable-line arrow-body-style
242+
if (!Config.moonpay.enabled) return false;
241243
if (!country.value) return true;
242244
return MOONPAY_COUNTRY_CODES.includes(country.value.code);
243245
});
244246
245247
const isSimplexAvailable = computed(() => { // eslint-disable-line arrow-body-style
248+
if (!Config.simplex.enabled) return false;
246249
if (!country.value) return true;
247250
return SIMPLEX_COUNTRY_CODES.includes(country.value.code);
248251
});

src/config/config.local.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ export default {
2424
},
2525

2626
moonpay: {
27+
enabled: true,
2728
// This is a publishable key
2829
widgetUrl: 'https://buy-staging.moonpay.com?apiKey=pk_test_N3px5sgYEnrWtGxAkXHNoVno3At9ZYO',
2930
signatureEndpoint: 'https://mun.soerenschwert.de',
3031
},
3132

3233
simplex: {
34+
enabled: true,
3335
formScriptUrl: 'https://iframe.sandbox.test-simplexcc.com/form-sdk.js',
3436
sdkScriptUrl: 'https://cdn.test-simplexcc.com/sdk/v1/js/sdk.js',
3537
splxScriptUrl: null as string | null,

src/config/config.mainnet.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ export default {
2424
},
2525

2626
moonpay: {
27+
enabled: true,
2728
// This is a publishable key
2829
widgetUrl: 'https://buy.moonpay.com?apiKey=pk_live_fBJsMWLtYLqqRR1mtw8mr4fQ7lCMakNL',
2930
signatureEndpoint: 'https://mun.soerenschwert.de',
3031
},
3132

3233
simplex: {
34+
enabled: true,
3335
formScriptUrl: 'https://iframe.simplex-affiliates.com/form-sdk.js',
3436
sdkScriptUrl: 'https://cdn.simplex.com/sdk/v1/js/sdk.js',
3537
splxScriptUrl: 'https://checkout.simplexcc.com/splx.js',

src/config/config.testnet.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,14 @@ export default {
2424
},
2525

2626
moonpay: {
27+
enabled: true,
2728
// This is a publishable key
2829
widgetUrl: 'https://buy-staging.moonpay.com?apiKey=pk_test_N3px5sgYEnrWtGxAkXHNoVno3At9ZYO',
2930
signatureEndpoint: 'https://mun.soerenschwert.de',
3031
},
3132

3233
simplex: {
34+
enabled: true,
3335
formScriptUrl: 'https://iframe.sandbox.test-simplexcc.com/form-sdk.js',
3436
sdkScriptUrl: 'https://cdn.test-simplexcc.com/sdk/v1/js/sdk.js',
3537
splxScriptUrl: null,

0 commit comments

Comments
 (0)