diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITronService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITronService.java index c5e6787..6939bab 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/ITronService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/ITronService.java @@ -126,7 +126,12 @@ public interface ITronService { * 查询当前地址代理给其他地址的 Stake 2.0 明细。 */ default List 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 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); }