mirror of
https://github.com/fluencelabs/dweb-transports
synced 2025-04-25 14:52:18 +00:00
Merge branch 'master' of https://github.com/internetarchive/dweb-transports
This commit is contained in:
commit
8d77901fc6
@ -54,10 +54,13 @@ class TransportWOLK extends Transport {
|
|||||||
.then( async () => { //TODO-WOLK check - I'm just not familiar with this construct - an async function inside a .then
|
.then( async () => { //TODO-WOLK check - I'm just not familiar with this construct - an async function inside a .then
|
||||||
if( this.wolk.ecdsaKey == undefined || this.wolk.ecdsaKey == null ) {
|
if( this.wolk.ecdsaKey == undefined || this.wolk.ecdsaKey == null ) {
|
||||||
var wolkName = "user" + Math.floor((Math.random() * 1000) + 1);
|
var wolkName = "user" + Math.floor((Math.random() * 1000) + 1);
|
||||||
debug("createAccount because ecsaKey null");
|
debug("WOLK: createAccount because ecdsaKey null")
|
||||||
await this.wolk.createAccount(wolkName, (err, hash) => { //TODO-WOLK check - is this correct (it might be), async await, but has a callback?
|
return await this.wolk.createAccount(wolkName)
|
||||||
if(err) { throw new Error("Error Creating Account: " + err); }
|
.then( hash => {
|
||||||
debug("Account Created: [%s] hash: %s KEY: %s", wolkName, ,this.wolk.ecdsaKey);
|
debug("[WOLK] Account Created: [" + wolkName + "] hash: " + hash + " KEY: " + this.wolk.ecdsaKey)
|
||||||
|
})
|
||||||
|
.catch( err => {
|
||||||
|
throw new Error("Error Creating Account: " + err);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user