diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/service/NearKitWalletService.java b/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/service/NearKitWalletService.java deleted file mode 100644 index 4745c311..00000000 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/service/NearKitWalletService.java +++ /dev/null @@ -1,53 +0,0 @@ -package com.syntifi.near.api.helper.service; - -import com.syntifi.near.api.common.service.NearObjectMapper; -import com.syntifi.near.api.helper.model.RecentActivity; -import okhttp3.Headers; -import okhttp3.OkHttpClient; -import retrofit2.Call; -import retrofit2.Retrofit; -import retrofit2.converter.jackson.JacksonConverterFactory; -import retrofit2.http.GET; -import retrofit2.http.Path; - -/** - * Near KitWallet Helper service uses the http helper API to retrieve useful data - * - * @author Alexandre Carvalho - * @author Andre Bertolace - * @since 0.2.0 - */ -public interface NearKitWalletService { - - /** - * NearHelperService builder - * - * @param url the helper url to connect to - * @return the helper service instance - */ - static NearKitWalletService usingPeer(String url) { - Headers customHeaders = new Headers.Builder() - .add("Content-Type", "application/json") - .add("Cache-Control", "no-cache") - .build(); - - Retrofit retrofit = new Retrofit.Builder() - .client(new OkHttpClient.Builder() - .addInterceptor( - chain -> chain.proceed(chain.request().newBuilder().headers(customHeaders).build())).build()) - .baseUrl("https://" + url) - .addConverterFactory(JacksonConverterFactory.create(NearObjectMapper.INSTANCE)) - .build(); - - return retrofit.create(NearKitWalletService.class); - } - - /** - * Fetches a list of recent activities for one account - * - * @param accountId the account to fetch activity - * @return list of recent activity for the account - */ - @GET("account/{accountId}/activity") - Call getNearRecentActivity(@Path("accountId") String accountId); -} diff --git a/near-java-api-helper/src/test/java/com/syntifi/near/api/helper/service/NearKitWalletServiceHelper.java b/near-java-api-helper/src/test/java/com/syntifi/near/api/helper/service/NearKitWalletServiceHelper.java deleted file mode 100644 index 3acd982e..00000000 --- a/near-java-api-helper/src/test/java/com/syntifi/near/api/helper/service/NearKitWalletServiceHelper.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.syntifi.near.api.helper.service; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class NearKitWalletServiceHelper { - - private static final Logger LOGGER = LoggerFactory.getLogger(NearKitWalletServiceHelper.class); - - public static NearKitWalletService nearKitWalletService; - - static { - String peerAddress = "testnet-api.kitwallet.app"; - - LOGGER.debug("======== Running tests with helper {} ========", peerAddress); - nearKitWalletService = NearKitWalletService.usingPeer(peerAddress); - } -} diff --git a/near-java-api-helper/src/test/java/com/syntifi/near/api/helper/service/NearKitWalletServiceTest.java b/near-java-api-helper/src/test/java/com/syntifi/near/api/helper/service/NearKitWalletServiceTest.java deleted file mode 100644 index 552d67bd..00000000 --- a/near-java-api-helper/src/test/java/com/syntifi/near/api/helper/service/NearKitWalletServiceTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.syntifi.near.api.helper.service; - -import com.syntifi.near.api.helper.model.RecentActivity; -import org.junit.jupiter.api.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import retrofit2.Response; - -import java.io.IOException; - -import static com.syntifi.near.api.helper.service.NearKitWalletServiceHelper.nearKitWalletService; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - -/** - * Basic Service call testing - * - * @author Alexandre Carvalho - * @author Andre Bertolace - * @since 0.0.1 - */ -public class NearKitWalletServiceTest { - - private static final Logger LOGGER = LoggerFactory.getLogger(NearKitWalletServiceTest.class); - - @Test - void getNearRecentActivity_valid() throws IOException { - Response value = nearKitWalletService.getNearRecentActivity("wallet-test.testnet").execute(); - - assertTrue(value.isSuccessful()); - - RecentActivity nearValue = value.body(); - - assertNotNull(nearValue); - - LOGGER.debug("Response {}", nearValue.size()); - - assertNotNull(nearValue); - } -} \ No newline at end of file diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/json/deserializer/RecentActivityItemDeserializer.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/json/deserializer/RecentActivityItemDeserializer.java similarity index 83% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/json/deserializer/RecentActivityItemDeserializer.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/json/deserializer/RecentActivityItemDeserializer.java index a7164ff7..282d4c79 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/json/deserializer/RecentActivityItemDeserializer.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/json/deserializer/RecentActivityItemDeserializer.java @@ -1,22 +1,22 @@ -package com.syntifi.near.api.helper.json.deserializer; +package com.syntifi.near.api.indexer.json.deserializer; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.JsonNode; import com.syntifi.near.api.common.model.key.PublicKey; -import com.syntifi.near.api.helper.model.RecentActivityAccessKey; -import com.syntifi.near.api.helper.model.RecentActivityArgAddKey; -import com.syntifi.near.api.helper.model.RecentActivityArgCreateAccount; -import com.syntifi.near.api.helper.model.RecentActivityArgDeleteAccount; -import com.syntifi.near.api.helper.model.RecentActivityArgDeleteKey; -import com.syntifi.near.api.helper.model.RecentActivityArgDeployContract; -import com.syntifi.near.api.helper.model.RecentActivityArgFunctionCall; -import com.syntifi.near.api.helper.model.RecentActivityArgStake; -import com.syntifi.near.api.helper.model.RecentActivityArgTransfer; -import com.syntifi.near.api.helper.model.RecentActivityItem; -import com.syntifi.near.api.helper.model.RecentActivityPermission; -import com.syntifi.near.api.helper.service.exception.NearHelperServiceException; +import com.syntifi.near.api.indexer.model.RecentActivityAccessKey; +import com.syntifi.near.api.indexer.model.RecentActivityArgAddKey; +import com.syntifi.near.api.indexer.model.RecentActivityArgCreateAccount; +import com.syntifi.near.api.indexer.model.RecentActivityArgDeleteAccount; +import com.syntifi.near.api.indexer.model.RecentActivityArgDeleteKey; +import com.syntifi.near.api.indexer.model.RecentActivityArgDeployContract; +import com.syntifi.near.api.indexer.model.RecentActivityArgFunctionCall; +import com.syntifi.near.api.indexer.model.RecentActivityArgStake; +import com.syntifi.near.api.indexer.model.RecentActivityArgTransfer; +import com.syntifi.near.api.indexer.model.RecentActivityItem; +import com.syntifi.near.api.indexer.model.RecentActivityPermission; +import com.syntifi.near.api.indexer.service.exception.NearIndexerServiceException; import java.io.IOException; import java.math.BigInteger; @@ -90,7 +90,7 @@ public RecentActivityItem deserialize(JsonParser p, DeserializationContext ctxt) .beneficiaryId(argsNode.get("beneficiary_id").asText()) .build()); } else { - throw new NearHelperServiceException( + throw new NearIndexerServiceException( String.format("Action %s not mapped for deserialization", recentActivityItem.getActionKind())); } diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivity.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivity.java similarity index 82% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivity.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivity.java index 9f0a2558..bd66c0c4 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivity.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivity.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import java.util.ArrayList; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityAccessKey.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityAccessKey.java similarity index 92% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityAccessKey.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityAccessKey.java index d83d84d7..b27fd003 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityAccessKey.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityAccessKey.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArg.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArg.java similarity index 76% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArg.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArg.java index 1624aefd..2f3083cf 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArg.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArg.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; /** * RecentActivityArg diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgAddKey.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgAddKey.java similarity index 92% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgAddKey.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgAddKey.java index 715558ea..090da55b 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgAddKey.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgAddKey.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgCreateAccount.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgCreateAccount.java similarity index 88% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgCreateAccount.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgCreateAccount.java index b91ae924..49b0c4f6 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgCreateAccount.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgCreateAccount.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import lombok.Builder; import lombok.Getter; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeleteAccount.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeleteAccount.java similarity index 90% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeleteAccount.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeleteAccount.java index 4b80c47c..2566f78c 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeleteAccount.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeleteAccount.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeleteKey.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeleteKey.java similarity index 91% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeleteKey.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeleteKey.java index 9521a2fa..84cfafdf 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeleteKey.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeleteKey.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.syntifi.near.api.common.model.key.PublicKey; import lombok.AllArgsConstructor; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeployContract.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeployContract.java similarity index 90% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeployContract.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeployContract.java index 9259f9b6..3b6b5c26 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgDeployContract.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgDeployContract.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import lombok.AllArgsConstructor; import lombok.Builder; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgFunctionCall.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgFunctionCall.java similarity index 94% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgFunctionCall.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgFunctionCall.java index 2e486a35..9e8df341 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgFunctionCall.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgFunctionCall.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgStake.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgStake.java similarity index 92% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgStake.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgStake.java index 7fe56b3d..7f9de46c 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgStake.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgStake.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.syntifi.near.api.common.model.key.PublicKey; import lombok.AllArgsConstructor; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgTransfer.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgTransfer.java similarity index 91% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgTransfer.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgTransfer.java index 0209e613..24124afe 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityArgTransfer.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityArgTransfer.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityItem.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityItem.java similarity index 90% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityItem.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityItem.java index f3136745..9e2c0875 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityItem.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityItem.java @@ -1,8 +1,8 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; -import com.syntifi.near.api.helper.json.deserializer.RecentActivityItemDeserializer; +import com.syntifi.near.api.indexer.json.deserializer.RecentActivityItemDeserializer; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Getter; diff --git a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityPermission.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityPermission.java similarity index 92% rename from near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityPermission.java rename to near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityPermission.java index 5c13dd5b..151d0aaf 100644 --- a/near-java-api-helper/src/main/java/com/syntifi/near/api/helper/model/RecentActivityPermission.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/model/RecentActivityPermission.java @@ -1,4 +1,4 @@ -package com.syntifi.near.api.helper.model; +package com.syntifi.near.api.indexer.model; import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; diff --git a/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/service/NearIndexerService.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/service/NearIndexerService.java index 5fbd1586..f9978b8d 100644 --- a/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/service/NearIndexerService.java +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/service/NearIndexerService.java @@ -2,6 +2,7 @@ import com.syntifi.near.api.common.service.NearObjectMapper; import com.syntifi.near.api.indexer.model.AccountIdList; +import com.syntifi.near.api.indexer.model.RecentActivity; import com.syntifi.near.api.indexer.model.StakingDeposit; import okhttp3.Headers; import okhttp3.OkHttpClient; @@ -49,6 +50,15 @@ public interface NearIndexerService { @GET("staking-deposits/{accountId}") Call> getStakingDeposits(@Path("accountId") String accountId); + /** + * Fetches a list of recent activities for one account + * + * @param accountId the account to fetch activity + * @return list of recent activity for the account + */ + @GET("account/{accountId}/activity") + Call getNearRecentActivity(@Path("accountId") String accountId); + /** * NearIndexerService builder * diff --git a/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/service/exception/NearIndexerServiceException.java b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/service/exception/NearIndexerServiceException.java new file mode 100644 index 00000000..79d1c294 --- /dev/null +++ b/near-java-api-indexer/src/main/java/com/syntifi/near/api/indexer/service/exception/NearIndexerServiceException.java @@ -0,0 +1,15 @@ +package com.syntifi.near.api.indexer.service.exception; + + +/** + * Thrown on Near helper service error + * + * @author Alexandre Carvalho + * @author Andre Bertolace + * @since 0.2.0 + */ +public class NearIndexerServiceException extends RuntimeException { + public NearIndexerServiceException(String message) { + super(message); + } +} diff --git a/near-java-api-indexer/src/test/java/com/syntifi/near/api/indexer/service/NearIndexerServiceTest.java b/near-java-api-indexer/src/test/java/com/syntifi/near/api/indexer/service/NearIndexerServiceTest.java index d423a7db..c2c1c886 100644 --- a/near-java-api-indexer/src/test/java/com/syntifi/near/api/indexer/service/NearIndexerServiceTest.java +++ b/near-java-api-indexer/src/test/java/com/syntifi/near/api/indexer/service/NearIndexerServiceTest.java @@ -1,6 +1,7 @@ package com.syntifi.near.api.indexer.service; import com.syntifi.near.api.indexer.model.AccountIdList; +import com.syntifi.near.api.indexer.model.RecentActivity; import com.syntifi.near.api.indexer.model.StakingDeposit; import org.junit.jupiter.api.Test; import org.slf4j.Logger; @@ -63,4 +64,21 @@ void getStakingDeposits_valid() throws IOException { stakingDeposits.forEach(i -> LOGGER.debug("deposit: {} validator: {}", i.getDeposit(), i.getValidator())); } + + @Test + void getNearRecentActivity_valid() throws IOException { + Response value = nearIndexerService.getNearRecentActivity("wallet-test.testnet").execute(); + + assertTrue(value.isSuccessful()); + + RecentActivity nearValue = value.body(); + + assertNotNull(nearValue); + + nearValue.forEach(item -> LOGGER.debug("Item kind: {}", item.getActionKind())); + + LOGGER.debug("Response {}", nearValue.size()); + + assertNotNull(nearValue); + } } \ No newline at end of file