Created
September 18, 2018 21:06
-
-
Save leongaban/626b2433aab8c3d94183603a8e472dd3 to your computer and use it in GitHub Desktop.
PoolAPI class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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