Skip to content
Snippets Groups Projects

Return clone of newIdentity in createIdentity function.

Merged Igor Markin requested to merge 664-props-drilling-and-usage-of-the-vcl into master
1 file
+ 12
2
Compare changes
  • Side-by-side
  • Inline
@@ -528,8 +528,13 @@ const connection = Penpal.connectToParent({
@@ -528,8 +528,13 @@ const connection = Penpal.connectToParent({
newIdentity.setPinCode(pinCode);
newIdentity.setPinCode(pinCode);
window.currentlyLoadedIdentity = newIdentity;
window.currentlyLoadedIdentity = newIdentity;
 
const {
 
publicKey,
 
x509Certificate
 
} = newIdentity.authentication;
 
window.loadedIdentities[
window.loadedIdentities[
newIdentity.authentication.publicKey
publicKey
] = newIdentity;
] = newIdentity;
extendPinCodeTtl(newIdentity.authentication.publicKey, pinCode);
extendPinCodeTtl(newIdentity.authentication.publicKey, pinCode);
@@ -538,7 +543,12 @@ const connection = Penpal.connectToParent({
@@ -538,7 +543,12 @@ const connection = Penpal.connectToParent({
);
);
result({
result({
data: newIdentity,
data: {
 
authentication: {
 
publicKey,
 
x509Certificate
 
}
 
},
code: "200",
code: "200",
status: "Identity created"
status: "Identity created"
});
});
Loading