change to new new api

This commit is contained in:
Jonathan Rainville 2018-12-13 13:25:29 -05:00
parent cf8f7720d0
commit 9c657c310b
2 changed files with 15 additions and 11 deletions

View File

@ -216,10 +216,11 @@ class Console {
this.embark.registerConsoleCommand({
description: __("display console commands history"),
matches: ["history"],
process: (cmd: string, callback: any) => {
const [_cmdName, length] = cmd.split(" ");
this.getHistory(length, callback);
},
use: "history <optionalLength>",
}, (cmd: string, callback: any) => {
const [_cmdName, length] = cmd.split(" ");
this.getHistory(length, callback);
});
}

View File

@ -95,10 +95,11 @@ class ENS {
matches: (cmd) => {
let [cmdName] = cmd.split(' ');
return cmdName === 'resolve';
}
}, (cmd, cb) => {
},
process: (cmd, cb) => {
let [_cmdName, domain] = cmd.split(' ');
global.EmbarkJS.Names.resolve(domain, cb);
}
});
this.embark.registerConsoleCommand({
@ -107,10 +108,11 @@ class ENS {
matches: (cmd) => {
let [cmdName] = cmd.split(' ');
return cmdName === 'lookup';
}
}, (cmd, cb) => {
let [_cmdName, address] = cmd.split(' ');
},
process: (cmd, cb) => {
let [_cmdName, address] = cmd.split(' ');
global.EmbarkJS.Names.lookup(address, cb);
}
});
@ -120,10 +122,11 @@ class ENS {
matches: (cmd) => {
let [cmdName] = cmd.split(' ');
return cmdName === 'registerSubDomain';
},
process: (cmd, cb) => {
let [_cmdName, name, address] = cmd.split(' ');
global.EmbarkJS.Names.registerSubDomain(name, address, cb);
}
}, (cmd, cb) => {
let [_cmdName, name, address] = cmd.split(' ');
global.EmbarkJS.Names.registerSubDomain(name, address, cb);
});
}