How to use the @iota/core.isAboveMaxDepth function in @iota/core

To help you get started, we’ve selected a few @iota/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iotaledger / iota.js / packages / account / src / preset.ts View on Github external
.tap(([tail]) => {
                                          if (!reference || !isAboveMaxDepth(reference.attachmentTimestamp, maxDepth)) {
                                              reference = tail
                                          } else {
                                              return getConsistency([tail.hash]).then(consistent => {
                                                  if (!consistent) {
                                                      reference = tail
                                                  }
                                              })
                                          }

                                          setTimeout(() => bundles.write(bundle), delay)
                                      })
                        )