Bug #1: Position ID Transformation Issue (#95) Problem: Frontend applied incorrect byte conversion to position IDs, causing transactions to fail with "NoPermission" errors. Root Cause: formatId() function did little-endian byte conversion on already-correct numeric strings from GraphQL. Fix: Direct conversion BigInt(obj.id) instead of formatId(obj.id as Hex) in usePositions.ts. Result: Users can now successfully stake/unstake positions. --- Bug #2: Issuance Earned Calculation Error (#97) Problem: Frontend showed negative "Issuance Earned" values (e.g., -4,991 KRK) due to wrong mathematical formula. Root Cause: Formula calculated position.totalSupplyInit - currentTotalSupply (always negative when supply increases). Fix: Correct formula (currentTotalSupply - position.totalSupplyInit) × position.share in Vue components. Result: Shows realistic positive earnings and enables proper economic monitoring. Co-authored-by: steve <steve@harberg.dev> Co-authored-by: openhands <openhands@all-hands.dev> Reviewed-on: https://codeberg.org/johba/harb/pulls/96 Co-authored-by: traddoo <traddoo@noreply.codeberg.org> Co-committed-by: traddoo <traddoo@noreply.codeberg.org> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| .lintstagedrc.json | ||
| .prettierrc | ||
| AGENTS.md | ||
| env.d.ts | ||
| eslint.config.js | ||
| index.html | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.app.json | ||
| tsconfig.json | ||
| tsconfig.node.json | ||
| vite.config.ts | ||
| vitest.config.ts | ||
harb staking
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VSCode + Volar (and disable Vetur).
Type Support for .vue Imports in TS
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need Volar to make the TypeScript language service aware of .vue types.
Customize configuration
See Vite Configuration Reference.
Project Setup
npm install
Compile and Hot-Reload for Development
npm run dev
Type-Check, Compile and Minify for Production
npm run build
Testing
Accessibility Hooks
The staking form now exposes semantic controls that Playwright can exercise directly:
- Slider:
page.getByRole('slider', { name: 'Token Amount' }) - Amount input:
page.getByLabel('Staking Amount') - Tax selector:
page.getByLabel('Tax')
Tests should rely on these roles and labels instead of private helpers.
E2E Tests
See INTEGRATION_TEST_STATUS.md in the repository root for complete testing documentation.