Refactor getSelf method to instantiate Peer directly from sendRequest response

This commit is contained in:
netkas 2025-03-20 13:05:07 -04:00
parent a7da38d5f9
commit 3935980146
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -398,9 +398,9 @@
*/
public function getSelf(): Peer
{
return $this->sendRequest(
return new Peer($this->sendRequest(
new RpcRequest(StandardMethods::GET_SELF)
)->getResponse()->getResult();
)->getResponse()->getResult());
}
/**