Skip to content

Commit

Permalink
use arrow function and this instead of self
Browse files Browse the repository at this point in the history
  • Loading branch information
jrainville committed Feb 5, 2020
1 parent 856959d commit 61488c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/plugins/ens/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class ENS {
if (!this.config.namesystemConfig.register) {
return cb();
}
const self = this;
const defaultAccount = await this.web3DefaultAccount;
const web3 = await this.web3;

Expand All @@ -193,7 +192,7 @@ class ENS {
const directivesRegExp = new RegExp(/\$(\w+\[?\d?\]?)/g);

// Using an anonymous function here because setting an async.js function as `async` creates issues
(async function() {
(async () => {
const directives = directivesRegExp.exec(address);
if (directives && directives.length) {
if (!directives[0].includes('accounts')) {
Expand All @@ -209,7 +208,7 @@ class ENS {
}
address = accounts[accountIndex];
}
self.safeRegisterSubDomain(subDomainName, address, defaultAccount, eachCb);
this.safeRegisterSubDomain(subDomainName, address, defaultAccount, eachCb);
})();
}, cb);
}
Expand Down

0 comments on commit 61488c3

Please sign in to comment.