From a7dc6936bcc7d8ced88e06f0f310b093f0d07845 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Wed, 15 Jun 2022 14:22:10 +1000 Subject: [PATCH] fix: nwaku's response differs from RFC but go-waku does not --- src/test_utils/nwaku.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/test_utils/nwaku.ts b/src/test_utils/nwaku.ts index 2f70cce648..cba55b4bb4 100644 --- a/src/test_utils/nwaku.ts +++ b/src/test_utils/nwaku.ts @@ -249,12 +249,19 @@ export class Nwaku { async getAsymmetricKeyPair(): Promise { this.checkProcess(); - const { seckey, pubkey } = await this.rpcCall<{ + const { privateKey, publicKey, seckey, pubkey } = await this.rpcCall<{ seckey: string; pubkey: string; + privateKey: string; + publicKey: string; }>("get_waku_v2_private_v1_asymmetric_keypair", []); - return { privateKey: seckey, publicKey: pubkey }; + // To be removed once https://github.com/vacp2p/rfc/issues/507 is fixed + if (seckey) { + return { privateKey: seckey, publicKey: pubkey }; + } else { + return { privateKey, publicKey }; + } } async postAsymmetricMessage(