parent
eb316fcb9c
commit
d4dc58eafe
@ -128,7 +128,8 @@ export default class CertificationsMiddleware {
|
||||
return badgeReg.getContract()
|
||||
.then((badgeRegContract) => {
|
||||
logs = badgeRegContract.parseEventLogs(logs);
|
||||
const ids = logs.map((log) => log.params.id.value.toNumber());
|
||||
|
||||
const ids = logs.map((log) => log.params && log.params.id.value.toNumber());
|
||||
|
||||
return fetchCertifiers(uniq(ids));
|
||||
});
|
||||
|
@ -101,8 +101,14 @@ class Contract extends Component {
|
||||
const { api } = this.context;
|
||||
const { subscriptionId, blockSubscriptionId, contract } = this.state;
|
||||
|
||||
if (blockSubscriptionId >= 0) {
|
||||
api.unsubscribe(blockSubscriptionId);
|
||||
}
|
||||
|
||||
if (subscriptionId >= 0) {
|
||||
contract.unsubscribe(subscriptionId);
|
||||
}
|
||||
|
||||
this.props.setVisibleAccounts([]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user