Skip to content

Commit 312b9d3

Browse files
committed
fix: replace 'STO' with 'Sto'
1 parent 1d68602 commit 312b9d3

File tree

6 files changed

+20
-17
lines changed

6 files changed

+20
-17
lines changed

src/LowLevel/SecurityToken.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
GetCheckpointArgs,
1515
TokenForceTransferArgs,
1616
StoModuleTypes,
17-
GetSTOModuleArgs,
17+
GetStoModuleArgs,
1818
} from './types';
1919
import { Context } from './LowLevel';
2020
import { fromUnixTimestamp, fromWei, getOptions, toWei } from './utils';
@@ -242,7 +242,7 @@ export class SecurityToken extends Contract<SecurityTokenContract> {
242242
*
243243
* @TODO remon-nashid: shouldn't module address be enough to fetch a module?
244244
*/
245-
public getSTOModule = async ({ address, stoType }: GetSTOModuleArgs): Promise<Sto | null> => {
245+
public getStoModule = async ({ address, stoType }: GetStoModuleArgs): Promise<Sto | null> => {
246246
const { context } = this;
247247
const { methods } = this.contract;
248248

src/LowLevel/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ export interface TokenForceTransferArgs {
293293
log?: string;
294294
}
295295

296-
export interface GetSTOModuleArgs {
296+
export interface GetStoModuleArgs {
297297
address: string;
298298
stoType: StoModuleTypes;
299299
}

src/Polymath.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import {
4343
SetDividendsWallet,
4444
ChangeDelegatePermission,
4545
EnableGeneralPermissionManager,
46-
CancelSTO,
46+
CancelSto,
4747
} from './procedures';
4848
import { Entity } from './entities/Entity';
4949
import { DividendsModule } from './entities/DividendsModule';
@@ -434,7 +434,7 @@ export class Polymath {
434434
return await procedure.prepare();
435435
};
436436

437-
public cancelSTO = async (args: {
437+
public cancelSto = async (args: {
438438
moduleUid:
439439
| {
440440
securityTokenId: string;
@@ -445,7 +445,10 @@ export class Polymath {
445445
value: BigNumber;
446446
custodianAddress: string;
447447
}) => {
448-
let securityTokenId: string; let stoType: StoModuleTypes; let address: string; let symbol: string;
448+
let securityTokenId: string;
449+
let stoType: StoModuleTypes;
450+
let address: string;
451+
let symbol: string;
449452
if (typeof args.moduleUid === 'string') {
450453
({ securityTokenId, stoType, address } = this.StoModule.unserialize(args.moduleUid));
451454
} else {
@@ -455,7 +458,7 @@ export class Polymath {
455458
({ symbol } = this.SecurityToken.unserialize(securityTokenId));
456459
const { custodianAddress, value } = args;
457460

458-
const procedure = new CancelSTO(
461+
const procedure = new CancelSto(
459462
{ symbol, stoType, stoModuleAddress: address, custodianAddress, value },
460463
this.context
461464
);

src/procedures/CancelSTO.ts renamed to src/procedures/CancelSto.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import { Procedure } from './Procedure';
2-
import { ProcedureTypes, PolyTransactionTags, CancelSTOArgs, ErrorCodes } from '../types';
2+
import { ProcedureTypes, PolyTransactionTags, CancelStoArgs, ErrorCodes } from '../types';
33
import { PolymathError } from '../PolymathError';
44
import { isValidAddress } from '../utils';
55

6-
export class CancelSTO extends Procedure<CancelSTOArgs> {
7-
public type = ProcedureTypes.CancelSTO;
6+
export class CancelSto extends Procedure<CancelStoArgs> {
7+
public type = ProcedureTypes.CancelSto;
88

99
public async prepareTransactions() {
1010
const { symbol, stoType, stoModuleAddress, custodianAddress, value } = this.args;
@@ -47,7 +47,7 @@ export class CancelSTO extends Procedure<CancelSTOArgs> {
4747
});
4848
}
4949

50-
const stoModule = await securityToken.getSTOModule({ address: stoModuleAddress, stoType });
50+
const stoModule = await securityToken.getStoModule({ address: stoModuleAddress, stoType });
5151
if (!stoModule) {
5252
throw new PolymathError({
5353
code: ErrorCodes.ProcedureValidationError,
@@ -63,11 +63,11 @@ export class CancelSTO extends Procedure<CancelSTOArgs> {
6363
const logMessage = 'cancelling the STO';
6464

6565
await this.addTransaction(stoModule.pause, {
66-
tag: PolyTransactionTags.CancelSTO,
66+
tag: PolyTransactionTags.CancelSto,
6767
})();
6868

6969
await this.addTransaction(securityToken.forceTransfer, {
70-
tag: PolyTransactionTags.CancelSTO,
70+
tag: PolyTransactionTags.CancelSto,
7171
})({ from: custodianAddress, to: tokenOwner, value, data: '', log: logMessage });
7272
}
7373
}

src/procedures/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ export { PushDividendPayment } from './PushDividendPayment';
1212
export { SetDividendsWallet } from './SetDividendsWallet';
1313
export { ChangeDelegatePermission } from './ChangeDelegatePermission';
1414
export { EnableGeneralPermissionManager } from './EnableGeneralPermissionManager';
15-
export { CancelSTO } from './CancelSTO';
15+
export { CancelSto } from './CancelSto';

src/types/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export enum ProcedureTypes {
116116
SetDividendsWallet = 'SetDividendsWallet',
117117
PushDividendPayment = 'PushDividendPayment',
118118
ChangeDelegatePermission = 'ChangeDelegatePermission',
119-
CancelSTO = 'CancelSTO',
119+
CancelSto = 'CancelSto',
120120
}
121121

122122
export enum PolyTransactionTags {
@@ -137,7 +137,7 @@ export enum PolyTransactionTags {
137137
PushDividendPayment = 'PushDividendPayment',
138138
SetDividendsWallet = 'SetDividendsWallet',
139139
ChangeDelegatePermission = 'ChangeDelegatePermission',
140-
CancelSTO = 'CancelSTO',
140+
CancelSto = 'CancelSto',
141141
}
142142

143143
export type MaybeResolver<T> = PostTransactionResolver<T> | T;
@@ -261,7 +261,7 @@ export interface ChangeDelegatePermissionArgs {
261261
details?: string;
262262
}
263263

264-
export interface CancelSTOArgs {
264+
export interface CancelStoArgs {
265265
symbol: string;
266266
stoType: StoModuleTypes;
267267
stoModuleAddress: string;

0 commit comments

Comments
 (0)