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

Commit 13e08c9

Browse files
author
Victor Wiebe
committed
fix: 🐛 small assertion additions for STR that were missing
1 parent c89039d commit 13e08c9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/contract_wrappers/registries/security_token_registry_wrapper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,7 @@ export default class SecurityTokenRegistryWrapper extends ContractWrapper {
682682
public generateNewSecurityToken = async (params: NewSecurityTokenParams) => {
683683
assert.assert(params.ticker.length > 0, 'Ticker is empty');
684684
assert.assert(params.name.length > 0, 'Name is empty');
685+
assert.isNonZeroETHAddressHex('treasuryWallet', params.treasuryWallet);
685686
await this.checkWhenNotPausedOrOwner();
686687
const tickerDetails = await this.getTickerDetails({
687688
tokenName: params.ticker,
@@ -985,6 +986,7 @@ export default class SecurityTokenRegistryWrapper extends ContractWrapper {
985986
assert.assert(params.ticker.length > 0, 'Ticker is empty');
986987
assert.assert(params.name.length > 0, 'Name is empty');
987988
assert.assert(params.ticker.length <= 10, 'Ticker length can not be greater than 10');
989+
assert.assert(params.deployedAt.getTime() > new Date(0).getTime(), 'Bad deployed date');
988990
assert.isNonZeroETHAddressHex('owner', params.owner);
989991
assert.isNonZeroETHAddressHex('securityToken', params.securityToken);
990992
assert.isNonZeroETHAddressHex(

0 commit comments

Comments
 (0)