make field getVotingInfo public

This commit is contained in:
TheJuze
2023-10-01 18:16:42 +03:00
parent 3b784906cb
commit 0f4940a6f9
3 changed files with 14 additions and 14 deletions

View File

@@ -117,6 +117,17 @@ class IntegratorService {
return BigNumber(amount).dividedBy(this.getK(timestamp));
}
getVotingInfo = (userAddress: number) => {
return fetchWithValidation(this.apiUrl, votingInfoResponseSchema, {
method: 'POST',
body: this.makeRPCPayload({
model: 'OrionVoting',
method: 'info',
params: [userAddress],
}),
});
}
private readonly getEnvironment = () => {
return fetchWithValidation(this.apiUrl, environmentResponseSchema, {
method: 'POST',
@@ -194,17 +205,6 @@ class IntegratorService {
// sqrt
return BigNumber(amountToken).multipliedBy(BigNumber(deltaDays).sqrt()).dividedBy(BigNumber(WEEK_DAYS).sqrt());
}
private readonly getVotingInfo = (userAddress: number) => {
return fetchWithValidation(this.apiUrl, votingInfoResponseSchema, {
method: 'POST',
body: this.makeRPCPayload({
model: 'OrionVoting',
method: 'info',
params: [userAddress],
}),
});
}
}
export * as schemas from './schemas/index.js';