Skip to content
This repository was archived by the owner on Jul 6, 2022. It is now read-only.

Commit e6c8883

Browse files
author
Victor Wiebe
committed
fix: 🐛 add return types for some functions
1 parent 042ae92 commit e6c8883

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/contract_wrappers/modules/checkpoint/dividend_checkpoint_wrapper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ export default abstract class DividendCheckpointWrapper extends ModuleWrapper {
272272
* check withholding tax for an investor
273273
* @return amount of withholding tax
274274
*/
275-
public withholdingTax = async (params: InvestorParams) => {
275+
public withholdingTax = async (params: InvestorParams): Promise<BigNumber> => {
276276
assert.isETHAddressHex('investor', params.investor);
277277
return (await this.contract).withholdingTax.callAsync(params.investor);
278278
};
@@ -595,7 +595,7 @@ export default abstract class DividendCheckpointWrapper extends ModuleWrapper {
595595
* @return investor balances
596596
* @return investor withheld percentages
597597
*/
598-
public getCheckpointData = async (params: CheckpointIdParams) => {
598+
public getCheckpointData = async (params: CheckpointIdParams): Promise<CheckpointData[]> => {
599599
const currentCheckpointId = await (await this.securityTokenContract()).currentCheckpointId.callAsync();
600600
assert.assert(params.checkpointId <= new BigNumber(currentCheckpointId).toNumber(), 'Invalid checkpoint');
601601
const result = await (await this.contract).getCheckpointData.callAsync(numberToBigNumber(params.checkpointId));
@@ -622,7 +622,7 @@ export default abstract class DividendCheckpointWrapper extends ModuleWrapper {
622622
* Checks whether an address has claimed a dividend
623623
* @return bool whether the address has claimed
624624
*/
625-
public isClaimed = async (params: InvestorStatus) => {
625+
public isClaimed = async (params: InvestorStatus): Promise<boolean> => {
626626
assert.isETHAddressHex('investor', params.investor);
627627
assert.assert(await this.isValidDividendIndex(params.dividendIndex), 'Invalid dividend index');
628628
return (await this.contract).isClaimed.callAsync(params.investor, numberToBigNumber(params.dividendIndex));
@@ -632,7 +632,7 @@ export default abstract class DividendCheckpointWrapper extends ModuleWrapper {
632632
* Checks whether an address is excluded from claiming a dividend
633633
* @return bool whether the address is excluded
634634
*/
635-
public isExcluded = async (params: InvestorStatus) => {
635+
public isExcluded = async (params: InvestorStatus): Promise<boolean> => {
636636
assert.isETHAddressHex('investor', params.investor);
637637
assert.assert(await this.isValidDividendIndex(params.dividendIndex), 'Invalid dividend index');
638638
return (await this.contract).isExcluded.callAsync(params.investor, numberToBigNumber(params.dividendIndex));

0 commit comments

Comments
 (0)