Skip to content

Commit

Permalink
Merge pull request #74 from OmniFlix/og_updates_cheq
Browse files Browse the repository at this point in the history
cheqd og tags updates, deploy yml file.
  • Loading branch information
harish551 authored Nov 8, 2022
2 parents fa492c7 + 349c555 commit 33298fb
Show file tree
Hide file tree
Showing 12 changed files with 164 additions and 107 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: deploy
on:
push:
branches: [ "cheq" ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
DEPLOY_DIR: /var/www/insync-cheqd



# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-and-deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: login to remote instance and build app
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.INSYNC_DEV_SSH_SERVER }}
username: ${{ secrets.INSYNC_DEV_SSH_USER }}
key: ${{ secrets.INSYNC_DEV_SSH_KEY }}
port: ${{ secrets.PORT }}
envs: GITHUB_REPOSITORY,DEPLOY_DIR
script: |
[ -d "$HOME/$GITHUB_REPOSITORY" ] && rm -rf "$HOME/$GITHUB_REPOSITORY"
mkdir -p "$HOME/$GITHUB_REPOSITORY"
git clone https://github.com/$GITHUB_REPOSITORY "$HOME/$GITHUB_REPOSITORY"
cd "$HOME/$GITHUB_REPOSITORY"
git checkout cheq &&
git pull origin cheq &&
yarn &&
yarn build &&
sudo rm -rf "${DEPLOY_DIR}" &&
sudo mkdir -p "${DEPLOY_DIR}" &&
sudo mv ./build/ "${DEPLOY_DIR}"
Binary file added public/assets/logos/og_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 20 additions & 9 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,31 @@
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="yes" name="mobile-web-app-capable">
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0' name='viewport'/>
<meta content="OmniFlix, OmniFlix for Communities, omniflix insync, DAOs, Decentralized Autonomous Organizations, OmniFlix Network, OmniFlix Media, Live Streams, web3, cosmos, blockchain, tendermint"
<meta content="OmniFlix, OmniFlix Network, OmniFlix for Communities, OmniFlix insync, omniflix, Cosmos DAOs, Cosmos SDK DAO, Decentralized Autonomous Organizations, web3, cosmos, blockchain, tendermint, staking app, FLIX, cheqd staking, cheqd proposals, cheqd voting, cheqd OmniFlix inSync, cheqd inSync, cheqd, CHEQ, CHEQ staking, cheqd multi-send, cheqd multisend, CHEQ multi-send, CHEQ multisend, cheqd multisig, CHEQ multisig"
name="keywords">
<meta content="OmniFlix InSync (for Communities) is a solution for sovereign communities and blockchain networks to discover, interact & engage with fellow members for increased Community Extractable Value (CEV)"
<meta content="cheqd | OmniFlix inSync (for Communities) is a solution for sovereign communities and blockchain networks (built with the Cosmos SDK) to participate in activities such as staking of voting power and voting on governance proposals."
name="description">
<meta content="cheqd | OmniFlix inSync" property="og:site_name">
<meta content="https://flix.omniflix.co" property="og:url">
<meta content="https://flix.omniflix.co" property="al:web:url">
<meta content="/assets/logos/logo_192x192.png" property="og:image">
<meta content="200" property="og:image:width"/>
<meta content="200" property="og:image:height"/>
<meta content="https://cheqd.omniflix.co" property="og:url">
<meta content="https://cheqd.omniflix.co" property="al:web:url">
<meta content="https://cheqd.omniflix.co/assets/logos/og_image.png" property="og:image">
<meta content="1280" property="og:image:width"/>
<meta content="720" property="og:image:height"/>
<meta content="cheqd | OmniFlix inSync" property="og:image:alt"/>
<meta content="cheqd | OmniFlix inSync" property="og:title">
<meta content="OmniFlix InSync (for Communities) is a solution for sovereign communities and blockchain networks to discover, interact & engage with fellow members for increased Community Extractable Value (CEV)"
property="og:description">
<meta content="cheqd | OmniFlix inSync (for Communities) is a solution for sovereign communities and blockchain networks (built with the Cosmos SDK) to participate in activities such as staking of voting power and voting on governance proposals."
property="og:description"/>
<meta content="website" property="og:type"/>

<meta content="summary_large_image" property="twitter:card"/>

<!-- Twitter open-graph tags -->
<meta content="summary_large_image" name="twitter:card">
<meta content="cheqd | OmniFlix inSync" name="twitter:image:alt">
<meta content="cheqd | OmniFlix inSync" name="twitter:title">
<meta content="cheqd | OmniFlix inSync (for Communities) is a solution for sovereign communities and blockchain networks (built with the Cosmos SDK) to participate in activities such as staking of voting power and voting on governance proposals."
name="twitter:description">
<meta content="https://cheqd.omniflix.co/assets/logos/og_image.png" name="twitter:image">

<link href="/manifest.json" rel="manifest">
<link href="/favicon.ico" rel="shortcut icon">
Expand Down
5 changes: 0 additions & 5 deletions src/actions/accounts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const getDelegations = (address) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -105,7 +104,6 @@ export const getBalance = (address) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -148,7 +146,6 @@ export const fetchVestingBalance = (address) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -203,7 +200,6 @@ export const getUnBondingDelegations = (address) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -253,7 +249,6 @@ export const fetchRewards = (address) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down
9 changes: 2 additions & 7 deletions src/actions/proposals.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ export const getProposals = (cb) => (dispatch) => {
Axios.get(PROPOSALS_LIST_URL, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
dispatch(fetchProposalsSuccess(res.data && res.data.result));
cb(res.data && res.data.result);
dispatch(fetchProposalsSuccess(res.data && res.data.proposals));
cb(res.data && res.data.proposals);
})
.catch((error) => {
dispatch(fetchProposalsError(
Expand Down Expand Up @@ -98,7 +97,6 @@ export const getProposalVotes = (id) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -155,7 +153,6 @@ export const fetchVoteDetails = (id, address) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -200,7 +197,6 @@ export const fetchProposalTally = (id) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -245,7 +241,6 @@ export const fetchProposalDetails = (id, cb) => (dispatch) => {
Axios.get(url, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down
4 changes: 0 additions & 4 deletions src/actions/stake.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export const getValidators = (cb) => (dispatch) => {
Axios.get(VALIDATORS_LIST_URL, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -180,7 +179,6 @@ export const getValidatorDetails = (address, cb) => (dispatch) => {
Axios.get(URL, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -225,7 +223,6 @@ export const getDelegatedValidatorsDetails = (address) => (dispatch) => {
Axios.get(URL, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down Expand Up @@ -287,7 +284,6 @@ export const fetchValidatorImage = (id) => (dispatch) => {
return Axios.get(URL, {
headers: {
Accept: 'application/json, text/plain, */*',
Connection: 'keep-alive',
},
})
.then((res) => {
Expand Down
2 changes: 1 addition & 1 deletion src/constants/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const urlFetchVoteDetails = (proposalId, address) => `${REST_URL}/gov/pro

export const VALIDATORS_LIST_URL = `${REST_URL}/staking/validators`;
export const getValidatorURL = (address) => `${REST_URL}/staking/validators/${address}`;
export const PROPOSALS_LIST_URL = `${REST_URL}/gov/proposals`;
export const PROPOSALS_LIST_URL = `${REST_URL}/cosmos/gov/v1beta1/proposals?pagination.limit=1000`;
export const getDelegatedValidatorsURL = (address) => `${REST_URL}/staking/delegators/${address}/validators`;
export const urlFetchProposalVotes = (id) => `${REST_URL}/gov/proposals/${id}/votes`;
export const urlFetchTallyDetails = (id) => `${REST_URL}/gov/proposals/${id}/tally`;
Expand Down
3 changes: 2 additions & 1 deletion src/containers/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ class Home extends Component {

render () {
const { active } = this.state;
const filteredProposals = this.props.proposals && this.props.proposals.filter((item) => item.status === 2);
const filteredProposals = this.props.proposals && this.props.proposals.filter((item) => item.status === 2 ||
item.status === 'PROPOSAL_STATUS_VOTING_PERIOD');

return (
<>
Expand Down
41 changes: 21 additions & 20 deletions src/containers/NavBar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@ class NavBar extends Component {
const array = [];
result.map((val) => {
const filter = this.props.proposalDetails && Object.keys(this.props.proposalDetails).length &&
Object.keys(this.props.proposalDetails).find((key) => key === val.id);
Object.keys(this.props.proposalDetails).find((key) => key === val.proposal_id);
if (!filter) {
if (this.props.home && val.status !== 2) {
if (this.props.home && (val.status !== 'PROPOSAL_STATUS_VOTING_PERIOD')) {
return null;
}

array.push(val.id);
array.push(val.proposal_id);
}
if (val.status === 2) {
this.props.fetchProposalTally(val.id);
if (val.status === 2 || val.status === 'PROPOSAL_STATUS_VOTING_PERIOD') {
this.props.fetchProposalTally(val.proposal_id);
}

return null;
Expand All @@ -93,16 +93,16 @@ class NavBar extends Component {
const array = [];
this.props.proposals.map((val) => {
const filter = this.props.proposalDetails && Object.keys(this.props.proposalDetails).length &&
Object.keys(this.props.proposalDetails).find((key) => key === val.id);
Object.keys(this.props.proposalDetails).find((key) => key === val.proposal_id);
if (!filter) {
if (this.props.home && val.status !== 2) {
if (this.props.home && (val.status !== 'PROPOSAL_STATUS_VOTING_PERIOD')) {
return null;
}

array.push(val.id);
array.push(val.proposal_id);
}
if (val.status === 2) {
this.props.fetchProposalTally(val.id);
if (val.status === 2 || val.status === 'PROPOSAL_STATUS_VOTING_PERIOD') {
this.props.fetchProposalTally(val.proposal_id);
}

return null;
Expand Down Expand Up @@ -149,11 +149,12 @@ class NavBar extends Component {
this.props.proposals && this.props.proposals.length) ||
((pp.address !== this.props.address) && (pp.address === '') && (this.props.address !== ''))) {
this.props.proposals.map((val) => {
const votedOption = this.props.voteDetails && this.props.voteDetails.length && val && val.id &&
this.props.voteDetails.filter((vote) => vote.proposal_id === val.id)[0];
const votedOption = this.props.voteDetails && this.props.voteDetails.length && val && val.proposal_id &&
this.props.voteDetails.filter((vote) => vote.proposal_id === val.proposal_id)[0];

if (val.status === 2 && !votedOption && this.props.address) {
this.props.fetchVoteDetails(val.id, this.props.address);
if ((val.status === 2 || val.status === 'PROPOSAL_STATUS_VOTING_PERIOD') &&
!votedOption && this.props.address) {
this.props.fetchVoteDetails(val.proposal_id, this.props.address);
}

return null;
Expand All @@ -167,17 +168,17 @@ class NavBar extends Component {
const array = [];
result.map((val) => {
const filter = this.props.proposalDetails && Object.keys(this.props.proposalDetails).length &&
Object.keys(this.props.proposalDetails).find((key) => key === val.id);
Object.keys(this.props.proposalDetails).find((key) => key === val.proposal_id);
if (!filter) {
if (this.props.home && val.status !== 2) {
if (this.props.home && (val.status !== 'PROPOSAL_STATUS_VOTING_PERIOD')) {
return null;
}

array.push(val.id);
array.push(val.proposal_id);
}
if (val.status === 2) {
this.props.fetchProposalTally(val.id);
this.props.fetchVoteDetails(val.id, this.props.address);
if (val.status === 2 || val.status === 'PROPOSAL_STATUS_VOTING_PERIOD') {
this.props.fetchProposalTally(val.proposal_id);
this.props.fetchVoteDetails(val.proposal_id, this.props.address);
}

return null;
Expand Down
Loading

0 comments on commit 33298fb

Please sign in to comment.