Bug: Missing import causes `calculateFutureScPrice` to fail at runtime
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
- Domain
- backend, blockchain
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
- Import
calculateFutureScPricefrom the djed-sdk - Call the function with valid parameters
- Observe
ReferenceErrorbeing 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from StabilityNexus/StablePay
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
StabilityNexus/StablePay#64 · 1 comment ·
-
[BUG]: Missing SDK API documentation and incomplete developer-facing usage guide in StablePay READMEOpenbug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
StabilityNexus/StablePay#104 · 1 comment ·
-
[BUG]: `stablepay-sdk` README documents an unrelated thirdweb app instead of the actual SDK APIOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
StabilityNexus/StablePay#102 ·
-
[FEATURE]: Centralize transaction initialization and quote fetching to avoid duplicate RPC calls in the widgetMay be free again @CaptainLevi2k04 claimed this 81 days ago, and no pull request is open. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 38/100
StabilityNexus/StablePay#101 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
StabilityNexus/StablePay#96 · 1 comment ·
All issues in StabilityNexus/StablePay
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 Under an hour Newbie friendliness 82/100
Leonxlnx/taste-skill#216 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
all-contributors/cli#690 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day