添加一场处理

This commit is contained in:
lu7213 committed 2026-10-12 03:32:57 -04:00
1 parent df5512838b
commit 3f161c86d1
1 file changed
+12 -2
@@ -126,7 +126,12 @@ public interface ITronService {
* 查询当前地址代理给其他地址的 Stake 2.0 明细。 * 查询当前地址代理给其他地址的 Stake 2.0 明细。
*/ */
default List<DelegatedResourceDetailVo> delegatedResourceDetails(ApiWrapper api, String ownerAddr) { default List<DelegatedResourceDetailVo> delegatedResourceDetails(ApiWrapper api, String ownerAddr) {
Response.DelegatedResourceAccountIndex index = api.getDelegatedResourceAccountIndexV2(ownerAddr); Response.DelegatedResourceAccountIndex index = null;
try {
index = api.getDelegatedResourceAccountIndexV2(ownerAddr);
} catch (IllegalException e) {
throw new RuntimeException(e);
}
return buildDelegatedResourceDetails(api, ownerAddr, index.getToAccountsList(), true); return buildDelegatedResourceDetails(api, ownerAddr, index.getToAccountsList(), true);
} }
@@ -135,7 +140,12 @@ public interface ITronService {
*/ */
default List<DelegatedResourceDetailVo> acquiredDelegatedResourceDetails(ApiWrapper api, default List<DelegatedResourceDetailVo> acquiredDelegatedResourceDetails(ApiWrapper api,
String ownerAddr) { String ownerAddr) {
Response.DelegatedResourceAccountIndex index = api.getDelegatedResourceAccountIndexV2(ownerAddr); Response.DelegatedResourceAccountIndex index = null;
try {
index = api.getDelegatedResourceAccountIndexV2(ownerAddr);
} catch (IllegalException e) {
throw new RuntimeException(e);
}
return buildDelegatedResourceDetails(api, ownerAddr, index.getFromAccountsList(), false); return buildDelegatedResourceDetails(api, ownerAddr, index.getFromAccountsList(), false);
} }