Skip to content

Commit

Permalink
ci: remove ci stuff (#424)
Browse files Browse the repository at this point in the history
* ci: remove ci stuff

* ci: remove more ci stuff
  • Loading branch information
MrX-SNX authored Aug 30, 2024
1 parent 1e9e98e commit ee5b7c3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 27 deletions.
2 changes: 1 addition & 1 deletion governance/ui/src/mutations/useCastVotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export function useCastVotes(
mutationKey: ['cast', councils.toString(), JSON.stringify(candidates)],
mutationFn: async () => {
if (signer && network && multicall) {
const isMC = process.env.CI === 'true' ? true : isMotherchain(network.id);
const isMC = isMotherchain(network.id);
try {
const electionModules = councils.map((council) =>
getCouncilContract(council).connect(signer)
Expand Down
2 changes: 1 addition & 1 deletion governance/ui/src/queries/useGetUserVotingPower.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function useGetUserVotingPower(council: CouncilSlugs) {

try {
const electionModule = getCouncilContract(council).connect(motherShipProvider(network.id));
const isMC = process.env.CI === 'true' ? true : isMotherchain(network.id);
const isMC = isMotherchain(network.id);

const electionId = await electionModule.getEpochIndex();
const ballot = isMC
Expand Down
16 changes: 0 additions & 16 deletions governance/ui/src/utils/contracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,10 @@ const TreasuryCouncilContract = new Contract(
export function getCouncilContract(council: CouncilSlugs) {
switch (council) {
case 'spartan':
if (process.env.CI === 'true')
return SpartanCouncilContract.connect('0xBC85F11300A8EF619592fD678418Ec4eF26FBdFD');
return SpartanCouncilContract;
case 'ambassador':
if (process.env.CI === 'true')
return AmbassadorCouncilContract.connect('0xCdbEf5753cE3CEbF361e143117e345ADd7498F80');
return AmbassadorCouncilContract;
case 'treasury':
if (process.env.CI === 'true')
return TreasuryCouncilContract.connect('0xe3aB2C6F1C9E46Fb53eD6b297c6fff68e935B161');
return TreasuryCouncilContract;
default:
throw new Error('could not find contract');
Expand All @@ -46,16 +40,6 @@ export function getCouncilContract(council: CouncilSlugs) {

export const SnapshotRecordContract = (chainId: number, council: CouncilSlugs) => {
switch (chainId) {
case 13001: {
switch (council) {
case 'spartan':
return new Contract('0x552E469B7C88cd501C08e7759d35dC58f08C9648', abiForSnapshotMock);
case 'ambassador':
return new Contract('0x3a0186E03137B9b971EC911350A0F2D88D24FDF2', abiForSnapshotMock);
case 'treasury':
return new Contract('0xC0bFA9aC792cF691734F7b2BD252d1c2B9fBa343', abiForSnapshotMock);
}
}
case 10: {
switch (council) {
case 'spartan':
Expand Down
6 changes: 1 addition & 5 deletions governance/ui/src/utils/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ import { providers } from 'ethers';

export const motherShipProvider = (networkId?: number) => {
return new providers.JsonRpcProvider(
process.env.CI === 'true'
? process.env.CI_RPC_MOTHERSHIP
: networkId === 13001
? 'https://testnet.snaxchain.io/'
: 'https://mainnet.snaxchain.io/'
networkId === 13001 ? 'https://testnet.snaxchain.io/' : 'https://mainnet.snaxchain.io/'
);
};
4 changes: 0 additions & 4 deletions governance/ui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,6 @@ module.exports = {
)
.concat(
new webpack.DefinePlugin({
'process.env.CI': JSON.stringify(process.env.CI || false),
'process.env.CI_RPC_MOTHERSHIP': JSON.stringify(
process.env.CI_RPC_MOTHERSHIP || 'http://127.0.0.1:8545'
),
'process.env.WC_PROJECT_ID': JSON.stringify(
process.env.WC_PROJECT_ID || '824270fbfdf10d95099e9702d3cb3741'
),
Expand Down

0 comments on commit ee5b7c3

Please sign in to comment.