Updated on 2026-08-14
This commit is contained in:
parent
9d899467d1
commit
ec3fe16009
12 changed files with 606 additions and 15 deletions
15
app/src/main/java/com/tangem/data/network/RootstockApi.java
Normal file
15
app/src/main/java/com/tangem/data/network/RootstockApi.java
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
package com.tangem.data.network;
|
||||
|
||||
import com.tangem.data.network.model.InfuraBody;
|
||||
import com.tangem.data.network.model.InfuraResponse;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.Headers;
|
||||
import retrofit2.http.POST;
|
||||
|
||||
public interface RootstockApi {
|
||||
@Headers("Content-Type: application/json")
|
||||
@POST(Server.ApiRootstock.Method.MAIN)
|
||||
Call<InfuraResponse> rootstock(@Body InfuraBody body);
|
||||
}
|
||||
|
|
@ -52,7 +52,7 @@ public class ServerApiRootstock {
|
|||
|
||||
public void rootstock(String method, int id, String wallet, String contract, String tx) {
|
||||
requestsCount++;
|
||||
InfuraApi infuraApi = App.getNetworkComponent().getRetrofitInfura().create(InfuraApi.class);
|
||||
RootstockApi rootstockApi = App.getNetworkComponent().getRetrofitRootstock().create(RootstockApi.class);
|
||||
|
||||
InfuraBody infuraBody;
|
||||
switch (method) {
|
||||
|
|
@ -80,7 +80,7 @@ public class ServerApiRootstock {
|
|||
infuraBody = new InfuraBody();
|
||||
}
|
||||
|
||||
Call<InfuraResponse> call = infuraApi.infura(infuraBody);
|
||||
Call<InfuraResponse> call = rootstockApi.rootstock(infuraBody);
|
||||
call.enqueue(new Callback<InfuraResponse>() {
|
||||
@Override
|
||||
public void onResponse(@NonNull Call<InfuraResponse> call, @NonNull Response<InfuraResponse> response) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue