Updated on 2026-08-14

This commit is contained in:
Tangem 2024-01-31 12:13:47 +03:00
parent d995d1dd21
commit 07bf6c376c
20 changed files with 386 additions and 174 deletions

1
core/deep-links/global/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/build

View file

@ -0,0 +1,15 @@
plugins {
alias(deps.plugins.android.library)
alias(deps.plugins.kotlin.android)
id("configuration")
}
android {
namespace = "com.tangem.core.deeplink.global"
}
dependencies {
/* Project */
implementation(projects.core.deepLinks)
}

View file

@ -0,0 +1,12 @@
package com.tangem.core.deeplink.global
import com.tangem.core.deeplink.DeepLink
class BuyCurrencyDeepLink(val onReceive: () -> Unit) : DeepLink {
override val uri: String = "tangem://success.tangem.com"
override fun onReceive(params: Map<String, String>) {
onReceive()
}
}

View file

@ -0,0 +1,24 @@
package com.tangem.core.deeplink.global
import com.tangem.core.deeplink.DeepLink
class SellCurrencyDeepLink(val onReceive: (data: Data) -> Unit) : DeepLink {
override val uri: String = "tangem://sell-request.tangem.com"
override fun onReceive(params: Map<String, String>) {
val data = Data(
transactionId = params["transactionId"] ?: return,
baseCurrencyAmount = params["baseCurrencyAmount"] ?: return,
depositWalletAddress = params["depositWalletAddress"] ?: return,
)
onReceive(data)
}
data class Data(
val transactionId: String,
val baseCurrencyAmount: String,
val depositWalletAddress: String,
)
}