mirror of https://github.com/waku-org/js-waku.git
fix: nwaku's response differs from RFC but go-waku does not
This commit is contained in:
parent
10c32c84c8
commit
a7dc6936bc
|
@ -249,12 +249,19 @@ export class Nwaku {
|
|||
async getAsymmetricKeyPair(): Promise<KeyPair> {
|
||||
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(
|
||||
|
|
Loading…
Reference in New Issue