File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed
Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -195,8 +195,7 @@ export class SecurityToken extends Entity<Params> {
195195 }
196196
197197 /**
198- <<<<<<< HEAD
199- * Transfers ownership of the Security Token to a new owner
198+ * Transfers ownership of the Security Token to a different wallet address
200199 *
201200 * @param args.newOwner - new owner address for the Security Token
202201 */
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ export class TransferOwnership extends Procedure<TransferOwnershipProcedureArgs>
2727 public type = ProcedureType . TransferOwnership ;
2828
2929 /**
30- * - Transfer ownership of a Security Token to another wallet
30+ * Transfer ownership of a Security Token to another wallet
3131 *
3232 * Note this procedure will fail if:
3333 * - Trying to call the procedure from a wallet that is not the current owner of the Security Token
@@ -50,9 +50,12 @@ export class TransferOwnership extends Procedure<TransferOwnershipProcedureArgs>
5050 } ) ;
5151 }
5252
53- const owner = await securityToken . owner ( ) ;
53+ const [ owner , currentWalletAddress ] = await Promise . all ( [
54+ securityToken . owner ( ) ,
55+ currentWallet . address ( ) ,
56+ ] ) ;
5457
55- if ( ( await currentWallet . address ( ) ) !== owner ) {
58+ if ( currentWalletAddress !== owner ) {
5659 throw new PolymathError ( {
5760 code : ErrorCode . ProcedureValidationError ,
5861 message : `You must be the owner of this Security Token to transfer ownership` ,
You can’t perform that action at this time.
0 commit comments