Skip to content

Instantly share code, notes, and snippets.

@leongaban
Created September 18, 2018 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leongaban/626b2433aab8c3d94183603a8e472dd3 to your computer and use it in GitHub Desktop.
Save leongaban/626b2433aab8c3d94183603a8e472dd3 to your computer and use it in GitHub Desktop.
PoolAPI class
import { bind } from 'decko';
import BaseApi from './Base';
import * as NS from './types';
class LiquidityPoolApi extends BaseApi {
@bind
public async getUsersTotalPayout(userId: string): Promise<number> {
const params: NS.IGetUsersTotalPayoutRequest = { userId };
const response = await this.actions.get<{ payout: number }>(
'/frontoffice/api/liquidity-pool/get-total-payout',
params,
);
return response.data.payout;
}
}
export default LiquidityPoolApi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment