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>
97 lines
2.5 KiB
JSON
97 lines
2.5 KiB
JSON
{
|
|
"name": "kraiken-lib",
|
|
"version": "1.0.0",
|
|
"description": "helper functions and snatch selection",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"require": "./dist/index.js",
|
|
"import": "./dist/index.js"
|
|
},
|
|
"./ids": {
|
|
"types": "./dist/ids.d.ts",
|
|
"require": "./dist/ids.js",
|
|
"import": "./dist/ids.js"
|
|
},
|
|
"./taxRates": {
|
|
"types": "./dist/taxRates.d.ts",
|
|
"require": "./dist/taxRates.js",
|
|
"import": "./dist/taxRates.js"
|
|
},
|
|
"./snatch": {
|
|
"types": "./dist/snatch.d.ts",
|
|
"require": "./dist/snatch.js",
|
|
"import": "./dist/snatch.js"
|
|
},
|
|
"./staking": {
|
|
"types": "./dist/staking.d.ts",
|
|
"require": "./dist/staking.js",
|
|
"import": "./dist/staking.js"
|
|
},
|
|
"./subgraph": {
|
|
"types": "./dist/subgraph.d.ts",
|
|
"require": "./dist/subgraph.js",
|
|
"import": "./dist/subgraph.js"
|
|
},
|
|
"./abis": {
|
|
"types": "./dist/abis.d.ts",
|
|
"require": "./dist/abis.js",
|
|
"import": "./dist/abis.js"
|
|
},
|
|
"./version": {
|
|
"types": "./dist/version.d.ts",
|
|
"require": "./dist/version.js",
|
|
"import": "./dist/version.js"
|
|
},
|
|
"./position": {
|
|
"types": "./dist/position.d.ts",
|
|
"require": "./dist/position.js",
|
|
"import": "./dist/position.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"/dist"
|
|
],
|
|
"scripts": {
|
|
"test": "jest",
|
|
"compile": "graphql-codegen",
|
|
"watch": "graphql-codegen -w",
|
|
"lint": "eslint 'src/**/*.ts'",
|
|
"lint:fix": "eslint 'src/**/*.ts' --fix",
|
|
"format": "prettier --write 'src/**/*.ts'",
|
|
"format:check": "prettier --check 'src/**/*.ts'",
|
|
"prepare": "husky install || true"
|
|
},
|
|
"lint-staged": {
|
|
"src/**/*.ts": [
|
|
"eslint --fix",
|
|
"prettier --write"
|
|
]
|
|
},
|
|
"dependencies": {
|
|
"@apollo/client": "^3.9.10",
|
|
"graphql": "^16.8.1",
|
|
"graphql-tag": "^2.12.6"
|
|
},
|
|
"devDependencies": {
|
|
"@graphql-codegen/cli": "^5.0.2",
|
|
"@graphql-codegen/client-preset": "^4.2.5",
|
|
"@graphql-codegen/typescript": "^4.0.6",
|
|
"@graphql-codegen/typescript-operations": "^4.2.0",
|
|
"@graphql-typed-document-node/core": "^3.2.0",
|
|
"@types/jest": "^29.5.12",
|
|
"@types/node": "^24.6.0",
|
|
"@typescript-eslint/eslint-plugin": "^8.45.0",
|
|
"@typescript-eslint/parser": "^8.45.0",
|
|
"eslint": "^9.36.0",
|
|
"husky": "^9.1.7",
|
|
"jest": "^29.7.0",
|
|
"lint-staged": "^16.2.3",
|
|
"prettier": "^3.6.2",
|
|
"ts-jest": "^29.1.2",
|
|
"typescript": "^5.4.3"
|
|
}
|
|
}
|