mirror of https://github.com/embarklabs/embark.git
change to new new api
This commit is contained in:
parent
cf8f7720d0
commit
9c657c310b
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue