feat(miniapps/teleport): 一键传送后端 API 对接 #142
Merged
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.
概述
对接一键传送(Teleport)小程序的 MetaBox payment 后端 API。
主要更改
API 服务层 (
src/api/)types.ts: 定义传送相关的所有类型(基于 @bnqkl/metabox-core@0.5.2)client.ts: API 客户端,对接https://api.eth-metaverse.com/payment/hooks.ts: React Query hooks(useTransmitAssetTypeList, useTransmit 等)App.tsx 重构
i18n 更新
测试套件
api/client.test.ts: 测试 API 客户端所有方法api/hooks.test.tsx: 测试 React Query hooksApp.test.tsx: 测试组件交互待确认事项
与后端确认:
fromTrJson.signTransData的格式要求(是否需要 0x 前缀)toTrInfo什么时候可以不传(空投场景?)依赖
新增:
测试