diff --git a/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/AppDemoController.kt b/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/AppDemoController.kt index d514d380b9..3c54b89936 100644 --- a/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/AppDemoController.kt +++ b/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/AppDemoController.kt @@ -122,12 +122,8 @@ class AppDemoController : ViewModel() { onConnectionComplete = onComplete } - fun subscribeToShowDialog(onShowDialog: () -> Unit) { - onOfferReceived = onShowDialog - } - - fun processOfferRequest() { - viewModelScope.launch { + suspend fun processOfferRequest() { + withContext(Dispatchers.IO) { holder?.prepareCredentialRequest(profile!!, "4xE68b6S5VRFrKMMG1U95M") Log.d("HOLDER", "processOfferRequest: ${holder?.getState()}") val message = holder?.getMsgCredentialRequest() diff --git a/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/HolderScreen.kt b/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/HolderScreen.kt index 4684fea475..fac63b01b2 100644 --- a/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/HolderScreen.kt +++ b/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/HolderScreen.kt @@ -26,11 +26,6 @@ fun HolderScreen( ) { val demoState by demoController.states.collectAsState() val scope = rememberCoroutineScope() - val context = LocalContext.current - - LaunchedEffect(Unit) { - demoController.awaitCredentialPolling() - } LaunchedEffect(Unit) { demoController.awaitCredentialPolling() @@ -39,7 +34,7 @@ fun HolderScreen( if (demoState.offerReceived) { AlertDialog( onDismissRequest = { }, - title = { Text("Accept this invitation?") }, + title = { Text("Accept this credential?") }, text = { Text(demoController.getHolder()?.getAttributes()!!) }, confirmButton = { TextButton(onClick = { diff --git a/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/utils/PrepareGenesisFile.kt b/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/utils/PrepareGenesisFile.kt index 62eb2c2613..b9f929d861 100644 --- a/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/utils/PrepareGenesisFile.kt +++ b/uniffi_aries_vcx/demo/app/src/main/java/org/hyperledger/ariesvcx/utils/PrepareGenesisFile.kt @@ -10,7 +10,7 @@ import java.io.FileWriter fun prepareGenesisFile(context: Context): File { val file = File(context.filesDir, "genesis") if (!file.exists()) { - val transactions = context.resources.openRawResource(R.raw.transactions).bufferedReader() + val transactions = context.resources.openRawResource(R.raw.bcovrin_transactions).bufferedReader() .use { it.readText() } val bufferedWriter = BufferedWriter(FileWriter(file)) bufferedWriter.write(transactions) diff --git a/uniffi_aries_vcx/demo/app/src/main/res/raw/transactions b/uniffi_aries_vcx/demo/app/src/main/res/raw/bcovrin_transactions similarity index 100% rename from uniffi_aries_vcx/demo/app/src/main/res/raw/transactions rename to uniffi_aries_vcx/demo/app/src/main/res/raw/bcovrin_transactions