添加一场处理
This commit is contained in:
1 parent
df5512838b
commit
3f161c86d1
1 file changed
+12
-2
@@ -126,7 +126,12 @@ public interface ITronService {
|
||||
* 查询当前地址代理给其他地址的 Stake 2.0 明细。
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -135,7 +140,12 @@ public interface ITronService {
|
||||
*/
|
||||
default List<DelegatedResourceDetailVo> acquiredDelegatedResourceDetails(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.getFromAccountsList(), false);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user