@@ -96,7 +96,7 @@ private suspend fun createPin(client: HttpClient, userAesKey: String) {
9696 val response = client.userService.createPin(
9797 PinRequest (requireNotNull(encryptPin(userAesKey, DEFAULT_PIN )))
9898 )
99- if (response.isSuccess) {
99+ if (response.isSuccess() ) {
100100 println (" Create pin success ${response.data?.userId} " )
101101 } else {
102102 println (" Create pin fail" )
@@ -117,7 +117,7 @@ private suspend fun transferToUser(
117117 encryptPin(aseKey, pin, System .nanoTime())
118118 )
119119 )
120- if (response.isSuccess) {
120+ if (response.isSuccess() ) {
121121 println (" Transfer success: ${response.data?.snapshotId} " )
122122 } else {
123123 println (" Transfer fail ${response.error} " )
@@ -127,7 +127,7 @@ private suspend fun transferToUser(
127127private suspend fun getAsset (client : HttpClient ) {
128128 // Get asset
129129 val assetResponse = client.assetService.getAsset(CNB_ID )
130- if (assetResponse.isSuccess) {
130+ if (assetResponse.isSuccess() ) {
131131 println (" Assets ${assetResponse.data?.symbol} : ${assetResponse.data?.balance} " )
132132 } else {
133133 println (" Assets fail" )
@@ -152,7 +152,7 @@ private suspend fun createAddress(client: HttpClient, userAesKey: String): Strin
152152 )
153153 )
154154
155- if (addressesResponse.isSuccess) {
155+ if (addressesResponse.isSuccess() ) {
156156 println (" Create address ${addressesResponse.data?.addressId} " )
157157 } else {
158158 println (" Assets fail" )
@@ -177,7 +177,7 @@ private suspend fun withdrawalToAddress(
177177 ), UUID .randomUUID().toString(), " withdrawal test"
178178 )
179179 )
180- if (withdrawalsResponse.isSuccess) {
180+ if (withdrawalsResponse.isSuccess() ) {
181181 println (" Withdrawal success: ${withdrawalsResponse.data?.snapshotId} " )
182182 } else {
183183 println (" Withdrawal fail" )
0 commit comments