Skip to content

Commit

Permalink
Fixes #23
Browse files Browse the repository at this point in the history
  • Loading branch information
Simsteve7 committed Jul 24, 2018
1 parent f1cc3e7 commit fd06625
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/classes/platforms/PlatformRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ export default abstract class PlatformRequest implements PlatformRequestInterfac
*/
public async getYourFundingMap(): Promise<Map<string, number>> {
if (!this.fundingMap) {
this.fundingMap = await RequestUtils.getRequestFundingDetailsForFunder(this.getPlatformName(), this.getPlatformId(), await Settings.getEthAddress());
let address = await Settings.getEthAddress();
this.fundingMap = address ? await RequestUtils.getRequestFundingDetailsForFunder(this.getPlatformName(), this.getPlatformId(), address) : new Map();
}
return this.fundingMap;
}
Expand All @@ -126,7 +127,7 @@ export default abstract class PlatformRequest implements PlatformRequestInterfac
* @returns {Promise<Map<string, number>>}
*/
public async existsInFundRepository(): Promise<boolean> {
return (await this.getYourFundingMap()).size > 0;
return (await this.getTotalFunders() > 0);
}

/**
Expand Down

0 comments on commit fd06625

Please sign in to comment.