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

Commit 3ec7540

Browse files
author
Victor Wiebe
committed
fix: 🐛 build broken from starttime change in sto wrapper
1 parent 9426f28 commit 3ec7540

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/contract_wrappers/modules/sto/capped_sto_wrapper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,8 +205,8 @@ export default class CappedSTOWrapper extends STOWrapper {
205205
'Beneficiary address does not match msg.sender',
206206
);
207207
}
208-
assert.isPastDate(bigNumberToDate(await this.startTime()), 'Offering is not yet started');
209-
assert.isFutureDate(bigNumberToDate(await this.endTime()), 'Offering is closed');
208+
assert.isPastDate(await this.startTime(), 'Offering is not yet started');
209+
assert.isFutureDate(await this.endTime(), 'Offering is closed');
210210
const txPayableData = {
211211
...params.txData,
212212
value: valueToWei(params.value, FULL_DECIMALS),
@@ -230,8 +230,8 @@ export default class CappedSTOWrapper extends STOWrapper {
230230
polyTokenBalance.isGreaterThanOrEqualTo(valueToWei(params.investedPOLY, FULL_DECIMALS)),
231231
'Budget less than amount unable to transfer fee',
232232
);
233-
assert.isPastDate(bigNumberToDate(await this.startTime()), 'Offering is not yet started');
234-
assert.isFutureDate(bigNumberToDate(await this.endTime()), 'Offering is closed');
233+
assert.isPastDate(await this.startTime(), 'Offering is not yet started');
234+
assert.isFutureDate(await this.endTime(), 'Offering is closed');
235235
return (await this.contract).buyTokensWithPoly.sendTransactionAsync(
236236
valueToWei(params.investedPOLY, FULL_DECIMALS),
237237
params.txData,

src/contract_wrappers/modules/sto/usd_tiered_sto_wrapper.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -785,7 +785,7 @@ export default class USDTieredSTOWrapper extends STOWrapper {
785785
*/
786786
public modifyTimes = async (params: ModifyTimesParams) => {
787787
assert.assert(await this.isCallerTheSecurityTokenOwner(params.txData), 'The caller must be the ST owner');
788-
assert.isFutureDate(bigNumberToDate(await this.startTime()), 'STO already started');
788+
assert.isFutureDate(await this.startTime(), 'STO already started');
789789
assert.assert(params.endTime > params.startTime, 'Start date must be greater than end time');
790790
assert.isFutureDate(params.startTime, 'Start date must be in the future');
791791
return (await this.contract).modifyTimes.sendTransactionAsync(
@@ -818,7 +818,7 @@ export default class USDTieredSTOWrapper extends STOWrapper {
818818
*/
819819
public modifyLimits = async (params: ModifyLimitsParams) => {
820820
assert.assert(await this.isCallerTheSecurityTokenOwner(params.txData), 'The caller must be the ST owner');
821-
assert.isFutureDate(bigNumberToDate(await this.startTime()), 'STO already started');
821+
assert.isFutureDate(await this.startTime(), 'STO already started');
822822
return (await this.contract).modifyLimits.sendTransactionAsync(
823823
valueToWei(params.nonAccreditedLimitUSD, FULL_DECIMALS),
824824
valueToWei(params.minimumInvestmentUSD, FULL_DECIMALS),
@@ -832,7 +832,7 @@ export default class USDTieredSTOWrapper extends STOWrapper {
832832
*/
833833
public modifyFunding = async (params: ModifyFundingParams) => {
834834
assert.assert(await this.isCallerTheSecurityTokenOwner(params.txData), 'The caller must be the ST owner');
835-
assert.isFutureDate(bigNumberToDate(await this.startTime()), 'STO already started');
835+
assert.isFutureDate(await this.startTime(), 'STO already started');
836836
return (await this.contract).modifyFunding.sendTransactionAsync(
837837
params.fundRaiseTypes,
838838
params.txData,
@@ -862,7 +862,7 @@ export default class USDTieredSTOWrapper extends STOWrapper {
862862
*/
863863
public modifyTiers = async (params: ModifyTiersParams) => {
864864
assert.assert(await this.isCallerTheSecurityTokenOwner(params.txData), 'The caller must be the ST owner');
865-
assert.isFutureDate(bigNumberToDate(await this.startTime()), 'STO already started');
865+
assert.isFutureDate(await this.startTime(), 'STO already started');
866866
assert.assert(params.tokensPerTierTotal.length > 0, 'No tiers provided');
867867
assert.assert(
868868
params.ratePerTier.length === params.tokensPerTierTotal.length &&

0 commit comments

Comments
 (0)