@hashgraphonline/standards-sdk 0.0.20 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -33454,7 +33454,10 @@ class BrowserHCSClient extends HCS10BaseClient {
33454
33454
  async createTopic(memo, adminKey, submitKey) {
33455
33455
  this.logger.info("Creating topic");
33456
33456
  const { accountId, signer } = this.getAccountAndSigner();
33457
- const transaction = new TopicCreateTransaction().setTopicMemo(memo);
33457
+ let transaction = new TopicCreateTransaction().setTopicMemo(memo);
33458
+ if (adminKey) {
33459
+ transaction = transaction.setAutoRenewAccountId(accountId);
33460
+ }
33458
33461
  const publicKey = await this.mirrorNode.getPublicKey(accountId);
33459
33462
  if (adminKey && publicKey) {
33460
33463
  transaction.setAdminKey(publicKey);
@@ -33463,10 +33466,7 @@ class BrowserHCSClient extends HCS10BaseClient {
33463
33466
  if (submitKey && publicKey) {
33464
33467
  transaction.setSubmitKey(publicKey);
33465
33468
  }
33466
- const transactionResponse = await this.hwc.executeTransactionWithErrorHandling(
33467
- transaction,
33468
- false
33469
- );
33469
+ const transactionResponse = await this.hwc.executeTransactionWithErrorHandling(transaction, false);
33470
33470
  const error = transactionResponse.error;
33471
33471
  if (error) {
33472
33472
  this.logger.error(error);