Skip to content

Commit

Permalink
chore: sync master with develop
Browse files Browse the repository at this point in the history
chore: sync master with develop
  • Loading branch information
arsenijesavic authored Oct 2, 2023
2 parents 06be5b0 + 998c6b2 commit b3c8d4c
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@graphql-codegen/typescript-operations": "^3.0.3",
"@hypha-dao/hypha-token-sales-util": "^1.0.1",
"@hypha-dao/ppp-client-api": "1.0.3",
"@hypha-dao/ual-hypha": "^1.0.11",
"@hypha-dao/ual-hypha": "^1.0.12",
"@quasar/extras": "1.10.4",
"@sentry/browser": "6.3.1",
"@sentry/integrations": "6.3.1",
Expand Down
4 changes: 2 additions & 2 deletions src/components/login/login-view.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
this.$emit('transitionToRegister')
}
} else {
await this.loginWallet({ idx, returnUrl: this.isOnboarding ? 'create' : this.$route.query.returnUrl || 'home' })
await this.loginWallet({ idx, returnUrl: this.isOnboarding ? 'create' : this.$route.query.returnUrl || '/' })
}
},
async onLoginInApp () {
Expand All @@ -66,7 +66,7 @@ export default {
this.submitting = true
this.errorPrivateKey = await this.loginInApp({
...this.form,
returnUrl: this.isOnboarding ? 'create' : this.$route.query.returnUrl || 'home'
returnUrl: this.isOnboarding ? 'create' : this.$route.query.returnUrl || '/'
})
this.submitting = false
},
Expand Down
6 changes: 4 additions & 2 deletions src/layouts/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ const ACTIVE_PLAN_QUERY = `
price
id: planId
name: planName
planType
interval
}
`
Expand Down Expand Up @@ -169,7 +171,7 @@ export default {
isHypha: dao?.settings[0]?.settings_isHypha_i || ''
}
},
skip () { return !this.dhoname || ['create-your-dao', 'login'].includes(this.$route.name) ? '' : !this.account },
skip () { return !this.dhoname || this.isAuthenticated ? !this.account : '' },
variables () { return { regexp: '/^' + this.dhoname + '$/i', username: this.account } },
async result (res) {
this.state = STATE.LOADING
Expand Down Expand Up @@ -217,7 +219,7 @@ export default {
},
computed: {
...mapGetters('accounts', ['account']),
...mapGetters('accounts', ['account', 'isAuthenticated']),
layout () { return this.$route?.meta?.layout || 'multi-dho-layout' }
},
Expand Down
2 changes: 1 addition & 1 deletion src/pages/proposals/ProposalDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ export default {
variables () { return { docId: this.docId } },
fetchPolicy: 'no-cache',

pollInterval: 1000, // TODO: Swap with subscribe once dgraph is ready
// pollInterval: 1000, // TODO: Swap with subscribe once dgraph is ready
// subscribeToMore: {
// document: gql`subscription proposalDetail($docId: String!) { ${PROPOSAL_QUERY} }`,
// skip () { return !this.docId },
Expand Down
8 changes: 4 additions & 4 deletions src/pages/proposals/ProposalList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,8 @@ export default {
user: this.account
}
},
fetchPolicy: 'no-cache',
pollInterval: 1000 // TODO: Swap with subscribe once dgraph is ready
fetchPolicy: 'no-cache'
// pollInterval: 1000 // TODO: Swap with subscribe once dgraph is ready
// subscribeToMore: {
// document: require('~/query/proposals/dao-proposals-active-vote-subs.gql'),
// variables () {
Expand Down Expand Up @@ -436,8 +436,8 @@ export default {
user: this.account
}
},
fetchPolicy: 'no-cache',
pollInterval: 1000 // TODO: Swap with subscribe once dgraph is ready
fetchPolicy: 'no-cache'
// pollInterval: 1000 // TODO: Swap with subscribe once dgraph is ready
// subscribeToMore: {
// document: gql`subscription stageProposals($docId: String!, $first: Int, $offset: Int) { ${STAGED_PROPOSALS_QUERY} }`,
// skip () { return !this.selectedDao?.docId },
Expand Down
20 changes: 19 additions & 1 deletion src/store/accounts/actions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Api, JsonRpc } from 'eosjs'
import { JsSignatureProvider } from 'eosjs/dist/eosjs-jssig'
import { MEMBER_TYPE } from '~/const'
import { Screen } from 'quasar'
import gql from 'graphql-tag'

export const lightWalletLogin = async function ({ commit, dispatch }, { returnUrl }) {
Expand All @@ -26,8 +27,25 @@ export const loginWallet = async function ({ commit, dispatch }, { idx, returnUr
await authenticator.init()
let error
let account
let users = null
try {
const users = await authenticator.login()
if (authenticator.ualName === 'hypha') {
let options = {}
if (Screen.gt.md) {
options = {
text: 'Scan the QR-code with Hypha Wallet on your mobile device in order to sign this transaction request',
actionText: 'Launch On Desktop'
}
} else {
options = {
text: 'Click this button to open Hypha Wallet on your mobile device and sign this transaction',
actionText: 'Open in Hypha Wallet'
}
}
users = await authenticator.login(options)
} else {
users = await authenticator.login()
}
if (users.length) {
account = users[0].accountName
this.$ualUser = users[0]
Expand Down
2 changes: 1 addition & 1 deletion src/store/dao/mutations.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const setPlan = (state, plan = {}) => {
...plan,
name: (plan?.name || PLAN.FOUNDER).toLowerCase(),
status: plan?.status || PLAN_STATUS.ACTIVE,
amountUSD: (plan?.price / 100) / 12,
amountUSD: (plan?.price / 100) / (plan.interval === 'year' && plan.planType === 'SAAS' ? 12 : 1),
coreMembersCount: plan?.coreMembersCount || 5,
communityMembersCount: plan?.communityMembersCount || 0,
currentCoreMembersCount: state?.meta?.memberCount || 0
Expand Down

0 comments on commit b3c8d4c

Please sign in to comment.