Updated on 2026-08-14
This commit is contained in:
parent
7759289d8f
commit
15b520db93
2 changed files with 11 additions and 4 deletions
|
|
@ -163,7 +163,7 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
|
|||
when (items[which]) {
|
||||
getString(R.string.loaded_wallet_load_via_app) -> {
|
||||
try {
|
||||
val intent = Intent(Intent.ACTION_VIEW, engine.shareWalletUri)
|
||||
val intent = Intent(Intent.ACTION_VIEW, engine.shareWalletUriEx)
|
||||
intent.addCategory(Intent.CATEGORY_DEFAULT)
|
||||
startActivity(intent)
|
||||
} catch (e: ActivityNotFoundException) {
|
||||
|
|
@ -176,7 +176,7 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
|
|||
}
|
||||
|
||||
getString(R.string.loaded_wallet_load_via_qr) -> {
|
||||
ShowQRCodeDialog.show(activity as AppCompatActivity?, engine.shareWalletUri.toString())
|
||||
ShowQRCodeDialog.show(activity as AppCompatActivity?, engine.shareWalletUriEx.toString())
|
||||
}
|
||||
|
||||
getString(R.string.loaded_wallet_load_via_cryptonit) -> {
|
||||
|
|
@ -885,8 +885,7 @@ class LoadedWalletFragment : BaseFragment(), NavigationResultListener, NfcAdapte
|
|||
|
||||
private fun doShareWallet(useURI: Boolean) {
|
||||
if (useURI) {
|
||||
val engine = CoinEngineFactory.create(ctx)
|
||||
val txtShare = engine?.shareWalletUri.toString()
|
||||
val txtShare = ctx.coinData.wallet
|
||||
val intent = Intent(Intent.ACTION_SEND)
|
||||
intent.type = Constant.INTENT_TYPE_TEXT_PLAIN
|
||||
intent.putExtra(Intent.EXTRA_SUBJECT, Constant.WALLET_ADDRESS)
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.tangem.wallet;
|
|||
import android.net.Uri;
|
||||
import android.text.InputFilter;
|
||||
|
||||
import com.tangem.data.Blockchain;
|
||||
import com.tangem.tangem_card.reader.CardProtocol;
|
||||
import com.tangem.tangem_card.tasks.SignTask;
|
||||
|
||||
|
|
@ -195,6 +196,13 @@ public abstract class CoinEngine {
|
|||
|
||||
public abstract Uri getShareWalletUri();
|
||||
|
||||
public Uri getShareWalletUriEx(){
|
||||
if (ctx.getBlockchain() == Blockchain.BitcoinCash)
|
||||
return getShareWalletUri();
|
||||
else
|
||||
return Uri.parse(ctx.getBlockchain().name().toLowerCase() + ":" + getShareWalletUri().toString());
|
||||
}
|
||||
|
||||
public abstract boolean checkNewTransactionAmount(Amount amount);
|
||||
|
||||
public abstract boolean checkNewTransactionAmountAndFee(Amount amount, Amount fee, Boolean isFeeIncluded);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue