diff --git a/src/pages/CommunitySBT.jsx b/src/pages/CommunitySBT.jsx
index aa4ba55..cd8deb2 100644
--- a/src/pages/CommunitySBT.jsx
+++ b/src/pages/CommunitySBT.jsx
@@ -126,6 +126,28 @@ const CommunitySBTPage = () => {
isAvailable={true}
onClick={() => window.open(Links.ELECTIONS, '_blank')}
/>
+
+
+
+
{
fetchVibeToken();
fetchKudosToken();
fetchModsToken();
- fetchIVotedToken();
+ fetchElectionsToken();
}
}, [activePageIndex]);
@@ -116,7 +116,7 @@ const Home = () => {
}
};
- const fetchIVotedToken = async () => {
+ const fetchElectionsToken = async () => {
try {
const data = await wallet.viewMethod({
contractId: app_contract,
@@ -133,10 +133,22 @@ const Home = () => {
if (token.metadata.class === 1) {
dispatch(updateTokens({ type: TokenTypes.I_VOTED, value: token }));
}
+ // class2=HoM
+ if (token.metadata.class === 2) {
+ dispatch(updateTokens({ type: TokenTypes.HoM, value: token }));
+ }
+ // class3=CoA
+ if (token.metadata.class === 3) {
+ dispatch(updateTokens({ type: TokenTypes.CoA, value: token }));
+ }
+ // class4=TC
+ if (token.metadata.class === 4) {
+ dispatch(updateTokens({ type: TokenTypes.TC, value: token }));
+ }
}
}
} catch (error) {
- toast.error('An error occured while fetching I Voted SBT details');
+ toast.error('An error occured while fetching election token details');
}
};
diff --git a/src/redux/reducer/sbtsReducer.js b/src/redux/reducer/sbtsReducer.js
index 5a1f49c..89c3052 100644
--- a/src/redux/reducer/sbtsReducer.js
+++ b/src/redux/reducer/sbtsReducer.js
@@ -60,6 +60,9 @@ export const sbtReducer = createSlice({
gwgCoreContributor: null,
modToken: null,
iVotedToken: null,
+ coaToken: null,
+ homToken: null,
+ tcToken: null,
},
reducers: {
updateTokens: (state, action) => {
@@ -98,6 +101,15 @@ export const sbtReducer = createSlice({
case TokenTypes.I_VOTED:
state.iVotedToken = value;
break;
+ case TokenTypes.CoA:
+ state.coaToken = value;
+ break;
+ case TokenTypes.HoM:
+ state.homToken = value;
+ break;
+ case TokenTypes.TC:
+ state.tcToken = value;
+ break;
default:
break;
}
@@ -112,7 +124,10 @@ export const sbtReducer = createSlice({
state.ndcContributor ||
state.gwgCoreContributor ||
state.modToken ||
- state.iVotedToken;
+ state.iVotedToken ||
+ state.coaToken ||
+ state.homToken ||
+ state.tcToken;
},
handleErrorMessage: (state, action) => {
state.error = action.payload;
@@ -130,6 +145,9 @@ export const sbtReducer = createSlice({
state.ndcContributor = null;
state.modToken = null;
state.iVotedToken = null;
+ state.tcToken = null;
+ state.coaToken = null;
+ state.homToken = null;
},
updateTokenRemoveStatus: (state, action) => {
state.tokenRemoveSuccess = !state.tokenRemoveSuccess;
diff --git a/src/utils/constants.js b/src/utils/constants.js
index 2da3337..706e1b5 100644
--- a/src/utils/constants.js
+++ b/src/utils/constants.js
@@ -35,6 +35,9 @@ export const TokenTypes = {
GWG__Core_Contributor: 'GWG Core Contributor',
MOD: 'Mod',
I_VOTED: 'I Voted',
+ CoA: 'CoA',
+ HoM: 'HoM',
+ TC: 'TC',
};
export const ReducerNames = {
@@ -114,6 +117,9 @@ export const ImageSrc = {
'https://bafkreidrd4ci3p23e7zttaq5ukpzeddyzvfdm37x3xomju3rgeq77f2dba.ipfs.nftstorage.link/',
Astra:
'https://bafkreig2uojfxnf4bto6wuzaylec7wjmo4lznv6nz42fpas2bb4wuueehe.ipfs.nftstorage.link/',
+ HoM: 'https://bafybeifwzgubzysrir7pcnrkstxsgtxferm2qesu3hduasuaucwnn7enyu.ipfs.nftstorage.link/',
+ CoA: 'https://bafybeidw2rljcg3okollcnycryk2zc6zk3ykbygzattagdpjbagqp4cebm.ipfs.nftstorage.link/',
+ TC: 'https://bafybeid5xdhn6zx3s5htfuvzlueeyxgylejevnumlbxjfxc7a6g27bhr7u.ipfs.nftstorage.link/',
};
export const Links = {