Repository navigation
feat(destroy): add asset destroy feature for BioForest chains - #198
Merged
Merged
Conversation
BioForest chain timestamps are relative to the genesis block's beginEpochTime, not absolute Unix timestamps. This fix adds the epoch time offset to correctly display transaction times. Before: timestamps showed 1970 (only relative seconds * 1000) After: timestamps show correct dates (relative seconds * 1000 + epochTime) Changes: - Add getBeginEpochTime() to fetch and cache epoch time from SDK - Add toAbsoluteTimestamp() helper for timestamp conversion - Fix getTransaction() to use absolute timestamps - Fix getTransactionHistory() to use absolute timestamps
- Add top-level await to load labels from GitHub at startup - Add getLabels() to list all available labels with colors - Add createLabel() and ensureLabels() for label management - Add --create-labels flag to auto-create missing labels - Add --list-labels flag to display available labels grouped by prefix - Update createIssue/createPr to validate labels before creation Usage: pnpm agent task start --list-labels pnpm agent task start --type service --title 'Feature' --create-labels
Add [skip ci] to initial commit message to avoid triggering CI runners for draft PRs. CI will run normally when task submit is called.
- Document workflow stages (start → develop → submit) - Explain CI skip behavior for draft PRs - Document label management features - Add color inference rules for new labels
Rename the MCP tool from 'workflow' to 'use' for cleaner API: - workflow___workflow -> workflow___use - Update examples in dynamic description
- Add RuntimeContext to detect MCP vs CLI mode
- Support async description: string | () => string | () => Promise<string>
- Add formatScenarios() and formatDataSection() mode-aware formatters
- MCP mode set automatically in buildToolDescription and executeWorkflow
Usage example:
description: async () => {
const labels = await getLabels();
return `Task management\n\n${formatScenarios('task', scenarios)}\n\n${formatDataSection('Labels', labels)}`;
}
- Add AssetSelector component for selecting transfer/destroy assets - Add TokenItem renderActions slot for custom action menus - Create useBurn hook with bioforest-specific destroy logic - Add DestroyPage with confirmation flow - Enhance SendPage with AssetSelector for non-native assets - Add WalletTab token menu (transfer/destroy options) - Add bio_destroyAsset miniapp ecosystem handler - Add MiniappDestroyConfirmJob sheet - Add i18n translations (zh-CN, en) - Add unit tests (25 new tests passed)
- str`...` returns () => Promise<string> - str.scenarios(args) returns () => string - str.data(title, items) returns () => string - Remove StrPlaceholder wrapper, just use functions
…s, and more button - Add onContextMenu prop to TokenItem with (event, token, context) signature - Add long-press support (500ms) for touch devices - Add more button (IconDotsVertical) when onContextMenu is provided - Refactor WalletTab to use Sheet-based action menu instead of DropdownMenu - Add token-item-actions.test.tsx with 9 tests for the feature
- str`` tagged template returns () => Promise<string> - str.scenarios(args) formats commands based on runtime mode (CLI vs MCP) - str.data(title, items) formats data sections by mode - Resolve async descriptions in meta.mcp.ts with WorkflowNameContext - Update task.workflow.ts to use str template for start workflow
- Add WithContextMenu and ContextMenuList stories to token-item.stories.tsx - Fix DestroyPage story to remove non-existent imports - Create token-item-context-menu.spec.ts with 3 tests for context menu feature - Add baseline screenshots for visual regression testing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add complete asset destroy (销毁) functionality for BioForest chains, along with enhanced asset selection for transfers.
Features
1. Asset Selector Component
AssetSelectorcomponent with Sheet-based UI2. Destroy Page (
/destroy)3. SendPage Enhancement
AssetSelectorfor non-native token transfersassetTypeandassetLockedroute params4. WalletTab Token Menu
5. Miniapp Ecosystem Support
bio_destroyAssetpermission and handlerMiniappDestroyConfirmJobconfirmation sheet6. SDK Extensions
createDestroyTransaction()getDestroyTransactionMinFee()getAssetDetail()for applyAddress lookupTesting
Files Changed