Bug: Missing import causes `calculateFutureScPrice` to fail at runtime

Open
#85 1 comment 0 reactions 0 assignees View on GitHub

@Rav1Chauhan is already working on this.

Since Feb 23, 2026.

  • #86 by @Rav1Chauhan — open

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
20/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
javascript

Research direction

Read djed-sdk/src/djed/stableCoin.js and compare its imports with djed.js and system.js, as the issue suggests. Confirm the missing helper is imported from ../helpers.js, then invoke calculateFutureScPrice with valid parameters and verify it returns a price without a ReferenceError.

Written by the indexing model from the issue text.

Description

Description

The calculateFutureScPrice function in djed-sdk/src/djed/stableCoin.js references a helper function that is not imported in the file. This causes a ReferenceError at runtime when the function is invoked.

Steps to Reproduce
  1. Import calculateFutureScPrice from the djed-sdk
  2. Call the function with valid parameters
  3. Observe ReferenceError being thrown
Expected Behavior

The function should execute successfully and return the calculated future stablecoin price.

Actual Behavior

The function throws a ReferenceError because a required helper function is not in scope.

Proposed Solution

Update the import statement in stableCoin.js to include the missing helper function from ../helpers.js, consistent with how other files in the same directory (like djed.js and system.js) handle their imports.

@Zahnentferner please assign this issue to me! would love to solve this issue!!

Dominant language
JavaScript
Stars
16
Forks
29
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from StabilityNexus/StablePay

All issues in StabilityNexus/StablePay

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.