Skip to content

Commit 1ae7c68

Browse files
committed
refactor(ardrive): re-add public assertion ardrive method PE-6155
1 parent 6a2abb5 commit 1ae7c68

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/ardrive.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,6 +1253,12 @@ export class ArDrive extends ArDriveAnonymous {
12531253
return createDriveResult;
12541254
}
12551255

1256+
async assertOwnerAddress(owner: ArweaveAddress): Promise<void> {
1257+
if (!owner.equals(await this.wallet.getAddress())) {
1258+
throw new Error('Supplied wallet is not the owner of this drive!');
1259+
}
1260+
}
1261+
12561262
public async getPrivateDrive({
12571263
driveId,
12581264
driveKey,

0 commit comments

Comments
 (0)