*Return the relay object, not the pubkey

This commit is contained in:
Derrick Hammer 2023-03-19 15:11:13 -04:00
parent 2f2bce84eb
commit 92fe42c37e
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 1 deletions

View File

@ -99,7 +99,9 @@ export default class RpcNetwork {
throw Error("no available relay");
}
return Array.from(relays)[Math.floor(Math.random() * relays.size)];
return this._relays.get(
Array.from(relays)[Math.floor(Math.random() * relays.size)]
);
}
public getRelay(pubkey: string) {