Skip to content
This repository was archived by the owner on Jan 7, 2020. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions email_app/app/safenet_comm.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const authApp = () => {
let uri = getAuthData();
if (uri) {
return fromAuthURI(APP_INFO.info, uri)
.then((registered_app) => registered_app.auth.refreshContainerAccess()
.then((registered_app) => registered_app.auth.refreshContainersPermissions()
.then(() => registered_app)
)
.catch((err) => {
Expand All @@ -60,7 +60,7 @@ export const connect = (uri) => {
return fromAuthURI(APP_INFO.info, uri)
.then((app) => registered_app = app)
.then(() => saveAuthData(uri))
.then(() => registered_app.auth.refreshContainerAccess())
.then(() => registered_app.auth.refreshContainersPermissions())
.then(() => registered_app);
}

Expand Down Expand Up @@ -191,10 +191,9 @@ export const setupAccount = (app, emailId) => {
enc_sk: key_pair.privateKey, enc_pk: key_pair.publicKey})
.then(() => newAccount.inbox_md.serialise())
.then((md_serialised) => inbox_serialised = md_serialised)
.then(() => app.auth.getAccessContainerInfo(APP_INFO.containers.publicNames))
.then((pub_names_md) => pub_names_md.encryptKey(serviceInfo.publicId)
.then((encrypted_publicId) => pub_names_md.get(encrypted_publicId))
.then((services) => addService(app, serviceInfo, inbox_serialised)
.then(() => app.auth.getContainer(APP_INFO.containers.publicNames))
.then((pub_names_md) => pub_names_md.get(serviceInfo.publicId)
.then((services) => addEmailService(app, serviceInfo, inbox_serialised)
, (err) => {
if (err.name === 'ERR_NO_SUCH_ENTRY') {
return createPublicIdAndEmailService(app, pub_names_md,
Expand Down