mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Change the Send page so we send another mutation when the user sends a link than send gdds.
This commit is contained in:
parent
c7bda9b15e
commit
665c30aa60
@ -77,21 +77,36 @@ export default {
|
||||
this.currentTransactionStep = 1
|
||||
},
|
||||
async sendTransaction() {
|
||||
console.log('TESTETESTESTES')
|
||||
this.loading = true
|
||||
this.error = false
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: sendCoins,
|
||||
variables: this.transactionData,
|
||||
})
|
||||
.then(() => {
|
||||
this.error = false
|
||||
this.$emit('update-balance', this.transactionData.amount)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.errorResult = err.message
|
||||
this.error = true
|
||||
})
|
||||
if (this.transactionData.selected === 'send') {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: sendCoins,
|
||||
variables: this.transactionData,
|
||||
})
|
||||
.then(() => {
|
||||
this.error = false
|
||||
this.$emit('update-balance', this.transactionData.amount)
|
||||
})
|
||||
.catch((err) => {
|
||||
this.errorResult = err.message
|
||||
this.error = true
|
||||
})
|
||||
} else if (this.transactionData.selected === 'link') {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: createTransactionLink,
|
||||
variables: { amount: this.transactionData.amount, memo: this.transactionData.memo },
|
||||
})
|
||||
.then((result) => {
|
||||
console.log(result)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.toastError(error)
|
||||
})
|
||||
}
|
||||
this.currentTransactionStep = 2
|
||||
this.loading = false
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user