*Use maybeGetAsyncProperty to get remotePublicKey
This commit is contained in:
parent
bb36a80913
commit
1cc1a0d2b1
|
@ -119,7 +119,9 @@ export default class RpcNetwork {
|
||||||
this.setupRelayPromise();
|
this.setupRelayPromise();
|
||||||
|
|
||||||
this._swarm.on("connection", async (relay: any) => {
|
this._swarm.on("connection", async (relay: any) => {
|
||||||
const pubkey = b4a.from(relay.remotePublicKey).toString("hex");
|
const pubkey = b4a
|
||||||
|
.from(await maybeGetAsyncProperty(relay.remotePublicKey))
|
||||||
|
.toString("hex");
|
||||||
relay.once("close", () => {
|
relay.once("close", () => {
|
||||||
this._methods.forEach((item) => {
|
this._methods.forEach((item) => {
|
||||||
if (item.has(pubkey)) {
|
if (item.has(pubkey)) {
|
||||||
|
|
Loading…
Reference in New Issue