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

Đang mở
#85 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

@Rav1Chauhan đang làm issue này rồi.

Từ ngày 23/2/2026.

  • #86 của @Rav1Chauhan — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
20/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript
Lĩnh vực
backend, blockchain

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!!

Ngôn ngữ chính
JavaScript
Star
16
Fork
29
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của StabilityNexus/StablePay

Tất cả issue của StabilityNexus/StablePay

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.