Skip to content

Commit a531eaa

Browse files
committed
Added a flag indicating the completion of initialization.(#18)
1 parent d445f4c commit a531eaa

File tree

8 files changed

+27
-7
lines changed

8 files changed

+27
-7
lines changed

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Add the following code to the `build.gradle.kts` file in the `app` module:
1818
dependencies {
1919
// The extension package must be used with the main framework "dora"
2020
implementation("com.github.dora4:dora:1.3.43")
21-
implementation("com.github.dora4:dora-walletconnect-support:2.1.32")
21+
implementation("com.github.dora4:dora-walletconnect-support:2.1.33")
2222
}
2323
```
2424

docs/es/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Añade el siguiente código en el archivo `build.gradle.kts` del módulo `app`:
1818
dependencies {
1919
// El paquete de extensión debe usarse con el framework principal "dora"
2020
implementation("com.github.dora4:dora:1.3.43")
21-
implementation("com.github.dora4:dora-walletconnect-support:2.1.32")
21+
implementation("com.github.dora4:dora-walletconnect-support:2.1.33")
2222
}
2323
```
2424

docs/fr/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Ajoutez le code suivant dans le fichier `build.gradle.kts` du module `app` :
1818
dependencies {
1919
// Le package d'extension doit être utilisé avec le framework principal "dora"
2020
implementation("com.github.dora4:dora:1.3.43")
21-
implementation("com.github.dora4:dora-walletconnect-support:2.1.32")
21+
implementation("com.github.dora4:dora-walletconnect-support:2.1.33")
2222
}
2323
```
2424

docs/ko/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencyResolutionManagement {
1818
dependencies {
1919
// 확장 패키지는 메인 프레임워크 "dora"와 함께 사용해야 합니다.
2020
implementation("com.github.dora4:dora:1.3.43")
21-
implementation("com.github.dora4:dora-walletconnect-support:2.1.32")
21+
implementation("com.github.dora4:dora-walletconnect-support:2.1.33")
2222
}
2323
```
2424

docs/zh-cn/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencyResolutionManagement {
1818
dependencies {
1919
// 扩展包必须在有主框架dora的情况下使用
2020
implementation("com.github.dora4:dora:1.3.43")
21-
implementation("com.github.dora4:dora-walletconnect-support:2.1.32")
21+
implementation("com.github.dora4:dora-walletconnect-support:2.1.33")
2222
}
2323
```
2424

docs/zh-tw/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ dependencyResolutionManagement {
1818
dependencies {
1919
// 擴展包必須與主框架 "dora" 一起使用
2020
implementation("com.github.dora4:dora:1.3.43")
21-
implementation("com.github.dora4:dora-walletconnect-support:2.1.32")
21+
implementation("com.github.dora4:dora-walletconnect-support:2.1.33")
2222
}
2323
```
2424

lib/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ afterEvaluate {
7575
from(components["release"])
7676
groupId = "com.github.dora4"
7777
artifactId = "dora-walletconnect-support"
78-
version = "2.1.32"
78+
version = "2.1.33"
7979
}
8080
}
8181
}

lib/src/main/java/dora/pay/DoraFund.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,25 @@ object DoraFund {
161161
*/
162162
private val connectWalletLaunchers = mutableMapOf<Int, ActivityResultLauncher<Unit>>()
163163

164+
/**
165+
* Indicates whether the SDK has completed the initialization process.
166+
* This flag is set to true once `init()` finishes successfully.
167+
* @since 2.1
168+
*/
169+
@Volatile
170+
private var initialized = false
171+
172+
/**
173+
* Returns whether the DoraFund SDK has completed initialization.
174+
* This should be checked when using lazy initialization scenarios.
175+
*
176+
* @return true if the SDK has been fully initialized, false otherwise.
177+
* @since 2.1
178+
*/
179+
fun isInitialized() : Boolean {
180+
return initialized
181+
}
182+
164183
/**
165184
* Initialize DoraFund with application metadata.
166185
* @see EVMChains
@@ -187,6 +206,7 @@ object DoraFund {
187206
this.themeColor = themeColor
188207
}
189208
listener?.let { setPayListener(it) }
209+
initialized = true
190210
}
191211

192212
/**

0 commit comments

Comments
 (0)