mirror of
https://github.com/amark/gun.git
synced 2025-06-07 14:46:44 +00:00
give the thing itself
This commit is contained in:
parent
6374809151
commit
cf308e2a32
5
sea.js
5
sea.js
@ -392,10 +392,11 @@
|
|||||||
// Practical examples about usage found from ./test/common.js
|
// Practical examples about usage found from ./test/common.js
|
||||||
const SEA = {
|
const SEA = {
|
||||||
// This is easy way to use IndexedDB, all methods are Promises
|
// This is easy way to use IndexedDB, all methods are Promises
|
||||||
EasyIndexedDB,
|
indexedDB: EasyIndexedDB, // Note: Not all SEA interfaces have to support this.
|
||||||
// This is Buffer used in SEA and usable from Gun/SEA application also.
|
// This is Buffer used in SEA and usable from Gun/SEA application also.
|
||||||
// For documentation see https://nodejs.org/api/buffer.html
|
// For documentation see https://nodejs.org/api/buffer.html
|
||||||
Buffer: SafeBuffer,
|
Buffer: SafeBuffer,
|
||||||
|
random: getRandomBytes,
|
||||||
// These SEA functions support now ony Promises or
|
// These SEA functions support now ony Promises or
|
||||||
// async/await (compatible) code, use those like Promises.
|
// async/await (compatible) code, use those like Promises.
|
||||||
//
|
//
|
||||||
@ -1156,6 +1157,7 @@
|
|||||||
// then we're done
|
// then we're done
|
||||||
var login = finalizeLogin(alias, keys, root, { pin })
|
var login = finalizeLogin(alias, keys, root, { pin })
|
||||||
login.catch(putErr('Failed to finalize login with new password!'))
|
login.catch(putErr('Failed to finalize login with new password!'))
|
||||||
|
login = await login;
|
||||||
return cat.ing = false, cb(login), gun;
|
return cat.ing = false, cb(login), gun;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return putErr('Password set attempt failed!')(e)
|
return putErr('Password set attempt failed!')(e)
|
||||||
@ -1163,6 +1165,7 @@
|
|||||||
} else {
|
} else {
|
||||||
var login = finalizeLogin(alias, keys, root, { pin })
|
var login = finalizeLogin(alias, keys, root, { pin })
|
||||||
login.catch(putErr('Finalizing login failed!'))
|
login.catch(putErr('Finalizing login failed!'))
|
||||||
|
login = await login;
|
||||||
return cat.ing = false, cb(login), gun;
|
return cat.ing = false, cb(login), gun;
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user