Skip to content

Commit

Permalink
Merge pull request #1432 from novasamatech/rc/7.9.5
Browse files Browse the repository at this point in the history
Rc/7.9.5
  • Loading branch information
valentunn authored Mar 18, 2024
2 parents 0325b52 + aa2454f commit 50ebf6c
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 221 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/android_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ on:
required: false
CI_GITHUB_KEYSTORE_KEY_PASS:
required: false
# Secrets for google-services:
CI_DEVELOP_GOOGLE_SERVICES:
required: true
CI_PRODUCTION_GOOGLE_SERVICES:
required: true

env:
ACALA_PROD_AUTH_TOKEN: ${{ secrets.ACALA_PROD_AUTH_TOKEN }}
Expand Down Expand Up @@ -100,6 +105,9 @@ env:
CI_GITHUB_KEYSTORE_KEY_PASS: ${{ secrets.CI_GITHUB_KEYSTORE_KEY_PASS }}
CI_GITHUB_KEYSTORE_KEY_FILE: ${{ secrets.BASE64_GITHUB_KEYSTORE_FILE }}

CI_DEVELOP_GOOGLE_SERVICES_FILE: ${{ secrets.CI_DEVELOP_GOOGLE_SERVICES }}
CI_PRODUCTION_GOOGLE_SERVICES_FILE: ${{ secrets.CI_PRODUCTION_GOOGLE_SERVICES }}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -115,6 +123,20 @@ jobs:
with:
ref: ${{ inputs.branch }}

- name: 📂 Set up DEV Google Services
uses: davidSchuppa/base64Secret-toFile-action@v3
with:
secret: ${{ env.CI_DEVELOP_GOOGLE_SERVICES_FILE }}
filename: google-services.json
destination-path: ./app/

- name: 📂 Set up PROD Google Services
uses: davidSchuppa/base64Secret-toFile-action@v3
with:
secret: ${{ env.CI_PRODUCTION_GOOGLE_SERVICES_FILE }}
filename: google-services.json
destination-path: ./app/src/release/

- name: 🔧 Install dependencies
uses: ./.github/workflows/install/

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,6 @@ app/*.apk
!/core-db/schemas/io.novafoundation.nova.core_db.AppDatabase/2.json
!/core-db/schemas/io.novafoundation.nova.core_db.AppDatabase/8.json
!/core-db/schemas/io.novafoundation.nova.core_db.AppDatabase/9.json

google-services.json

46 changes: 0 additions & 46 deletions app/src/debug/google-services.json

This file was deleted.

82 changes: 0 additions & 82 deletions app/src/develop/google-services.json

This file was deleted.

82 changes: 0 additions & 82 deletions app/src/instrumentialTest/google-services.json

This file was deleted.

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
buildscript {
ext {
// App version
versionName = '7.9.4'
versionCode = 122
versionName = '7.9.5'
versionCode = 123

applicationId = "io.novafoundation.nova"
releaseApplicationSuffix = "market"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class DAppBrowserFragment : BaseFragment<DAppBrowserViewModel>(), OptionsBottomS

dappBrowserMore.setOnClickListener { moreClicked() }

requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR
requireActivity().requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_USER
}

override fun onDestroyView() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ val RuntimeMetadata.assetRegistry: AssetRegistryApi
get() = AssetRegistryApi(assetRegistry())

context(StorageQueryContext)
val AssetRegistryApi.assetMetadataMap: QueryableStorageEntry1<HydraDxAssetId, Int>
val AssetRegistryApi.assetMetadataMap: QueryableStorageEntry1<HydraDxAssetId, Int?>
get() = storage1(
name = "AssetMetadataMap",
name = "Assets",
binding = { decoded, _ -> bindMetadataDecimals(decoded) },
)

private fun bindMetadataDecimals(decoded: Any): Int {
return bindInt(decoded.castToStruct()["decimals"])
private fun bindMetadataDecimals(decoded: Any): Int? {
return decoded.castToStruct().get<Any?>("decimals")?.let(::bindInt)
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import com.google.gson.Gson
import io.novafoundation.nova.common.data.network.runtime.binding.BlockNumber
import io.novafoundation.nova.common.data.network.runtime.binding.orEmpty
import io.novafoundation.nova.common.utils.MultiMapList
import io.novafoundation.nova.common.utils.filterNotNull
import io.novafoundation.nova.common.utils.graph.Edge
import io.novafoundation.nova.common.utils.graph.Graph
import io.novafoundation.nova.common.utils.graph.create
Expand Down Expand Up @@ -223,7 +224,7 @@ private class StableSwapSource(
private fun CoroutineScope.fetchAssetsPrecisionsAsync(): Deferred<Map<HydraDxAssetId, Int>> {
return async {
remoteStorageSource.query(chain.id) {
metadata.assetRegistry.assetMetadataMap.entries()
metadata.assetRegistry.assetMetadataMap.entries().filterNotNull()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fun <T : Any> QueryableModule.storage0(name: String, binding: QueryableStorageBi
}

context(StorageQueryContext)
fun <I, T : Any> QueryableModule.storage1(
fun <I, T> QueryableModule.storage1(
name: String,
binding: QueryableStorageBinder1<I, T>,
keyBinding: QueryableStorageKeyBinder<I>? = null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import kotlinx.coroutines.flow.filterNotNull

typealias QueryableStorageBinder1<K, V> = (dynamicInstance: Any, key: K) -> V

interface QueryableStorageEntry1<I, T : Any> {
interface QueryableStorageEntry1<I, T> {

context(StorageQueryContext)
suspend fun keys(): List<I>
Expand Down Expand Up @@ -46,7 +46,7 @@ fun <I, T : Any> QueryableStorageEntry1<I, T>.observeNonNull(argument: I): Flow<
context(StorageQueryContext)
suspend fun <I, T : Any> QueryableStorageEntry1<I, T>.queryNonNull(argument: I): T = requireNotNull(query(argument))

internal class RealQueryableStorageEntry1<I, T : Any>(
internal class RealQueryableStorageEntry1<I, T>(
private val storageEntry: StorageEntry,
private val binding: QueryableStorageBinder1<I, T>,
@Suppress("UNCHECKED_CAST") private val keyBinding: QueryableStorageKeyBinder<I>? = null
Expand Down

0 comments on commit 50ebf6c

Please sign in to comment.