Description:
The developer portal (
App.tsx
in the Vite SPA) contains a codeFiles object with hardcoded string copies of the Rust source code. These copies are simplified and do not match the actual lib.rs:
deposit snippet shows vault.balance += amount instead of the real checked_add overflow-safe version
check_paused call is omitted
Error handling is simplified or missing
Users reading the "Code" tab in the portal will see incorrect contract behavior, which is misleading for auditors, integrators, and new contributors.
Proposed fix:
At build time, use Vite's ?raw import to pull in the actual .rs source files directly: import libRs from '../../rentar-contract/src/lib.rs?raw'
Or generate a JSON snapshot of all source files as part of the CI build step
Remove the hardcoded string copies entirely
Acceptance criteria:
Code viewer displays the actual, current source files
CI build step validates that the displayed code matches rentar-contract/src/
No manual duplication of source code in the portal
Description:
The developer portal (
App.tsx
in the Vite SPA) contains a codeFiles object with hardcoded string copies of the Rust source code. These copies are simplified and do not match the actual lib.rs:
deposit snippet shows vault.balance += amount instead of the real checked_add overflow-safe version
check_paused call is omitted
Error handling is simplified or missing
Users reading the "Code" tab in the portal will see incorrect contract behavior, which is misleading for auditors, integrators, and new contributors.
Proposed fix:
At build time, use Vite's ?raw import to pull in the actual .rs source files directly: import libRs from '../../rentar-contract/src/lib.rs?raw'
Or generate a JSON snapshot of all source files as part of the CI build step
Remove the hardcoded string copies entirely
Acceptance criteria:
Code viewer displays the actual, current source files
CI build step validates that the displayed code matches rentar-contract/src/
No manual duplication of source code in the portal