From 1a49f65184aff675a74be01a67356a30393c19a6 Mon Sep 17 00:00:00 2001 From: Dmitry Fesenko Date: Thu, 30 Sep 2021 12:00:53 +0300 Subject: [PATCH] fix: revert change initialization order --- src/iam.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/iam.ts b/src/iam.ts index 3c211270..18b1ce6a 100644 --- a/src/iam.ts +++ b/src/iam.ts @@ -202,12 +202,12 @@ export class IAM extends IAMBase { initializeMetamask: reinitializeMetamask, walletProvider, }); - if (createDocument) { - await this.connectToDIDRegistry(); - } if (initCacheServer) { await this.connectToCacheServer(); } + if (createDocument) { + await this.connectToDIDRegistry(); + } } catch (err) { if ((err as Error).message === "User closed modal") { return {