ExchangeRates.smali
.class public Linfo/blockchain/api/exchangerates/ExchangeRates;
.super Linfo/blockchain/api/BaseApiClient;
.source "ExchangeRates.java"
# static fields
.field private static final BTC_TO_SATOSHI:I = 0x5f5e100
.field private static final ETH:Ljava/lang/String; = "eth"
.field private static final ETH_TO_WEI:Ljava/math/BigDecimal;
# direct methods
.method static constructor <clinit>()V
.registers 2
.prologue
.line 19
const-wide v0, 0xde0b6b3a7640000L
invoke-static {v0, v1}, Ljava/math/BigDecimal;->valueOf(J)Ljava/math/BigDecimal;
move-result-object v0
sput-object v0, Linfo/blockchain/api/exchangerates/ExchangeRates;->ETH_TO_WEI:Ljava/math/BigDecimal;
return-void
.end method
.method public constructor <init>()V
.registers 1
.prologue
.line 27
invoke-direct {p0}, Linfo/blockchain/api/BaseApiClient;-><init>()V
.line 28
return-void
.end method
.method public constructor <init>(Ljava/lang/String;)V
.registers 2
.prologue
.line 35
invoke-direct {p0, p1}, Linfo/blockchain/api/BaseApiClient;-><init>(Ljava/lang/String;)V
.line 36
return-void
.end method
.method public constructor <init>(Lretrofit2/Retrofit;Lretrofit2/Retrofit;Ljava/lang/String;)V
.registers 4
.prologue
.line 45
invoke-direct {p0, p1, p2, p3}, Linfo/blockchain/api/BaseApiClient;-><init>(Lretrofit2/Retrofit;Lretrofit2/Retrofit;Ljava/lang/String;)V
.line 46
return-void
.end method
# virtual methods
.method public fromBTC(Ljava/lang/String;D)Lretrofit2/Call;
.registers 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"D)",
"Lretrofit2/Call",
"<",
"Ljava/lang/Double;",
">;"
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.prologue
.line 106
invoke-virtual {p0}, Linfo/blockchain/api/exchangerates/ExchangeRates;->getApiInterface()Linfo/blockchain/api/interfaces/ApiInterface;
move-result-object v0
double-to-long v2, p2
const-wide/32 v4, 0x5f5e100
mul-long/2addr v2, v4
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object v1
iget-object v2, p0, Linfo/blockchain/api/exchangerates/ExchangeRates;->apiCode:Ljava/lang/String;
invoke-interface {v0, p1, v1, v2}, Linfo/blockchain/api/interfaces/ApiInterface;->fromBTC(Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;)Lretrofit2/Call;
move-result-object v0
return-object v0
.end method
.method public getBtcTicker()Lretrofit2/Call;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lretrofit2/Call",
"<",
"Linfo/blockchain/api/data/Ticker;",
">;"
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.prologue
.line 63
invoke-virtual {p0}, Linfo/blockchain/api/exchangerates/ExchangeRates;->getApiInterface()Linfo/blockchain/api/interfaces/ApiInterface;
move-result-object v0
iget-object v1, p0, Linfo/blockchain/api/exchangerates/ExchangeRates;->apiCode:Ljava/lang/String;
invoke-interface {v0, v1}, Linfo/blockchain/api/interfaces/ApiInterface;->getBtcTicker(Ljava/lang/String;)Lretrofit2/Call;
move-result-object v0
return-object v0
.end method
.method public getBtcTickerMap()Lretrofit2/Call;
.registers 3
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lretrofit2/Call",
"<",
"Ljava/util/TreeMap",
"<",
"Ljava/lang/String;",
"Linfo/blockchain/api/data/TickerItem;",
">;>;"
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.prologue
.line 77
invoke-virtual {p0}, Linfo/blockchain/api/exchangerates/ExchangeRates;->getApiInterface()Linfo/blockchain/api/interfaces/ApiInterface;
move-result-object v0
iget-object v1, p0, Linfo/blockchain/api/exchangerates/ExchangeRates;->apiCode:Ljava/lang/String;
invoke-interface {v0, v1}, Linfo/blockchain/api/interfaces/ApiInterface;->getBtcTickerMap(Ljava/lang/String;)Lretrofit2/Call;
move-result-object v0
return-object v0
.end method
.method public getEthTickerMap()Lretrofit2/Call;
.registers 4
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lretrofit2/Call",
"<",
"Ljava/util/TreeMap",
"<",
"Ljava/lang/String;",
"Linfo/blockchain/api/data/TickerItem;",
">;>;"
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.prologue
.line 124
invoke-virtual {p0}, Linfo/blockchain/api/exchangerates/ExchangeRates;->getApiInterface()Linfo/blockchain/api/interfaces/ApiInterface;
move-result-object v0
const-string v1, "eth"
iget-object v2, p0, Linfo/blockchain/api/exchangerates/ExchangeRates;->apiCode:Ljava/lang/String;
invoke-interface {v0, v1, v2}, Linfo/blockchain/api/interfaces/ApiInterface;->getEthTickerMap(Ljava/lang/String;Ljava/lang/String;)Lretrofit2/Call;
move-result-object v0
return-object v0
.end method
.method public toBTC(Ljava/lang/String;D)Lretrofit2/Call;
.registers 8
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/String;",
"D)",
"Lretrofit2/Call",
"<",
"Ljava/lang/Double;",
">;"
}
.end annotation
.annotation runtime Ljava/lang/Deprecated;
.end annotation
.prologue
.line 91
invoke-virtual {p0}, Linfo/blockchain/api/exchangerates/ExchangeRates;->getApiInterface()Linfo/blockchain/api/interfaces/ApiInterface;
move-result-object v0
invoke-static {p2, p3}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;
move-result-object v1
iget-object v2, p0, Linfo/blockchain/api/exchangerates/ExchangeRates;->apiCode:Ljava/lang/String;
invoke-interface {v0, p1, v1, v2}, Linfo/blockchain/api/interfaces/ApiInterface;->toBTC(Ljava/lang/String;Ljava/lang/Double;Ljava/lang/String;)Lretrofit2/Call;
move-result-object v0
return-object v0
.end method