mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 14:34:40 +00:00
wip changes
This commit is contained in:
parent
2a24c3cbf0
commit
888fcce974
10
js/embark.js
10
js/embark.js
@ -393,19 +393,19 @@ EmbarkJS.Names.setProvider = function (provider, options) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// resolve resolves a name into an identifier of some kind
|
// resolve resolves a name into an identifier of some kind
|
||||||
EmbarkJS.Names.resolve = function (name) {
|
EmbarkJS.Names.resolve = function (name, callback) {
|
||||||
if (!this.currentNameSystems) {
|
if (!this.currentNameSystems) {
|
||||||
throw new Error('Name system provider not set; e.g EmbarkJS.Names.setProvider("ens")');
|
throw new Error('Name system provider not set; e.g EmbarkJS.Names.setProvider("ens")');
|
||||||
}
|
}
|
||||||
return this.currentNameSystems.resolve(name);
|
return this.currentNameSystems.resolve(name, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
// the reverse of resolve, resolves using an identifier to get to a name
|
// the reverse of resolve, resolves using an identifier to get to a name
|
||||||
EmbarkJS.Names.lookup = function (identifier) {
|
EmbarkJS.Names.lookup = function (identifier, callback) {
|
||||||
if (!this.currentNameSystems) {
|
if (!this.currentNameSystems) {
|
||||||
throw new Error('Name system provider not set; e.g EmbarkJS.Names.setProvider("ens")');
|
throw new Error('Name system provider not set; e.g EmbarkJS.Names.setProvider("ens")');
|
||||||
}
|
}
|
||||||
return this.currentNameSystems.lookup(identifier);
|
return this.currentNameSystems.lookup(identifier, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
// To Implement
|
// To Implement
|
||||||
@ -417,7 +417,7 @@ EmbarkJS.Names.register = function(name, options) {
|
|||||||
throw new Error('Name system provider not set; e.g EmbarkJS.Names.setProvider("ens")');
|
throw new Error('Name system provider not set; e.g EmbarkJS.Names.setProvider("ens")');
|
||||||
}
|
}
|
||||||
return this.currentNameSystems.register(name, options);
|
return this.currentNameSystems.register(name, options);
|
||||||
}
|
};
|
||||||
|
|
||||||
EmbarkJS.Utils = {
|
EmbarkJS.Utils = {
|
||||||
fromAscii: function (str) {
|
fromAscii: function (str) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user