feat: added new method getExchangeContractWalletBalance

This commit is contained in:
Mikhail Gladchenko
2024-03-19 09:09:03 +00:00
parent cf2fd889a0
commit b2a3406836
2 changed files with 8 additions and 1 deletions

View File

@@ -114,6 +114,7 @@ class BlockchainService {
this.getRedeemOrderBySecretHash = this.getRedeemOrderBySecretHash.bind(this);
this.claimOrder = this.claimOrder.bind(this);
this.getGasLimits = this.getGasLimits.bind(this);
this.getExchangeContractWalletBalance = this.getExchangeContractWalletBalance.bind(this);
}
get basicAuthHeaders() {
@@ -495,6 +496,12 @@ class BlockchainService {
z.record(z.number()),
{ headers: this.basicAuthHeaders }
);
getExchangeContractWalletBalance = (exchangeContractAddress: string) => fetchWithValidation(
`${this.apiUrl}/api/broker/getWalletBalance/${exchangeContractAddress}`,
z.record(z.string()),
{ headers: this.basicAuthHeaders }
);
}
export * as schemas from './schemas/index.js';