Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions nuxt/components/AddStoreModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@
</v-flex>
</v-layout>

<div class="d-flex justify-center my-4">
<v-switch
v-model="lightningAccepted"
color="orange"
label="Lightning accepted?"
/>
</div>

<v-layout row>
<v-flex pl-3 pr-3>
<span class="font-weight-bold"
Expand Down Expand Up @@ -205,6 +213,7 @@ export default {
addAlert: { message: '', success: true },
confirm_title: 'Store successfully added.',
isLoading: false,
lightningAccepted: false,

paymentRequest: '',
paymentID: '',
Expand Down Expand Up @@ -287,14 +296,17 @@ export default {
this.isLoading = true
this.addAlert = { message: '', success: true }
this.isPaid = false

const { contributor, url, name, description, uri } = this.addDialogForm
this.$store
.dispatch('addStore', {
name: this.addDialogForm.name,
description: this.addDialogForm.description,
url: this.addDialogForm.url,
uri: this.addDialogForm.uri,
contributor: this.addDialogForm.contributor,
contributor,
description,
lightningAccepted: this.lightningAccepted,
name,
recaptcha: token,
uri,
url,
})
.then(
(response) => {
Expand Down
17 changes: 5 additions & 12 deletions nuxt/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,14 @@ const actions = {
},
addStore(
{ state },
{
name: name,
description: description,
url: url,
uri: uri,
sector: sector,
digitalGoods: digitalGoods,
contributor: contributor,
recaptcha: recaptcha,
}
{ contributor, description, lightningAccepted, name, recaptcha, uri, url }
) {
let params = {
const BTCLNMode = lightningAccepted ? ['payments'] : []

const params = {
accepted: {
BTC: { modes: ['payments'] },
BTCLN: { modes: ['payments'] },
BTCLN: { modes: BTCLNMode },
},
name: encodeURIComponent(name),
description: encodeURIComponent(description),
Expand Down