diff --git a/app/AndroidManifest.xml b/app/AndroidManifest.xml index 78b7544..cd3ba49 100644 --- a/app/AndroidManifest.xml +++ b/app/AndroidManifest.xml @@ -48,4 +48,5 @@ + \ No newline at end of file diff --git a/app/build.gradle b/app/build.gradle index 818fbcd..6029298 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -108,5 +108,6 @@ dependencies { implementation project(':libcocos2dx') implementation "androidx.appcompat:appcompat:1.0.2" + implementation "androidx.biometric:biometric:1.1.0" implementation files('../libs/unity-classes.jar') } \ No newline at end of file diff --git a/js/main.js b/js/main.js index 705b433..d1852da 100644 --- a/js/main.js +++ b/js/main.js @@ -200,3 +200,13 @@ function sendErc20(funId, address, to, amount) { }) } +function restoreFromMnemonic(mnemonic, password) { + try { + diameter = parseFloat(diameter); + let result = jc.wallet.restoreFromMnemonic(mnemonic, password); + return JSON.stringify({errcode: 0, data: result}); + } catch(err) { + return JSON.stringify({errcode: 1, errmsg: err}); + } +} +