fix a bug of transfer method
@@ -44,6 +44,7 @@ import io.nuls.consensus.constant.ConsensusConstant;
import io.nuls.core.tools.crypto.Base58;
import io.nuls.core.tools.log.Log;
import io.nuls.core.tools.param.AssertUtil;
+import io.nuls.core.tools.str.StringUtils;
import io.nuls.kernel.cfg.NulsConfig;
import io.nuls.kernel.constant.KernelErrorCode;
import io.nuls.kernel.context.NulsContext;
@@ -214,7 +215,6 @@ public class AccountLedgerServiceImpl implements AccountLedgerService, Initializ
}
-
@Override
public Result<List<Transaction>> getAllUnconfirmedTransaction() {
List<Transaction> localTxList = unconfirmedTransactionStorageService.loadAllUnconfirmedList().getData();
@@ -410,10 +410,12 @@ public class AccountLedgerServiceImpl implements AccountLedgerService, Initializ
}
TransferTransaction tx = new TransferTransaction();
+ if (StringUtils.isNotBlank(remark)) {
try {
tx.setRemark(remark.getBytes(NulsConfig.DEFAULT_ENCODING));
} catch (UnsupportedEncodingException e) {
- e.printStackTrace();
+ Log.error(e);
+ }
}
tx.setTime(TimeService.currentTimeMillis());
CoinData coinData = new CoinData();
