Updated on 2026-08-14

This commit is contained in:
Tangem 2018-12-05 12:40:42 +03:00
parent 48db52b2a9
commit 71fe425c1b
61 changed files with 592 additions and 454 deletions

View file

@ -4,6 +4,7 @@ import android.app.Activity
import android.nfc.Tag
import android.os.Bundle
import com.tangem.domain.wallet.CoinData
import com.tangem.domain.wallet.TangemContext
import com.tangem.tangemcard.data.TangemCard
import com.tangem.presentation.activity.EmptyWalletActivity
import com.tangem.presentation.activity.LoadedWalletActivity
@ -17,16 +18,16 @@ class Navigator {
context.startActivity(MainActivity.callingIntent(context))
}
fun showLoadedWallet(context: Activity, lastTag: Tag, cardInfo: Bundle) {
context.startActivityForResult(LoadedWalletActivity.callingIntent(context, lastTag, cardInfo), MainActivity.REQUEST_CODE_SHOW_CARD_ACTIVITY)
fun showLoadedWallet(context: Activity, lastTag: Tag, ctx: TangemContext) {
context.startActivityForResult(LoadedWalletActivity.callingIntent(context, lastTag, ctx), MainActivity.REQUEST_CODE_SHOW_CARD_ACTIVITY)
}
fun showEmptyWallet(context: Activity) {
context.startActivity(EmptyWalletActivity.callingIntent(context))
fun showEmptyWallet(context: Activity, ctx: TangemContext) {
context.startActivity(EmptyWalletActivity.callingIntent(context ,ctx))
}
fun showVerifyCard(context: Activity, card: TangemCard, coinData: CoinData, message: String, error: String) {
context.startActivityForResult(VerifyCardActivity.callingIntent(context, card, coinData, message, error), LoadedWallet.REQUEST_CODE_VERIFY_CARD)
fun showVerifyCard(context: Activity, ctx: TangemContext) {
context.startActivityForResult(VerifyCardActivity.callingIntent(context, ctx), LoadedWallet.REQUEST_CODE_VERIFY_CARD)
}
fun showPinSwap(context: Activity) {

View file

@ -20,9 +20,6 @@ public interface NetworkComponent {
@Named(Server.ApiEstimatefee.URL_ESTIMATEFEE)
Retrofit getRetrofitEstimatefee();
@Named(Server.ApiTangem.URL_TANGEM)
Retrofit getRetrofitTangem();
@Named(Server.ApiCoinmarket.URL_COINMARKET)
Retrofit getRetrofitCoinmarketcap();

View file

@ -41,17 +41,6 @@ class NetworkModule {
.build();
}
@Singleton
@Provides
@Named(Server.ApiTangem.URL_TANGEM)
Retrofit provideRetrofitTangem() {
return new Retrofit.Builder()
.baseUrl(Server.ApiTangem.URL_TANGEM)
.addConverterFactory(GsonConverterFactory.create())
.client(createOkHttpClient())
.build();
}
@Singleton
@Provides
@Named(Server.ApiUpdateVersion.URL_UPDATE_VERSION)