From af9168e3aac48c7033e237e4578ae28f6d77586c Mon Sep 17 00:00:00 2001 From: Aleksandr Kraiz Date: Tue, 10 May 2022 22:26:46 +0400 Subject: [PATCH] Added OB getBlockNumber method --- src/services/OrionBlockchain/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/services/OrionBlockchain/index.ts b/src/services/OrionBlockchain/index.ts index a4d39b7..11ea1a6 100644 --- a/src/services/OrionBlockchain/index.ts +++ b/src/services/OrionBlockchain/index.ts @@ -82,6 +82,8 @@ class OrionBlockchain { this.getTargetAtomicSwapHistory = this.getTargetAtomicSwapHistory.bind(this); this.checkPoolInformation = this.checkPoolInformation.bind(this); this.checkIfHashUsed = this.checkIfHashUsed.bind(this); + this.getQueueLength = this.getQueueLength.bind(this); + this.getBlockNumber = this.getBlockNumber.bind(this); } get orionBlockchainWsUrl() { @@ -190,6 +192,10 @@ class OrionBlockchain { ); } + getBlockNumber() { + return fetchWithValidation(`https://${this.apiUrl}/api/blocknumber`, z.number().int()); + } + getQueueLength() { return fetchWithValidation(`https://${this.apiUrl}/api/queueLength`, z.number().int()); }