eth地址校验

pull/1/head
liushaodong 5 years ago
parent 101e4afd68
commit 38bbbb7091
  1. 14
      blockchain-server/blockchain-server-eth/src/main/java/com/blockchain/server/eth/service/impl/EthWalletServiceImpl.java

@ -55,8 +55,8 @@ public class EthWalletServiceImpl implements IEthWalletService, ITxTransaction {
IEthWalletTransferService ethWalletTransferService;
@Autowired
IConfigWalletParamService configWalletParamService;
@Autowired
private UserFeign userFeign;
// @Autowired
// private UserFeign userFeign;
@Autowired
IWalletWeb3j walletWeb3j;
@ -260,11 +260,11 @@ public class EthWalletServiceImpl implements IEthWalletService, ITxTransaction {
@Transactional
public EthWalletTransfer handleWelletOutApply(String userOpenId, String tokenAddr, String toAddr, String walletType,
String amount, String password) {
ExceptionPreconditionUtils.checkStringNotBlank(toAddr, new EthWalletException(EthWalletEnums.NULL_OUT_TOADDR));
if (toAddr.length() != EthWalletConstants.WALLERT_LENGTH) {
throw new EthWalletException(EthWalletEnums.OUT_TOADDR_ERROR);
}
toAddr = toAddr.toLowerCase();
// ExceptionPreconditionUtils.checkStringNotBlank(toAddr, new EthWalletException(EthWalletEnums.NULL_OUT_TOADDR));
// if (toAddr.length() != EthWalletConstants.WALLERT_LENGTH) {
// throw new EthWalletException(EthWalletEnums.OUT_TOADDR_ERROR);
// }
// toAddr = toAddr.toLowerCase();
EthWalletDTO wallet = selectByUserOpenIdAndTokenAddrAndWalletType(userOpenId, tokenAddr, walletType); // 数据验证
ethWalletKeyService.isPassword(wallet.getUserOpenId(), password); // 验证密码

Loading…
Cancel
Save