Skip to content

Commit 4c724ec

Browse files
author
Victor Wiebe
committed
fix: review comments, docs and await issue
1 parent 049ec6e commit 4c724ec

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/entities/SecurityToken/SecurityToken.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
*/

src/procedures/TransferOwnership.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff 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`,

0 commit comments

Comments
 (0)