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({
|
this.embark.registerConsoleCommand({
|
||||||
description: __("display console commands history"),
|
description: __("display console commands history"),
|
||||||
matches: ["history"],
|
matches: ["history"],
|
||||||
use: "history <optionalLength>",
|
process: (cmd: string, callback: any) => {
|
||||||
}, (cmd: string, callback: any) => {
|
|
||||||
const [_cmdName, length] = cmd.split(" ");
|
const [_cmdName, length] = cmd.split(" ");
|
||||||
this.getHistory(length, callback);
|
this.getHistory(length, callback);
|
||||||
|
},
|
||||||
|
use: "history <optionalLength>",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,10 +95,11 @@ class ENS {
|
||||||
matches: (cmd) => {
|
matches: (cmd) => {
|
||||||
let [cmdName] = cmd.split(' ');
|
let [cmdName] = cmd.split(' ');
|
||||||
return cmdName === 'resolve';
|
return cmdName === 'resolve';
|
||||||
}
|
},
|
||||||
}, (cmd, cb) => {
|
process: (cmd, cb) => {
|
||||||
let [_cmdName, domain] = cmd.split(' ');
|
let [_cmdName, domain] = cmd.split(' ');
|
||||||
global.EmbarkJS.Names.resolve(domain, cb);
|
global.EmbarkJS.Names.resolve(domain, cb);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.embark.registerConsoleCommand({
|
this.embark.registerConsoleCommand({
|
||||||
|
@ -107,10 +108,11 @@ class ENS {
|
||||||
matches: (cmd) => {
|
matches: (cmd) => {
|
||||||
let [cmdName] = cmd.split(' ');
|
let [cmdName] = cmd.split(' ');
|
||||||
return cmdName === 'lookup';
|
return cmdName === 'lookup';
|
||||||
}
|
},
|
||||||
}, (cmd, cb) => {
|
process: (cmd, cb) => {
|
||||||
let [_cmdName, address] = cmd.split(' ');
|
let [_cmdName, address] = cmd.split(' ');
|
||||||
global.EmbarkJS.Names.lookup(address, cb);
|
global.EmbarkJS.Names.lookup(address, cb);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
@ -120,10 +122,11 @@ class ENS {
|
||||||
matches: (cmd) => {
|
matches: (cmd) => {
|
||||||
let [cmdName] = cmd.split(' ');
|
let [cmdName] = cmd.split(' ');
|
||||||
return cmdName === 'registerSubDomain';
|
return cmdName === 'registerSubDomain';
|
||||||
}
|
},
|
||||||
}, (cmd, cb) => {
|
process: (cmd, cb) => {
|
||||||
let [_cmdName, name, address] = cmd.split(' ');
|
let [_cmdName, name, address] = cmd.split(' ');
|
||||||
global.EmbarkJS.Names.registerSubDomain(name, address, cb);
|
global.EmbarkJS.Names.registerSubDomain(name, address, cb);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue