diff --git a/app/src/main/java/com/alphawallet/app/ui/FunctionActivity.java b/app/src/main/java/com/alphawallet/app/ui/FunctionActivity.java index b072705b4b..481292b0fc 100644 --- a/app/src/main/java/com/alphawallet/app/ui/FunctionActivity.java +++ b/app/src/main/java/com/alphawallet/app/ui/FunctionActivity.java @@ -167,7 +167,8 @@ private void displayFunction(String tokenAttrs) TSAction action = functions.get(actionMethod); String magicValues = viewModel.getAssetDefinitionService().getMagicValuesForInjection(token.tokenInfo.chainId); - if (Objects.equals(action.view.getUrl(), "")){ + if (Objects.equals(action.view.getUrl(), "")) + { String injectedView = tokenView.injectWeb3TokenInit(action.view.getTokenView(), tokenAttrs, tokenId); injectedView = tokenView.injectJSAtEnd(injectedView, magicValues); injectedView = tokenView.injectStyleAndWrapper(injectedView, action.style + "\n" + action.view.getStyle()); diff --git a/lib/src/main/java/com/alphawallet/token/entity/TSTokenView.java b/lib/src/main/java/com/alphawallet/token/entity/TSTokenView.java index 57c7fa84fb..2edf7c22e8 100644 --- a/lib/src/main/java/com/alphawallet/token/entity/TSTokenView.java +++ b/lib/src/main/java/com/alphawallet/token/entity/TSTokenView.java @@ -33,7 +33,8 @@ public TSTokenView(Element element, TokenDefinition tokenDef) private void generateTokenView(Element element) { - if (!Objects.equals(this.getUrl(), "")){ + if (!Objects.equals(this.getUrl(), "")) + { return; } @@ -80,7 +81,8 @@ private void generateTokenView(Element element) public String getTokenView() { - if (tokenView.isEmpty()){ + if (tokenView.isEmpty()) + { generateTokenView(this.element); } @@ -89,7 +91,8 @@ public String getTokenView() public String getStyle() { - if (style.isEmpty()){ + if (style.isEmpty()) + { generateTokenView(this.element); } diff --git a/lib/src/main/java/com/alphawallet/token/tools/TokenDefinition.java b/lib/src/main/java/com/alphawallet/token/tools/TokenDefinition.java index 7c6c88ba49..a82d460e60 100644 --- a/lib/src/main/java/com/alphawallet/token/tools/TokenDefinition.java +++ b/lib/src/main/java/com/alphawallet/token/tools/TokenDefinition.java @@ -781,7 +781,9 @@ public boolean isSchemaLessThanMinimum() { if (nameSpace == null) + { return true; + } int dateIndex = nameSpace.indexOf(TOKENSCRIPT_BASE_URL) + TOKENSCRIPT_BASE_URL.length(); int lastSeparator = nameSpace.lastIndexOf("/");