Feat/desktop staking#592
Conversation
- Encoder: add encodeWhalesWithdraw (op 0xDA803EFD) and encodeTfWithdraw, export fee constants (STAKE_GAS_RESERVE_TON, UNSTAKE_*_GAS_TON) - Hook: branch useEncodeStakingUnstake by pool.implementation (Whales/Tf/LiquidTf), add isSendAll for Whales amount=0 optimization - UnstakeForm: TF auto-fills full balance + disables input, pool-aware fee check, Whales isSendAll when amount matches balance - Pool detail: Claim button for non-liquid pools when readyWithdraw > 0, error state fallback, date locale via useDateFormat hook - usePoolInfo: gate on STAKING feature flag, fix cache key (drop amounts) - StakingAmountInput: import STAKE_GAS_RESERVE_TON from encoder - usePortfolioBalances: console.warn for dropped staking positions
- Extract usePoolStakedBalance hook to centralize liquid/non-liquid balance fetching - UnstakeForm always operates in TON (matching iOS), converts TON→tsTON on confirm - Encoder encodeUnstake supports isSendAll for liquid pools (fresh on-chain balance) - Add convertTonToPoolTokenNano with ROUND_DOWN to prevent over-balance burns - Fix StakingEarningsInfo: works for non-liquid pools, correct units for liquid - Simplify PoolDetailPage by replacing ~60 lines of manual resolution with hook - Align getStakingPoolTonAmount priority: liquid balance checked before position
…akingForm Extract shared AmountField visual primitive, UnstakeAmountInput and UnstakeButton — mirroring StakingAmountInput/StakingButton pattern. Eliminates 130 lines of duplicated styled-components.
Return null instead of '' when timer expires. Separate liquid/non-liquid cycle info in UnstakeForm into independent blocks.
Move the visual sign prefixes ("+" and "—") out of staking_action_stake
and staking_action_unstake locale strings into a separate <ActionSign>
element in the component, matching the pattern used by home action
buttons (BuyIcon, SellIcon). Rebuild locales with latest Tolgee data.
Successful WEB deployment 🚀🚀🚀Well done! |
Successful iPad build 🚀🚀🚀Well done! |
590c842 to
db92879
Compare
| languageName: node | ||
| linkType: hard | ||
|
|
||
| "@esbuild/android-arm@npm:0.27.7": |
There was a problem hiding this comment.
а что в yarn.lock? оно должно меняться?
There was a problem hiding this comment.
Должно. Без актуального лока просто не соберется
There was a problem hiding this comment.
ты с той нодой собрал? он по идее не должен меняться сам
| "dev": { | ||
| "dependsOn": ["^dev"], | ||
| "outputs": [".next/**", "dist/**"] | ||
| "cache": false |
There was a problem hiding this comment.
Это чисто для дев режима. Сейчас yarn turbo dev просто не работает, с этими изменениями работает
| "url": "https://github.com/tonkeeper/tonkeeper-web.git" | ||
| }, | ||
| "scripts": { | ||
| "dev:web": "npx turbo dev --filter=@tonkeeper/web --filter=@tonkeeper/uikit --filter=@tonkeeper/locales --parallel", |
There was a problem hiding this comment.
Смысл чтоб сразу запустить сборку трех проектов в дев режиме, чтоб хотрелоад работал. Иначе надо будет в трех терминалах держать сборку проекта, кита и текста
| "storybook": "start-storybook -p 6006", | ||
| "build-storybook": "build-storybook", | ||
| "build": "rm -fr dist && tsc", | ||
| "build": "rm -fr dist && tsc && mkdir -p dist/components/staking && cp -R src/components/staking/assets dist/components/staking/", |
There was a problem hiding this comment.
М? Это сделано чтоб ассеты между проектами не копировать. Сейчас там была проблема что ассеты лежали только для веба и в остальных просто не работали. Просто их отдельно копировать не хотелось, вынес в кит, а учитывая что сборка там обычный tsc, то копирую руками
| }, | ||
| "scripts": { | ||
| "locales": "ts-node ./task/locales", | ||
| "dev": "yarn locales && vite dev", |
There was a problem hiding this comment.
Это не то же самое, что yarn start?
There was a problem hiding this comment.
Тоже самое, но turbo при запуске дергает именно команду dev. В целом наверное можно сделать тут yarn start
No description provided.