Updated on 2026-08-14

This commit is contained in:
Tangem 2018-06-20 12:21:01 +03:00
parent 6f50174492
commit 63f3952f02
2 changed files with 25 additions and 20 deletions

View file

@ -924,13 +924,13 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
if (mCard.getBlockchain() == Blockchain.Bitcoin || mCard.getBlockchain() == Blockchain.BitcoinTestNet) {
SharedData data = new SharedData(SharedData.COUNT_REQUEST);
for (int i = 0; i < data.allRequest; ++i) {
String nodeAddress = engine.GetNextNode(mCard);
String nodeAddress = Objects.requireNonNull(engine).GetNextNode(mCard);
int nodePort = engine.GetNextNodePort(mCard);
UpdateWalletInfoTask connectTaskEx = new UpdateWalletInfoTask(nodeAddress, nodePort, data);
connectTaskEx.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, ElectrumRequest.CheckBalance(mCard.getWallet()));
}
String nodeAddress = engine.GetNode(mCard);
String nodeAddress = Objects.requireNonNull(engine).GetNode(mCard);
int nodePort = engine.GetNodePort(mCard);
UpdateWalletInfoTask updateWalletInfoTask = new UpdateWalletInfoTask(nodeAddress, nodePort, data);
updateTasks.add(updateWalletInfoTask);
@ -944,13 +944,13 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
} else if (mCard.getBlockchain() == Blockchain.BitcoinCash || mCard.getBlockchain() == Blockchain.BitcoinCashTestNet) {
SharedData data = new SharedData(SharedData.COUNT_REQUEST);
for (int i = 0; i < data.allRequest; ++i) {
String nodeAddress = engine.GetNextNode(mCard);
String nodeAddress = Objects.requireNonNull(engine).GetNextNode(mCard);
int nodePort = engine.GetNextNodePort(mCard);
UpdateWalletInfoTask connectTaskEx = new UpdateWalletInfoTask(nodeAddress, nodePort, data);
connectTaskEx.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, ElectrumRequest.CheckBalance(mCard.getWallet()));
}
String nodeAddress = engine.GetNode(mCard);
String nodeAddress = Objects.requireNonNull(engine).GetNode(mCard);
int nodePort = engine.GetNodePort(mCard);
UpdateWalletInfoTask updateWalletInfoTask = new UpdateWalletInfoTask(nodeAddress, nodePort, data);
@ -981,7 +981,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
} else if (mCard.getBlockchain() == Blockchain.Token) {
ETHRequestTask updateETH = new ETHRequestTask(mCard.getBlockchain());
InfuraRequest reqETH = InfuraRequest.GetTokenBalance(mCard.getWallet(), engine.GetContractAddress(mCard), engine.GetTokenDecimals(mCard));
InfuraRequest reqETH = InfuraRequest.GetTokenBalance(mCard.getWallet(), Objects.requireNonNull(engine).GetContractAddress(mCard), engine.GetTokenDecimals(mCard));
reqETH.setID(67);
reqETH.setBlockchain(mCard.getBlockchain());
@ -1078,7 +1078,7 @@ public class LoadedWallet extends Fragment implements SwipeRefreshLayout.OnRefre
lastReadSuccess = false;
if (cardProtocol.getError() instanceof CardProtocol.TangemException_ExtendedLengthNotSupported) {
if (!NoExtendedLengthSupportDialog.allreadyShowed) {
new NoExtendedLengthSupportDialog().show(getActivity().getFragmentManager(), "NoExtendedLengthSupportDialog");
new NoExtendedLengthSupportDialog().show(Objects.requireNonNull(getActivity()).getFragmentManager(), NoExtendedLengthSupportDialog.TAG);
}
} else {
Toast.makeText(getContext(), R.string.try_to_scan_again, Toast.LENGTH_LONG).show();

View file

@ -179,13 +179,13 @@
tools:text="Bitcoin"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:layout_marginTop="6dp"
android:background="@android:color/darker_gray"/>
<!--<View-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="1dp"-->
<!--android:layout_marginLeft="4dp"-->
<!--android:layout_marginRight="4dp"-->
<!--android:layout_marginTop="6dp"-->
<!--android:background="@android:color/darker_gray"/>-->
<LinearLayout
android:layout_width="match_parent"
@ -257,12 +257,12 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:background="@android:color/darker_gray"/>
<!--<View-->
<!--android:layout_width="match_parent"-->
<!--android:layout_height="1dp"-->
<!--android:layout_marginLeft="4dp"-->
<!--android:layout_marginRight="4dp"-->
<!--android:background="@android:color/darker_gray"/>-->
<LinearLayout
android:visibility="gone"
@ -323,6 +323,7 @@
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@ -349,6 +350,7 @@
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@ -376,6 +378,7 @@
</LinearLayout>
<LinearLayout
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@ -383,7 +386,6 @@
android:paddingRight="8dp">
<TextView
android:id="@+id/textView15"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="2dp"
@ -440,6 +442,7 @@
</RelativeLayout>
<LinearLayout
android:layout_marginBottom="20dp"
android:id="@+id/rlToolButtons"
android:layout_width="0dp"
android:layout_height="wrap_content"
@ -473,6 +476,7 @@
<android.support.v7.widget.AppCompatButton
android:id="@+id/btnExtract"
android:width="100dp"
style="@style/AppTheme.RoundedCornerMaterialButton"
android:layout_width="wrap_content"
android:text="@string/extract"/>
@ -480,6 +484,7 @@
</LinearLayout>
<RelativeLayout
android:visibility="gone"
android:id="@+id/rlCardIdAndIcons"
android:layout_width="match_parent"
android:layout_height="40dp"