Browse Source

[PM-1195] Creating a copy of 'this' on ToJson so that it doesn't change the current view. (#5062)

pull/5089/head
aj-rosado 3 years ago committed by GitHub
parent
commit
846b15d6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      libs/common/src/models/view/send.view.ts

9
libs/common/src/models/view/send.view.ts

@ -68,9 +68,12 @@ export class SendView implements View { @@ -68,9 +68,12 @@ export class SendView implements View {
}
toJSON() {
return Utils.merge(this, {
key: Utils.fromBufferToB64(this.key),
});
return Utils.merge(
{ ...this },
{
key: Utils.fromBufferToB64(this.key),
}
);
}
static fromJSON(json: DeepJsonify<SendView>) {

Loading…
Cancel
Save