Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fixes BadgeReg Middleware (#4547) (#4556)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac authored and jacogr committed Feb 15, 2017
1 parent 8aaa18d commit 4bae2c7
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions js/src/redux/providers/certifications/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ export default class CertificationsMiddleware {
badgeReg
.getContract()
.then((badgeRegContract) => {
return badgeRegUpdateFilter(badgeRegContract.address, [
return badgeRegUpdateFilter(badgeRegContract.address, [ [
badgeRegContract.instance.Registered.signature,
badgeRegContract.instance.Unregistered.signature,
badgeRegContract.instance.MetaChanged.signature,
badgeRegContract.instance.AddressChanged.signature
]);
] ]);
})
.then(() => {
shortFetchChanges();
Expand Down Expand Up @@ -125,9 +125,13 @@ export default class CertificationsMiddleware {
}

function onBadgeRegLogs (logs) {
const ids = logs.map((log) => log.params.id.value.toNumber());
return badgeReg.getContract()
.then((badgeRegContract) => {
logs = badgeRegContract.parseEventLogs(logs);
const ids = logs.map((log) => log.params.id.value.toNumber());

return fetchCertifiers(uniq(ids));
return fetchCertifiers(uniq(ids));
});
}

function _fetchChanges () {
Expand Down

0 comments on commit 4bae2c7

Please sign in to comment.