Browse Source

docs: fix stacking code sample

Fixes blockstack/docs#1016
feat/build-apps-rebase
Alexander Graebe 4 years ago
parent
commit
643387f057
  1. 7
      src/pages/understand-stacks/integrate-stacking.md

7
src/pages/understand-stacks/integrate-stacking.md

@ -169,7 +169,7 @@ Users can select how many cycles they would like to participate in. To help with
let numberOfCycles = 3; let numberOfCycles = 3;
// the projected datetime for the unlocking of tokens // the projected datetime for the unlocking of tokens
const unlockingAt = new Date(secondsUntilNextCycle); const unlockingAt = new Date(new Date().getTime() + secondsUntilNextCycle);
unlockingAt.setSeconds(unlockingAt.getSeconds() + cycleDuration * numberOfCycles); unlockingAt.setSeconds(unlockingAt.getSeconds() + cycleDuration * numberOfCycles);
``` ```
@ -184,7 +184,10 @@ With this input, and the data from previous steps, we can determine the eligibil
let btcAddress = '1Xik14zRm29UsyS6DjhYg4iZeZqsDa8D3'; let btcAddress = '1Xik14zRm29UsyS6DjhYg4iZeZqsDa8D3';
let numberOfCycles = 3; let numberOfCycles = 3;
const stackingEligibility = await client.canStack({ btcAddress, numberOfCycles }); const stackingEligibility = await client.canStack({
poxAddress: btcAddress,
cycles: numberOfCycles,
});
// stackingEligibility: // stackingEligibility:
// { // {

Loading…
Cancel
Save