Skip to content

Commit 2cdc465

Browse files
author
Victor Wiebe
committed
fix: the controller and basic procedure to use addSignatureRequest
1 parent fcd1707 commit 2cdc465

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

src/entities/SecurityToken/Controller.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,9 @@ export class Controller extends SubModule {
2323
* Used by the issuer to permanently disable controller functionality
2424
* Signature is optional, and will be generated if it is not passed in
2525
*/
26-
public disableController = async (args: { signature?: string }) => {
27-
const { signature } = args;
26+
public disableController = async (args?: { signature?: string }) => {
2827
const { symbol } = this.securityToken;
29-
const procedure = new DisableController(
30-
signature ? { symbol, signature } : { symbol },
31-
this.context
32-
);
28+
const procedure = new DisableController({ ...args, symbol }, this.context);
3329
return procedure.prepare();
3430
};
3531

src/procedures/Procedure.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export abstract class Procedure<Args, ReturnType = void> {
179179
const transaction = {
180180
method: request,
181181
args,
182-
postTransactionResolver,
182+
postTransactionResolvers: [postTransactionResolver],
183183
tag: PolyTransactionTag.Signature,
184184
};
185185

src/types/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,7 @@ export enum PolyTransactionTag {
228228
Signature = 'Signature',
229229
}
230230

231-
export type MaybeResolver<T> = PostTransactionResolver<T> | T;
232-
231+
export type MaybeResolver<T> = PostTransactionResolver<T, any> | T;
233232
export type MapMaybeResolver<T> = { [K in keyof T]: MaybeResolver<T[K]> };
234233

235234
// TODO @monitz87: remake this interface when contract-wrappers exports the tx arguments

0 commit comments

Comments
 (0)