MCPcopy
hub / github.com/ccxt/ccxt / checkAddress

Method checkAddress

java/lib/src/main/java/io/github/ccxt/Exchange.java:4478–4493  ·  view source on GitHub ↗
(Object... optionalArgs)

Source from the content-addressed store, hash-verified

4476 }
4477
4478 public Object checkAddress(Object... optionalArgs)
4479 {
4480 Object address = Helpers.getArg(optionalArgs, 0, null);
4481 if (Helpers.isTrue(Helpers.isEqual(address, null)))
4482 {
4483 throw new InvalidAddress((String)Helpers.add(this.id, " address is undefined")) ;
4484 }
4485 // check the address is not the same letter like 'aaaaa' nor too short nor has a space
4486 Object uniqChars = (this.unique(this.stringToCharsArray(address)));
4487 Object length = Helpers.getArrayLength(uniqChars); // py transpiler trick
4488 if (Helpers.isTrue(Helpers.isTrue(Helpers.isTrue(Helpers.isEqual(length, 1)) || Helpers.isTrue(Helpers.isLessThan(((String)address).length(), this.minFundingAddressLength))) || Helpers.isTrue(Helpers.isGreaterThan(Helpers.getIndexOf(address, " "), Helpers.opNeg(1)))))
4489 {
4490 throw new InvalidAddress((String)Helpers.add(Helpers.add(Helpers.add(Helpers.add(Helpers.add(this.id, " address is invalid or has less than "), String.valueOf(this.minFundingAddressLength)), " characters: \""), String.valueOf(address)), "\"")) ;
4491 }
4492 return address;
4493 }
4494
4495 public Object findMessageHashes(Client client, Object element)
4496 {

Callers 15

withdrawMethod · 0.45
withdrawMethod · 0.45
withdrawMethod · 0.45
transferMethod · 0.45
withdrawMethod · 0.45
parseDepositAddressMethod · 0.45
withdrawMethod · 0.45
withdrawMethod · 0.45
fetchDepositAddressMethod · 0.45
withdrawMethod · 0.45
createDepositAddressMethod · 0.45

Calls 12

getArgMethod · 0.95
isTrueMethod · 0.95
isEqualMethod · 0.95
addMethod · 0.95
uniqueMethod · 0.95
stringToCharsArrayMethod · 0.95
getArrayLengthMethod · 0.95
isLessThanMethod · 0.95
isGreaterThanMethod · 0.95
getIndexOfMethod · 0.95
opNegMethod · 0.95
lengthMethod · 0.45

Tested by

no test coverage detected