Skip to content

Commit

Permalink
LedgerClosed return
Browse files Browse the repository at this point in the history
  • Loading branch information
zgrguric authored Nov 10, 2023
1 parent f13de8f commit 0898dc4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Api/Methods/LedgerClosed.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ class LedgerClosed extends AbstractMethod

/**
* Returns result.
* @return stdClass
* @return int
* @throws NotExecutedException
*/
public function finalResult(): \stdClass
public function finalResult(): int
{
if(!$this->executed)
throw new NotSentException('Please send request first');

if(!$this->isSuccess())
throw new NotSuccessException('Request did not return success result');

return $this->result()->result;
return $this->result()->result->ledger_index;
}
}

0 comments on commit 0898dc4

Please sign in to comment.