Skip to content

Fix compilation errors in invoice_nft: missing DataKey variants and broken test code#362

Merged
OxDev-max merged 2 commits into
OpenLedger-Foundation:mainfrom
Devcyprian:fix/compilation-errors-345-346-347-348
Jun 30, 2026
Merged

Fix compilation errors in invoice_nft: missing DataKey variants and broken test code#362
OxDev-max merged 2 commits into
OpenLedger-Foundation:mainfrom
Devcyprian:fix/compilation-errors-345-346-347-348

Conversation

@Devcyprian

@Devcyprian Devcyprian commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Summary

Test plan

  • `cargo check` on `contracts/invoice_nft` passes with no E0425/E0308/E0428 errors
  • `cargo check` on `contracts/shared` passes
  • All tests in `contracts/invoice_nft/src/lib.rs` compile and pass

Closes #345
Closes #346
Closes #347
Closes #348

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@Devcyprian Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

- Add missing DataKey variants (RiskRegistry, OutstandingExposure, CurrencyAllowlist)
  that were referenced in contract body but absent from the enum (E0425 errors)
- MigrationVersion already present in DataKey enum (issue OpenLedger-Foundation#347 addressed)
- require_not_paused already calls AccessControl.is_paused() (issue OpenLedger-Foundation#348 addressed)
- shared/src/validation.rs has no duplicate functions (issues OpenLedger-Foundation#345 and OpenLedger-Foundation#346 already clean)
- Remove orphaned code blocks that were nested outside test function bodies
- Fix test_set_repaid_invalid_status_fails: complete the incomplete test body
- Fix test_next_id_increments: add missing assertion and restore closing brace
- Fix test_invalid_status_transition_created_to_funded_fails: replace corrupted content
- Fix test_migrate_enables_future_operations: declare missing local variables
- Fix test_migrate_preserves_existing_invoices: use correct invoice_id variable
- Add missing &None notes argument to all mint_invoice calls in tests
- Replace &ipfs_cid function references with &cid variable bindings in tests
- Fix test_mint_multiple_invoices_increments_id: use sme instead of undefined sme1

Closes OpenLedger-Foundation#345
Closes OpenLedger-Foundation#346
Closes OpenLedger-Foundation#347
Closes OpenLedger-Foundation#348
@Devcyprian Devcyprian force-pushed the fix/compilation-errors-345-346-347-348 branch from 0b8ab13 to 11c6ceb Compare June 29, 2026 21:27
@OxDev-max OxDev-max merged commit 80dc349 into OpenLedger-Foundation:main Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment