Skip to content

Commit 6561a7b

Browse files
committed
fix: Fix inputs for update and deactivate operations
1 parent ceb27de commit 6561a7b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

src/components/RegistrarInput.jsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,24 @@ export class RegistrarInput extends Component {
3333
'didDocument': JSON.parse(this.state.didDocument)
3434
};
3535
}
36-
if ("update" === this.state.operation || "deactivate" === this.state.operation) {
36+
if ("update" === this.state.operation) {
3737
operation = this.state.operation;
3838
data = {
3939
'jobId': this.state.jobId,
4040
'did': this.state.did,
4141
'options': JSON.parse(this.state.options),
4242
'secret': JSON.parse(this.state.secret),
43-
'didDocument': JSON.parse(this.state.didDocument)
43+
'didDocumentOperation': ['setDidDocument'],
44+
'didDocument': [JSON.parse(this.state.didDocument)]
45+
};
46+
}
47+
if ("deactivate" === this.state.operation) {
48+
operation = this.state.operation;
49+
data = {
50+
'jobId': this.state.jobId,
51+
'did': this.state.did,
52+
'options': JSON.parse(this.state.options),
53+
'secret': JSON.parse(this.state.secret)
4454
};
4555
}
4656
} catch (error) {

0 commit comments

Comments
 (0)