Fix validation bugs

This commit is contained in:
benber86 2021-05-25 20:12:06 +10:00
parent 40395250cc
commit 811d75f03f
2 changed files with 2 additions and 2 deletions

View File

@ -152,7 +152,7 @@ export default {
!this.contributionType ||
(!this.isLoggedIn && this.contributionType !== 'anonymous') ||
this.hasErrorName.invalid ||
this.hasErrorWallet
this.hasErrorWallet.invalid
)
}
},

View File

@ -37,7 +37,7 @@ const getters = {
hasErrorWallet: (state) => {
const ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/
const wallet = state.wallet
if (wallet === null || wallet === '') {
if (wallet === null || wallet === '' || wallet === undefined) {
return { invalid: false, msg: '' }
}
if (!ADDRESS_REGEX.test(wallet)) {