use of wannabit.io.cosmostaion.dao.IbcPath in project cosmostation-android by cosmostation.
the class BaseData method getIbcSendableRelayers.
public ArrayList<IbcPath> getIbcSendableRelayers() {
ArrayList<IbcPath> result = new ArrayList<>();
for (IbcPath ibcPath : mIbcPaths) {
for (IbcPath.Path path : ibcPath.paths) {
if (path.auth != null && path.auth) {
result.add(ibcPath);
}
}
}
Set<IbcPath> arr2 = new HashSet<>(result);
ArrayList<IbcPath> resArr2 = new ArrayList<>(arr2);
return resArr2;
}
use of wannabit.io.cosmostaion.dao.IbcPath in project cosmostation-android by cosmostation.
the class Dialog_IBC_Receive_Chain method onCreateDialog.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
View view = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_template_recycler, null);
mDialogTitle = view.findViewById(R.id.dialog_title);
mDialogTitle.setText(R.string.str_select_ibc_destination);
mRecyclerView = view.findViewById(R.id.recycler);
mIbcSendableRelayers = (ArrayList<IbcPath>) getArguments().getSerializable("chain");
mRecyclerView.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.VERTICAL, false));
mRecyclerView.setHasFixedSize(true);
mRelayerListAdapter = new RelayerListAdapter();
mRecyclerView.setAdapter(mRelayerListAdapter);
AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
builder.setView(view);
return builder.create();
}
use of wannabit.io.cosmostaion.dao.IbcPath in project cosmostation-android by cosmostation.
the class BaseData method getIbcRollbackRelayer.
public ArrayList<IbcPath> getIbcRollbackRelayer(String denom) {
ArrayList<IbcPath> result = new ArrayList<>();
IbcToken ibcToken = getIbcToken(denom.replaceAll("ibc/", ""));
if (mIbcPaths != null && mIbcPaths.size() > 0) {
for (IbcPath ibcPath : mIbcPaths) {
for (IbcPath.Path path : ibcPath.paths) {
if (path.channel_id != null && path.channel_id.equalsIgnoreCase(ibcToken.channel_id)) {
result.add(ibcPath);
}
}
}
}
return result;
}
Aggregations