More descriptive comment

This commit is contained in:
Leonid Logvinov 2017-05-25 11:38:01 +02:00
parent 7c40fee2ad
commit 8fe580ea52
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4

View File

@ -36,7 +36,11 @@ export class ZeroEx {
return false;
}
}
/** Generates pseudo-random 256 bits salt */
/**
* Generates pseudo-random 256 bit salt.
* The salt is used to ensure that the 0x order generated has a unique orderHash that does
* not collide with any other outstanding orders.
*/
public static generatePseudoRandomSalt(): BigNumber.BigNumber {
// BigNumber.random returns a pseudo-random number between 0 & 1 with a passed in number of decimal places.
// Source: https://mikemcl.github.io/bignumber.js/#random