Skip to content

Commit

Permalink
[JS] remove obsolete get participant reputation
Browse files Browse the repository at this point in the history
  • Loading branch information
clangenb committed Nov 21, 2023
1 parent 8cd6c44 commit c1c73a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
9 changes: 0 additions & 9 deletions app/js_service_encointer/src/service/encointer.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,6 @@ export async function subscribeBusinessRegistry (msgChannel, cid) {
}).then((unsub) => unsubscribe(unsub, msgChannel));
}

export async function getParticipantReputation (cid, cIndex, address) {
const cidT = api.createType('CommunityIdentifier', cid);
send('js-getParticipantReputation', `Getting participant reputation for Cid: ${communityIdentifierToString(cidT)}, cIndex: ${cIndex} and address: ${address}`);
const reputation = await api.query.encointerCeremonies.participantReputation([cid, cIndex], address);
send('js-getParticipantReputation', `Participant reputation: ${reputation}`);
return reputation;
}

export async function getDemurrage (cid) {
const cidT = api.createType('CommunityIdentifier', cid);

Expand Down Expand Up @@ -316,7 +308,6 @@ export async function sendNextPhaseTx() {
}

export default {
getParticipantReputation,
subscribeCurrentPhase,
subscribeBalance,
subscribeCommunityIdentifiers,
Expand Down
20 changes: 0 additions & 20 deletions app/js_service_encointer/test/service/encointer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,6 @@ describe('encointer', () => {
keyring = new Keyring({ type: 'sr25519' });
}, 90000);

describe('getParticipantReputation', () => {
it('should return promise', async () => {
await cryptoWaitReady();
const cid = communityIdentifierFromString(api.registry, 'gbsuv7YXq9G');
const attendee = keyring.addFromUri('//Bob', { name: 'Bob default' }).address;
const result = await encointer.getParticipantReputation(cid, 1, attendee);
expect(result.isUnverified).toBeTruthy();
});
});

describe('getParticipantReputation2', () => {
it('should return promise', async () => {
await cryptoWaitReady();
const cid = communityIdentifierFromString(api.registry, 'gbsuv7YXq9G');
// const attendee = keyring.addFromUri('//Bob', { name: 'Bob default' }).address;
const result = await encointer.getParticipantReputation(cid, 3, '0xf4577adda8c5bda374fb86d42aed35eb171a949c7b52202806cd137795d5567a');
expect(result.isUnverified).toBeTruthy();
});
});

describe('getProofOfAttendance', () => {
it('should be defined', () => {
expect(encointer.getProofOfAttendance).toBeDefined();
Expand Down

0 comments on commit c1c73a9

Please sign in to comment.