feat: add CrowdNode.stakeMinimum (Đ0.5), as per terms
authorAJ ONeal <coolaj86@gmail.com>
Tue, 21 Jun 2022 06:33:05 +0000 (00:33 -0600)
committerAJ ONeal <coolaj86@gmail.com>
Tue, 21 Jun 2022 06:33:05 +0000 (00:33 -0600)
lib/crowdnode.js

index 5c5401fd5f779d7d0ca23c5352b7b6f10fdae43e..eec0f6180eec928b28106ffb194ddb29a4d84404 100644 (file)
@@ -31,6 +31,7 @@ CrowdNode._baseUrl = CrowdNode.main.baseUrl;
 CrowdNode.offset = 20000;
 CrowdNode.duffs = 100000000;
 CrowdNode.depositMinimum = 10000;
+CrowdNode.stakeMinimum = toDuff(0.5);
 
 /**
  * @type {Record<String, Number>}
@@ -499,3 +500,7 @@ if (require.main === module) {
     console.error(err);
   });
 }
+
+function toDuff(dash) {
+  return Math.round(parseFloat(dash) * DUFFS);
+}