-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
@@ -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<{ |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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; | ||
}>; |
There was a problem hiding this comment.
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 资产),该如何支持呢?是在这个接口上扩展,还是新开一个接口?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM👍
related issue: #1