Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update infolist api #7

Merged
merged 3 commits into from
Dec 27, 2024
Merged

feat: update infolist api #7

merged 3 commits into from
Dec 27, 2024

Conversation

PainterPuppets
Copy link
Contributor

@PainterPuppets PainterPuppets commented Dec 26, 2024

related issue: #1

@@ -18,19 +18,35 @@ declare const appRouter: _trpc_server_unstable_core_do_not_import.BuiltRouter<{
errorShape: _trpc_server_unstable_core_do_not_import.DefaultErrorShape;
transformer: true;
}, {
infoList: _trpc_server.TRPCQueryProcedure<{
coinList: _trpc_server.TRPCQueryProcedure<{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the router only work with xUDT? If so, it should be changed to xudtList for clarity.

Copy link

@yixyxiu yixyxiu Dec 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API returns more than just xUDT types. It should at least include some custom UDT types. Once SSRI is ready, there will be even more types, but they all belong to the category of Coin, or you could say Token or UDT. Which one do you think fits better—coinList , tokenList, or udtList? I have no preference.

output: {
balance: string;
} | null;
}>;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里有一些问题。

首先:某一个地址下,它可能有多种资产,output返回的是一个资产列表的数组;
其次,资产列表里的每个元素,需要带上UDT的基本信息(name, symbol, typeHash等),以及balance、price(该资产的价格);
另外:addressHoldAssets 这个名字看上去是会包含udt 和 dob 等资产的,下一期如果要支持显示某个地址下的 DOBs 列表(前端通过切换不同的tab显示coins 和 dobs 资产),该如何支持呢?是在这个接口上扩展,还是新开一个接口?

Copy link

@yixyxiu yixyxiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM👍

@PainterPuppets PainterPuppets merged commit abb1a62 into develop Dec 27, 2024
@PainterPuppets PainterPuppets deleted the update_infolist_api branch December 27, 2024 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants