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

Loading…
Cancel
Save