Skip to content

Instantly share code, notes, and snippets.

@leongaban leongaban/poolApi.ts
Created Sep 18, 2018

Embed
What would you like to do?
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
You can’t perform that action at this time.