diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt
index e0b23df..f740082 100644
--- a/buildSrc/src/main/kotlin/Dependencies.kt
+++ b/buildSrc/src/main/kotlin/Dependencies.kt
@@ -19,12 +19,12 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
-const val kotlinVersion = "1.5.21"
+const val kotlinVersion = "1.5.31"
const val orchidVersion = "0.21.1"
object ProtonSdk {
- const val versionCode = 46
- const val versionName = "1.0.8"
+ const val versionCode = 47
+ const val versionName = "1.0.9"
}
object BuildPlugins {
@@ -44,7 +44,7 @@ object BuildPlugins {
object Android {
const val minSdk = 21
- const val compileSdk = 30
+ const val compileSdk = 31
const val targetSdk = compileSdk
const val buildTools = "30.0.3"
@@ -57,17 +57,17 @@ object Android {
object Libraries {
private object Versions {
- const val ktx = "1.6.0-beta01"
+ const val ktx = "1.6.0-rc01"
const val lifecycleLiveData = "2.3.1"
- const val room = "2.3.0-rc01"
- const val workManager = "2.5.0"
+ const val room = "2.4.0-alpha04"
+ const val workManager = "2.6.0"
const val okhttp3 = "5.0.0-alpha.2"
const val retrofit = "2.9.0"
- const val dagger = "2.35.1"
+ const val dagger = "2.38.1"
const val daggerAssistedInject = "0.6.0"
- const val coroutines = "1.4.0-M1"
+ const val coroutines = "1.5.2"
const val timber = "4.7.1"
- const val gson = "2.8.6"
+ const val gson = "2.8.8"
const val guava = "30.1.1-jre"
const val esr = "1.0.1"
}
diff --git a/protonsdk/src/main/AndroidManifest.xml b/protonsdk/src/main/AndroidManifest.xml
index 0517539..fd1d0b1 100644
--- a/protonsdk/src/main/AndroidManifest.xml
+++ b/protonsdk/src/main/AndroidManifest.xml
@@ -6,10 +6,15 @@
+ android:name="androidx.startup.InitializationProvider"
+ android:authorities="${applicationId}.androidx-startup"
+ android:exported="false"
+ tools:node="merge">
+
+
\ No newline at end of file
diff --git a/protonsdk/src/main/java/com/metallicus/protonsdk/ActionsModule.kt b/protonsdk/src/main/java/com/metallicus/protonsdk/ActionsModule.kt
index 5a0b795..c3549f4 100644
--- a/protonsdk/src/main/java/com/metallicus/protonsdk/ActionsModule.kt
+++ b/protonsdk/src/main/java/com/metallicus/protonsdk/ActionsModule.kt
@@ -71,9 +71,9 @@ class ActionsModule {
}
@Suppress("unused", "UNUSED_PARAMETER")
- suspend fun getActions(chainUrl: String, hyperionHistoryUrl: String, accountName: String, contract: String, symbol: String, limit: Int=250, skip: Int=0): Resource> {
+ suspend fun getActions(chainUrl: String, hyperionHistoryUrl: String, accountName: String, contract: String, symbol: String, skip: Int=0, limit: Int=250): Resource> {
return try {
- val response = actionRepository.fetchAccountTokenActions(hyperionHistoryUrl, accountName, symbol, limit, skip)
+ val response = actionRepository.fetchAccountTokenActions(hyperionHistoryUrl, accountName, symbol, skip, limit)
if (response.isSuccessful) {
val jsonObject = response.body()
diff --git a/protonsdk/src/main/java/com/metallicus/protonsdk/Proton.kt b/protonsdk/src/main/java/com/metallicus/protonsdk/Proton.kt
index 4a2a111..eb8f4ab 100644
--- a/protonsdk/src/main/java/com/metallicus/protonsdk/Proton.kt
+++ b/protonsdk/src/main/java/com/metallicus/protonsdk/Proton.kt
@@ -492,7 +492,7 @@ class Proton private constructor(context: Context) {
}
}
- suspend fun getActiveAccountActions(contract: String, symbol: String, limit: Int, skip: Int): Resource> {
+ suspend fun getActiveAccountActions(contract: String, symbol: String, skip: Int, limit: Int): Resource> {
return try {
val activeAccount = getActiveAccountAsync()
@@ -502,8 +502,8 @@ class Proton private constructor(context: Context) {
activeAccount.account.accountName,
contract,
symbol,
- limit,
- skip)
+ skip,
+ limit)
} catch (e: ProtonException) {
Resource.error(e)
} catch (e: Exception) {
@@ -511,10 +511,10 @@ class Proton private constructor(context: Context) {
}
}
- fun getActiveAccountActionsLiveData(contract: String, symbol: String, limit: Int, skip: Int): LiveData>> = liveData {
+ fun getActiveAccountActionsLiveData(contract: String, symbol: String, skip: Int, limit: Int): LiveData>> = liveData {
emit(Resource.loading())
- emit(getActiveAccountActions(contract, symbol, limit, skip))
+ emit(getActiveAccountActions(contract, symbol, skip, limit))
}
fun updateAccountName(pin: String, name: String): LiveData> = liveData {
@@ -786,7 +786,7 @@ class Proton private constructor(context: Context) {
val esrSessionList = accountModule.getESRSessions(/*activeAccount*/)
esrSessionList.forEach { esrSession ->
val esrSessionId = esrSession.id
- if (!isESRSessionOpen(esrSessionId)) {
+ //if (!isESRSessionOpen(esrSessionId)) {
val request = Request.Builder().url(esrSession.receiveChannelUrl).build()
val logging = HttpLoggingInterceptor()
@@ -824,7 +824,7 @@ class Proton private constructor(context: Context) {
Timber.d("ESR Listener onFailure - $message")
}
))
- }
+ //}
}
} catch (e: Exception) {
Timber.e(e)
diff --git a/protonsdk/src/main/java/com/metallicus/protonsdk/api/ProtonChainService.kt b/protonsdk/src/main/java/com/metallicus/protonsdk/api/ProtonChainService.kt
index 06c721c..0f5e2a9 100644
--- a/protonsdk/src/main/java/com/metallicus/protonsdk/api/ProtonChainService.kt
+++ b/protonsdk/src/main/java/com/metallicus/protonsdk/api/ProtonChainService.kt
@@ -102,14 +102,14 @@ interface ProtonChainService {
@Query("account") account: String
): Response
- @GET//("/v2/history/get_actions?account=&transfer.symbol=&filter=&limit=&skip=")
+ @GET//("/v2/history/get_actions?account=&transfer.symbol=&filter=&skip=&limit=")
suspend fun getActions(
@Url url: String,
@Query("account") account: String,
@Query("transfer.symbol") symbol: String,
//@Query("filter") filter: String,
- @Query("limit") limit: Int,
- @Query("skip") skip: Int
+ @Query("skip") skip: Int,
+ @Query("limit") limit: Int
): Response
@POST//("/v1/chain/get_table_rows")
diff --git a/protonsdk/src/main/java/com/metallicus/protonsdk/repository/ActionRepository.kt b/protonsdk/src/main/java/com/metallicus/protonsdk/repository/ActionRepository.kt
index 297a482..0939ad3 100755
--- a/protonsdk/src/main/java/com/metallicus/protonsdk/repository/ActionRepository.kt
+++ b/protonsdk/src/main/java/com/metallicus/protonsdk/repository/ActionRepository.kt
@@ -44,8 +44,8 @@ class ActionRepository @Inject constructor(
}
}
- suspend fun fetchAccountTokenActions(hyperionHistoryUrl: String, accountName: String, symbol: String, limit: Int=250, skip: Int=0): Response {
- return protonChainService.getActions("$hyperionHistoryUrl/v2/history/get_actions", accountName, symbol, limit, skip)
+ suspend fun fetchAccountTokenActions(hyperionHistoryUrl: String, accountName: String, symbol: String, skip: Int=0, limit: Int=250): Response {
+ return protonChainService.getActions("$hyperionHistoryUrl/v2/history/get_actions", accountName, symbol, skip, limit)
}
suspend fun getAccountSystemTokenActions(accountName: String, contract: String, symbol: String): List {