Skip to content

Commit 849be10

Browse files
gideonairexCMCDragonkai
authored andcommitted
update return type for UnlockNode
1 parent 25334ea commit 849be10

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

src/main/setHandlers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ async function setHandlers() {
417417
const res = (await promisifyGrpc(client.unlockNode.bind(client))(
418418
pb.UnlockNodeMessage.deserializeBinary(request)
419419
)) as pb.BooleanMessage;
420-
return res.getB()
420+
return res.serializeBinary()
421421
})
422422

423423
ipcMain.handle('UpdateLocalPeerInfo', async (event, request) => {

src/renderer/components/configuration/NewKeyNode.vue

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
<ui-form-field>
88
<ui-textfield v-model="passphrase" placeholder="Passphrase">Passphrase</ui-textfield>
99
</ui-form-field>
10-
<ui-form-field>
11-
<ui-textfield v-model="nbits" placeholder="Nbits">nbits</ui-textfield>
12-
</ui-form-field>
1310
<br />
1411
<ui-form-field>
1512
<ui-button @click="createKeyNode" raised>Create</ui-button>
@@ -27,12 +24,10 @@ export default defineComponent({
2724
const userStore = useModule('User')
2825
const userId = ref('')
2926
const passphrase = ref('')
30-
const nbits = ref(1024)
3127
const createKeyNode = async () => {
3228
const result = await PolykeyClient.NewNode({
3329
userid: userId.value,
34-
passphrase: passphrase.value,
35-
nbits: nbits.value
30+
passphrase: passphrase.value
3631
})
3732
if (result) {
3833
userStore.dispatch('userIsUnlocked')
@@ -41,7 +36,6 @@ export default defineComponent({
4136
return {
4237
userId,
4338
passphrase,
44-
nbits,
4539
createKeyNode
4640
}
4741
}

src/renderer/components/configuration/RegisterNode.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export default defineComponent({
2525
const registerNode = async () => {
2626
try {
2727
/** this seems to be funky how will I know that this user has already registered a node */
28-
await PolykeyClient.RegisterNode(passphrase.value)
28+
await PolykeyClient.UnlockNode({ passphrase: passphrase.value, timeout: 0 })
2929
userStore.dispatch('userIsUnlocked')
3030
/** Reroute on vaults by default */
3131
router.push('/Vaults')

src/renderer/components/keys/NewKey.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineComponent({
2626
const keyName = ref('')
2727
const keyPassphrase = ref('')
2828
const createKey = async () => {
29-
const success = await PolykeyClient.DeriveKey({ keyName: keyName.value, passphrase: keyPassphrase.value })
29+
const success = await PolykeyClient.DeriveKey({ vaultName: '', keyName: keyName.value, passphrase: keyPassphrase.value })
3030
console.log(success)
3131
router.back()
3232
}

0 commit comments

Comments
 (0)