With the new PR, we encounter a new occasional error, it appears often only once or twice and then not again during the session.
The _descriptor[descriptor] is not defined. Possibly a racing condition caused by wrapping every method in a Thread
|
fun walletInit( |
|
descriptor: String, |
|
changeDescriptor: String? = null, |
|
network: String, |
|
dbConfigID: String, |
|
result: Promise |
|
) { |
|
Thread { |
|
try { |
|
val id = randomId() |
|
_wallets[id] = Wallet( |
|
_descriptors[descriptor]!!, |
|
if (changeDescriptor != null) _descriptors[changeDescriptor]!! else null, |
|
setNetwork(network), |
|
_databaseConfigs[dbConfigID]!! |
|
) |
|
result.resolve(id) |
|
} catch (error: Throwable) { |
|
result.reject("Init wallet error", error.localizedMessage, error) |
|
} |
|
}.start() |
|
} |
With the new PR, we encounter a new occasional error, it appears often only once or twice and then not again during the session.
The _descriptor[descriptor] is not defined. Possibly a racing condition caused by wrapping every method in a Thread
bdk-rn/android/src/main/java/io/ltbl/bdkrn/BdkRnModule.kt
Lines 407 to 428 in 933cee7