11package com .tsauthentication ;
2+
23import androidx .annotation .NonNull ;
34import com .facebook .react .bridge .Promise ;
45import com .facebook .react .bridge .ReactApplicationContext ;
@@ -40,7 +41,6 @@ public String getName() {
4041 if (reactContext .getCurrentActivity () != null ) {
4142 TSAuthentication .initialize (
4243 reactContext ,
43- baseUrl ,
4444 clientId
4545 );
4646 promise .resolve (true );
@@ -76,12 +76,12 @@ private void continueRegistration(String username, String displayName, Promise p
7676 @ Override
7777 public void success (RegistrationResult registrationResult ) {
7878 WritableMap map = new WritableNativeMap ();
79- map .putString (registrationResult .result (), NAME );
79+ map .putString ("result" , registrationResult .result ());
8080 promise .resolve (map );
8181 }
8282 @ Override
8383 public void error (TSWebAuthnRegistrationError tsWebAuthnRegistrationError ) {
84- promise .reject (NAME , tsWebAuthnRegistrationError .toString ());
84+ promise .reject ("result" , tsWebAuthnRegistrationError .getEM ());
8585 }
8686 }
8787 );
@@ -99,12 +99,12 @@ public void error(TSWebAuthnRegistrationError tsWebAuthnRegistrationError) {
9999 @ Override
100100 public void success (AuthenticationResult authenticationResult ) {
101101 WritableMap map = new WritableNativeMap ();
102- map .putString (authenticationResult .result (), NAME );
102+ map .putString ("result" , authenticationResult .result ());
103103 promise .resolve (map );
104104 }
105105 @ Override
106106 public void error (TSWebAuthnAuthenticationError tsWebAuthnAuthenticationError ) {
107- promise .reject (NAME , tsWebAuthnAuthenticationError .toString ());
107+ promise .reject ("result" , tsWebAuthnAuthenticationError .toString ());
108108 }
109109 });
110110 }
@@ -121,13 +121,13 @@ public void error(TSWebAuthnAuthenticationError tsWebAuthnAuthenticationError) {
121121 @ Override
122122 public void success (AuthenticationResult authenticationResult ) {
123123 WritableMap map = new WritableNativeMap ();
124- map .putString (authenticationResult .result (), NAME );
124+ map .putString ("result" , authenticationResult .result ());
125125 promise .resolve (map );
126126 }
127127
128128 @ Override
129129 public void error (TSWebAuthnAuthenticationError tsWebAuthnAuthenticationError ) {
130- promise .reject (NAME , tsWebAuthnAuthenticationError .toString ());
130+ promise .reject ("result" , tsWebAuthnAuthenticationError .toString ());
131131 }
132132 }
133133 );
@@ -150,7 +150,7 @@ public void success(DeviceInfo deviceInfo) {
150150
151151 @ Override
152152 public void error (TSDeviceInfoError tsDeviceInfoError ) {
153- promise .reject (NAME , tsDeviceInfoError .toString ());
153+ promise .reject ("result" , tsDeviceInfoError .toString ());
154154 }
155155 }
156156 );
0 commit comments