Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge Version/0.41 to Master #7743

Merged
merged 28 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
df5d43e
Increase version name to 0.41.0
rafaelekol Oct 4, 2024
31668be
Update WalletConnect to 1.35.2
rafaelekol Oct 4, 2024
ff72144
Implement ton-connect dApp connecting
abdrasulov Oct 10, 2024
1ddc1e7
Handle error cases when connecting to dApp
abdrasulov Oct 11, 2024
19a933a
Handle ton connect url error
abdrasulov Oct 11, 2024
8169b19
Clean code
abdrasulov Oct 11, 2024
374163f
Stub disconnect dapp
abdrasulov Oct 11, 2024
754d13d
Implement sending tx via ton-connect
abdrasulov Oct 16, 2024
a164fcf
Handle ton-connect deep link
abdrasulov Oct 16, 2024
d554dd4
Fix double handling deeplink dApp request
abdrasulov Oct 16, 2024
684257f
Show ton-connect dapps grouped by accounts
abdrasulov Oct 16, 2024
ca11a24
Remove clickable
abdrasulov Oct 16, 2024
9f07b6f
Fix showing actions in tc confirm
abdrasulov Oct 16, 2024
1f322fd
Update ton-kit
abdrasulov Oct 17, 2024
1c24e61
Update statusInfo for Ton blockchain
abdrasulov Oct 17, 2024
4a3f3c4
Update ethereum-kit
abdrasulov Oct 18, 2024
e4313d2
Update bitcoin-kit
abdrasulov Oct 21, 2024
fe3d109
Update academy structure
abdrasulov Oct 23, 2024
f70d7f1
Show border at the bottom
abdrasulov Oct 23, 2024
adffc20
Apply ViewModelUiState pattern
abdrasulov Oct 23, 2024
8851643
Update design of market total cards
abdrasulov Oct 24, 2024
62ae54c
Make texts single lined in market totals
abdrasulov Oct 25, 2024
fd80dee
Show market globals with empty values on loading
abdrasulov Oct 25, 2024
c2344b6
Simplify MarketViewModel
abdrasulov Oct 28, 2024
c7927cd
Merge branch 'master' into merge-master-to-dev
rafaelekol Nov 11, 2024
3bdc278
Fix HTTP exception crash during Evm Send
rafaelekol Nov 11, 2024
99fe0fa
Update MarketKit for new coin list
rafaelekol Nov 11, 2024
f06fa21
Hide Ton Connect
rafaelekol Nov 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 21 additions & 17 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ android {
compileSdk compile_sdk_version
minSdkVersion min_sdk_version
targetSdkVersion compile_sdk_version
versionCode 120
versionName "0.40.2"
versionCode 121
versionName "0.41.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

ksp {
Expand Down Expand Up @@ -77,7 +77,7 @@ android {
resValue "string", "ftmscanApiKey", "57YQ2GIRAZNV6M5HIJYYG3XQGGNIPVV8MF"
resValue "string", "basescanApiKey", "AKEWS351FN9P9E2CFPWRWQVGHYUP7W8SUF"
resValue "string", "is_release", "false"
resValue "string", "guidesUrl", "https://raw.githubusercontent.com/horizontalsystems/blockchain-crypto-guides/develop/index.json"
resValue "string", "guidesUrl", "https://raw.githubusercontent.com/horizontalsystems/Unstoppable-Wallet-Website/master/src/edu.json"
resValue "string", "faqUrl", "https://raw.githubusercontent.com/horizontalsystems/Unstoppable-Wallet-Website/master/src/faq.json"
resValue "string", "coinsJsonUrl", "https://raw.githubusercontent.com/horizontalsystems/cryptocurrencies/master/coins.json"
resValue "string", "providerCoinsJsonUrl", "https://raw.githubusercontent.com/horizontalsystems/cryptocurrencies/master/provider.coins.json"
Expand Down Expand Up @@ -106,8 +106,8 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "twitterBearerToken", "AAAAAAAAAAAAAAAAAAAAAJgeNwEAAAAA6xVpR6xLKTrxIA3kkSyRA92LDpA%3Da6auybDwcymUyh2BcS6zZwicUdxGtrzJC0qvOSdRwKLeqBGhwB"
resValue "string", "uniswapGraphUrl", "https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2"
resValue "string", "etherscanKey", "TTH1114D5VD5ZMCJZ4B74SGIDRCGSKWGX9"
resValue "string", "bscscanKey", "HBQQN4GTKCHYSRZCKFVQJ3FWGPY4T8237Y"
resValue "string", "etherscanKey", "TTH1114D5VD5ZMCJZ4B74SGIDRCGSKWGX9,1PRTF75E98DGVU949KJC4JFAUCD7WRWC29,ZU3W2V51PJXBXYUX7V5WPRB46HTMM6EYN9"
resValue "string", "bscscanKey", "HBQQN4GTKCHYSRZCKFVQJ3FWGPY4T8237Y,EKDCS2UQJHK8XQ8NFUE2RYHMS11E6J9CWZ,R4S82NMI18ECKX86C9GRJ8FFFPWXCU2YWV"
resValue "string", "polygonscanKey", "2JM7USE5YRI59RWFZQI2RECAZSNI5QEQGV"
resValue "string", "snowtraceApiKey", "47IXTRAAFT1E1J4RNSPZPNB5EWUIQR16FG"
resValue "string", "optimisticEtherscanApiKey", "745EUI4781T147M9QJRNS5G3Q5NFF2SJXP"
Expand All @@ -116,7 +116,7 @@ android {
resValue "string", "ftmscanApiKey", "JAWRPW27KEMVXMJJ9UKY63CVPH3X5V9SMP"
resValue "string", "basescanApiKey", "QU4RJVJXQCW812J3234EW9EV815TA6XC55"
resValue "string", "is_release", "true"
resValue "string", "guidesUrl", "https://raw.githubusercontent.com/horizontalsystems/blockchain-crypto-guides/v1.2/index.json"
resValue "string", "guidesUrl", "https://raw.githubusercontent.com/horizontalsystems/Unstoppable-Wallet-Website/master/src/edu.json"
resValue "string", "faqUrl", "https://raw.githubusercontent.com/horizontalsystems/Unstoppable-Wallet-Website/v1.3/src/faq.json"
resValue "string", "coinsJsonUrl", "https://raw.githubusercontent.com/horizontalsystems/cryptocurrencies/v0.21/coins.json"
resValue "string", "providerCoinsJsonUrl", "https://raw.githubusercontent.com/horizontalsystems/cryptocurrencies/v0.21/provider.coins.json"
Expand Down Expand Up @@ -171,15 +171,19 @@ android {

configurations.all { c ->
c.resolutionStrategy.dependencySubstitution {
substitute module('org.bouncycastle:bcprov-jdk15to18:1.68') using module('org.bouncycastle:bcprov-jdk15on:1.65')
substitute module('org.bouncycastle:bcprov-jdk15on:1.65.01') using module('org.bouncycastle:bcprov-jdk18on:1.77')
substitute module('org.bouncycastle:bcprov-jdk15on:1.70') using module('org.bouncycastle:bcprov-jdk18on:1.77')
substitute module('org.bouncycastle:bcprov-jdk15on:1.66') using module('org.bouncycastle:bcprov-jdk18on:1.77')
substitute module('org.bouncycastle:bcprov-jdk15to18:1.68') using module('org.bouncycastle:bcprov-jdk18on:1.77')
substitute module('com.google.protobuf:protobuf-java:3.6.1') using module('com.google.protobuf:protobuf-javalite:3.21.1')
substitute module('net.jcip:jcip-annotations:1.0') using module('com.github.stephenc.jcip:jcip-annotations:1.0-1')

substitute module('com.tinder.scarlet:scarlet:0.1.12') using module('com.github.WalletConnect.Scarlet:scarlet:1.0.0')
substitute module('com.tinder.scarlet:websocket-okhttp:0.1.12') using module('com.github.WalletConnect.Scarlet:websocket-okhttp:1.0.0')
substitute module('com.tinder.scarlet:stream-adapter-rxjava2:0.1.12') using module('com.github.WalletConnect.Scarlet:stream-adapter-rxjava2:1.0.0')
substitute module('com.tinder.scarlet:message-adapter-gson:0.1.12') using module('com.github.WalletConnect.Scarlet:message-adapter-gson:1.0.0')
substitute module('com.tinder.scarlet:lifecycle-android:0.1.12') using module('com.github.WalletConnect.Scarlet:lifecycle-android:1.0.0')
substitute module('com.tinder.scarlet:scarlet-core:0.1.12') using module('com.walletconnect.Scarlet:scarlet-core:1.0.1')
substitute module('com.tinder.scarlet:scarlet:0.1.12') using module('com.walletconnect.Scarlet:scarlet:1.0.1')
substitute module('com.tinder.scarlet:websocket-okhttp:0.1.12') using module('com.walletconnect.Scarlet:websocket-okhttp:1.0.1')
substitute module('com.tinder.scarlet:stream-adapter-built-in:0.1.12') using module('com.walletconnect.Scarlet:stream-adapter-built-in:1.0.1')
substitute module('com.tinder.scarlet:message-adapter-built-in:0.1.12') using module('com.walletconnect.Scarlet:message-adapter-built-in:1.0.1')
substitute module('com.tinder.scarlet:lifecycle-android:0.1.12') using module('com.walletconnect.Scarlet:lifecycle-android:1.0.1')
}

resolutionStrategy.eachDependency { details ->
Expand Down Expand Up @@ -277,12 +281,12 @@ dependencies {
debugImplementation leakCanary

// Wallet kits
implementation 'com.github.horizontalsystems:ton-kit-android:e907480'
implementation 'com.github.horizontalsystems:bitcoin-kit-android:47db7688'
implementation 'com.github.horizontalsystems:ethereum-kit-android:a30cc3a71'
implementation 'com.github.horizontalsystems:ton-kit-android:763a5c3'
implementation 'com.github.horizontalsystems:bitcoin-kit-android:ced5801'
implementation 'com.github.horizontalsystems:ethereum-kit-android:a5eff38'
implementation 'com.github.horizontalsystems:blockchain-fee-rate-kit-android:1d3bd49'
implementation 'com.github.horizontalsystems:binance-chain-kit-android:c1509a2'
implementation 'com.github.horizontalsystems:market-kit-android:5fe87c2'
implementation 'com.github.horizontalsystems:market-kit-android:4201f8f'
implementation 'com.github.horizontalsystems:solana-kit-android:ce738d8'
implementation 'com.github.horizontalsystems:tron-kit-android:dc3dca7'
// Zcash SDK
Expand All @@ -293,7 +297,7 @@ dependencies {
}

// WalletConnect V2
implementation(platform("com.walletconnect:android-bom:1.15.0"))
implementation(platform("com.walletconnect:android-bom:1.35.2"))
implementation 'com.walletconnect:web3wallet'
implementation 'com.walletconnect:android-core'

Expand Down
66 changes: 66 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -112,6 +118,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -144,6 +156,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -176,6 +194,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -208,6 +232,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -240,6 +270,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -272,6 +308,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -304,6 +346,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -336,6 +384,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -368,6 +422,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down Expand Up @@ -400,6 +460,12 @@
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tc" />
</intent-filter>
<intent-filter android:label="@string/App_Name">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
Expand Down
5 changes: 5 additions & 0 deletions app/src/main/java/io/horizontalsystems/bankwallet/core/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import io.horizontalsystems.bankwallet.core.managers.SystemInfoManager
import io.horizontalsystems.bankwallet.core.managers.TermsManager
import io.horizontalsystems.bankwallet.core.managers.TokenAutoEnableManager
import io.horizontalsystems.bankwallet.core.managers.TonAccountManager
import io.horizontalsystems.bankwallet.core.managers.TonConnectManager
import io.horizontalsystems.bankwallet.core.managers.TonKitManager
import io.horizontalsystems.bankwallet.core.managers.TorManager
import io.horizontalsystems.bankwallet.core.managers.TransactionAdapterManager
Expand Down Expand Up @@ -198,6 +199,7 @@ class App : CoreApp(), WorkConfiguration.Provider, ImageLoaderFactory {
lateinit var backupProvider: BackupProvider
lateinit var spamManager: SpamManager
lateinit var statsManager: StatsManager
lateinit var tonConnectManager: TonConnectManager
}

private val coroutineScope = CoroutineScope(Dispatchers.Default)
Expand Down Expand Up @@ -451,6 +453,9 @@ class App : CoreApp(), WorkConfiguration.Provider, ImageLoaderFactory {

spamManager = SpamManager(localStorage)

tonConnectManager = TonConnectManager(this, adapterFactory)
tonConnectManager.start()

startTasks()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ import io.horizontalsystems.core.BackgroundManager
import io.horizontalsystems.marketkit.models.BlockchainType
import io.horizontalsystems.marketkit.models.TokenQuery
import io.horizontalsystems.marketkit.models.TokenType
import io.horizontalsystems.tonkit.Address

class AdapterFactory(
private val context: Context,
Expand Down Expand Up @@ -214,15 +215,25 @@ class AdapterFactory(

fun tonTransactionsAdapter(source: TransactionSource): ITransactionsAdapter? {
val tonKitWrapper = tonKitManager.getTonKitWrapper(source.account)
val baseToken = coinManager.getToken(TokenQuery(BlockchainType.Ton, TokenType.Native)) ?: return null
val tonTransactionConverter = TonTransactionConverter(
tonKitWrapper.tonKit.receiveAddress,
val address = tonKitWrapper.tonKit.receiveAddress

val tonTransactionConverter = tonTransactionConverter(address, source) ?: return null

return TonTransactionsAdapter(tonKitWrapper, tonTransactionConverter)
}

fun tonTransactionConverter(
address: Address,
source: TransactionSource,
): TonTransactionConverter? {
val query = TokenQuery(BlockchainType.Ton, TokenType.Native)
val baseToken = coinManager.getToken(query) ?: return null
return TonTransactionConverter(
address,
coinManager,
source,
baseToken
)

return TonTransactionsAdapter(tonKitWrapper, tonTransactionConverter)
}

fun unlinkAdapter(wallet: Wallet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ object GuidesManager {
val jsonObject = json.asJsonObject

return Guide(
jsonObject.get("title").asString,
context.deserialize(jsonObject.get("updated_at"), Date::class.java),
jsonObject["image"].asString?.let { absolutify(it) },
absolutify(jsonObject["file"].asString)
jsonObject.get("title").asString,
absolutify(jsonObject.get("markdown").asString)
)
}

Expand Down
Loading
Loading