if(true){
JOptionPane.showMessageDialog(null, "Exchange is currently not supported","Error",JOptionPane.ERROR_MESSAGE);
return;
}
CashPurseAccount cashPurseAccount = new CashPurseAccount();
ArrayList selectedIndices = new ArrayList();
for (int i = 0; i < jTable5.getRowCount(); i++) {
String id = (String) jTable5.getModel().getValueAt(i, 3);
if ((Boolean) jTable5.getModel().getValueAt(i, 5)) {
selectedIndices.add(id);
}
}
System.out.println("selectedIndices:" + selectedIndices);
if(selectedIndices.isEmpty()){
int selected = JOptionPane.showConfirmDialog(this, "This will exchange all of the tokens in the purse", "Warning", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
if(selected==2)
return;
}
setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
boolean isSuccess = cashPurseAccount.exchangeCashPurse(details.getServerID(), details.getAssetID(), details.getNymID(), details.getPurse(), selectedIndices);
if (isSuccess) {
JOptionPane.showMessageDialog(this, "Cash exchanged successfully", "Exchange Success", JOptionPane.INFORMATION_MESSAGE);
CashPurseDetails cashDetails = new CashPurseAccount().getCashPurseDetails(details.getServerID()+":"+details.getAssetID()+":"+details.getNymID());
CashPurseAccountBottomPanel.populateCashPurseDetails(cashDetails);
CashPurseAccountTopPanel.populateCashPurseDetails(cashDetails, cashDetails.getBalance());
MainPage.reLoadAccount();
//((CashPurseTableModel) jTable5.getModel()).setValue(cashPurseAccount.refreshGridData(details.getServerID(), details.getAssetID(), details.getNymID()), jTable5);
} else {