Handle Wallet address on identify anonymous contribution

This commit is contained in:
benber86 2021-05-25 20:48:03 +10:00
parent f14336a683
commit 6069dfcb30
2 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,7 @@
<b-button
v-if="isLoggedIn && !hideSaveBtn"
@click="authorize"
:disabled="hasErrorName.invalid"
:disabled="hasErrorName.invalid || hasErrorWallet.invalid"
type="is-primary"
outlined
>
@ -53,8 +53,8 @@ export default {
}
},
computed: {
...mapState('user', ['name', 'handle', 'company', 'contributionIndex']),
...mapGetters('user', ['isLoggedIn', 'hasErrorName']),
...mapState('user', ['name', 'handle', 'company', 'wallet', 'contributionIndex']),
...mapGetters('user', ['isLoggedIn', 'hasErrorName', 'hasErrorWallet']),
title() {
if (this.status.type === 'is-danger' || !this.contributionIndex) {
return null
@ -85,7 +85,8 @@ export default {
const body = {
token: this.token,
name: this.name,
company: this.company
company: this.company,
wallet: this.wallet
}
try {
const response = await fetch('/api/authorize_contribution', {

View File

@ -134,6 +134,7 @@ router.post('/authorize_contribution', async (req, res) => {
{
name: req.body.name,
company: req.body.company,
wallet: req.body.wallet,
handle: req.session.handle,
socialType: req.session.socialType
},