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