diff --git a/keystone3-firmware-release b/keystone3-firmware-release index 75486a3bc..463a64395 160000 --- a/keystone3-firmware-release +++ b/keystone3-firmware-release @@ -1 +1 @@ -Subproject commit 75486a3bc1fc767f9cb3377a88e36387d3fa767e +Subproject commit 463a643957ae2e2045ec6f257f65646791cab078 diff --git a/src/ui/gui_analyze/gui_analyze.c b/src/ui/gui_analyze/gui_analyze.c index 1ac4829ea..6a5cd76c6 100644 --- a/src/ui/gui_analyze/gui_analyze.c +++ b/src/ui/gui_analyze/gui_analyze.c @@ -70,7 +70,7 @@ const static GuiAnalyze_t g_analyzeArray[] = { REMAPVIEW_ETH, #ifndef COMPILE_SIMULATOR // ethJson, - "{\"name\":\"eth_page\",\"type\":\"tabview\",\"pos\":[36,0],\"size\":[408,900],\"bg_color\":0,\"children\":[{\"type\":\"tabview_child\",\"index\":1,\"tab_name\":\"Overview\",\"font\":\"openSansEnIllustrate\",\"children\":[{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,152],\"bg_opa\":51,\"radius\":24,\"bg_color\":16078897,\"exist_func\":\"GetErc20WarningExist\",\"children\":[{\"type\":\"img\",\"pos\":[24,24],\"img_src\":\"imgWarningRed\"},{\"type\":\"label\",\"text\":\"WARNING\",\"pos\":[68,24],\"font\":\"openSansEnText\",\"text_color\":16078897},{\"type\":\"label\",\"text\":\"unknown_erc20_warning\",\"pos\":[24,68],\"text_color\":16777215,\"font\":\"illustrate\",\"text_width\":360}]},{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,144],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Value\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text\":\"Max Txn Fee\",\"pos\":[24,98],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthValue\",\"pos\":[24,50],\"text_color\":16090890,\"font\":\"openSansEnLittleTitle\"},{\"type\":\"label\",\"text_func\":\"GetEthTxFee\",\"pos\":[156,98],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Network\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthNetWork\",\"pos\":[120,16],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"pos\":[0,16],\"size_func\":\"GetEthToFromSize\",\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"From\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGetFromAddress\",\"text_width\":360,\"pos\":[24,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[24,129],\"exist_func\":\"GetEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetEthEnsName\",\"exist_func\":\"GetEthEnsExist\",\"pos\":[56,126],\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"label\",\"text\":\"To\",\"pos_func\":\"GetEthToLabelPos\",\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text_func\":\"GetEthGetToAddress\",\"text_width\":360,\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[0,11],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetToEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetToEthEnsName\",\"exist_func\":\"GetToEthEnsExist\",\"pos\":[8,0],\"align_to\":-2,\"align\":20,\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"img\",\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetEthContractDataExist\",\"img_src\":\"imgContract\"},{\"type\":\"label\",\"text_func\":\"GetEthContractName\",\"exist_func\":\"GetEthContractDataExist\",\"pos\":[38,8],\"align_to\":-3,\"align\":13,\"font\":\"openSansEnIllustrate\",\"text_color\":10782207}]}]},{\"type\":\"tabview_child\",\"index\":2,\"tab_name\":\"Details\",\"font\":\"openSansEnIllustrate\",\"children\":[{\"table\":{\"FeeMarket\":{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,316],\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Value\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthValue\",\"pos\":[92,16],\"text_color\":16090890,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Fee\",\"pos\":[24,54],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxFee\",\"pos\":[118,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"· Max Fee Price * Gas Limit\",\"pos\":[24,92],\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Priority\",\"pos\":[24,124],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxPriority\",\"pos\":[153,124],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"· Max Priority Fee Price * Gas Limit\",\"pos\":[24,162],\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Fee Price\",\"pos\":[24,194],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxFeePrice\",\"pos\":[169,194],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Priority Fee Price\",\"pos\":[24,232],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxPriorityFeePrice\",\"pos\":[242,232],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Gas Limit\",\"pos\":[24,270],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGasLimit\",\"pos\":[127,270],\"font\":\"openSansEnIllustrate\"}]},\"legacy\":{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,208],\"align\":2,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Value\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthValue\",\"pos\":[92,16],\"text_color\":16090890,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Txn Fee\",\"pos\":[24,54],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthTxFee\",\"pos\":[156,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text_func\":\"GetTxnFeeDesc\",\"pos\":[24,92],\"text_opa\":144,\"font\":\"openSansDesc\"},{\"type\":\"label\",\"text\":\"Gas Price\",\"pos\":[24,124],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGasPrice\",\"pos\":[127,124],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Gas Limit\",\"pos\":[24,162],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGasLimit\",\"pos\":[127,162],\"font\":\"openSansEnIllustrate\"}]}}},{\"type\":\"container\",\"pos\":[16,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Network\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthNetWork\",\"pos\":[120,16],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"exist_func\":\"GetEthContractDataExist\",\"pos\":[0,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Method\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMethodName\",\"pos\":[113,16],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"pos\":[0,16],\"size_func\":\"GetEthToFromSize\",\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"From\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGetFromAddress\",\"text_width\":360,\"pos\":[24,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[24,129],\"exist_func\":\"GetEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetEthEnsName\",\"exist_func\":\"GetEthEnsExist\",\"pos\":[56,126],\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"label\",\"text\":\"To\",\"pos_func\":\"GetEthToLabelPos\",\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text_func\":\"GetEthGetToAddress\",\"text_width\":360,\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[0,11],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetToEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetToEthEnsName\",\"exist_func\":\"GetToEthEnsExist\",\"pos\":[8,0],\"align_to\":-2,\"align\":20,\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"img\",\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetEthContractDataExist\",\"img_src\":\"imgContract\"},{\"type\":\"label\",\"text_func\":\"GetEthContractName\",\"exist_func\":\"GetEthContractDataExist\",\"pos\":[38,8],\"align_to\":-3,\"align\":13,\"font\":\"openSansEnIllustrate\",\"text_color\":10782207}]},{\"type\":\"label\",\"text\":\"Input Data\",\"align_to\":-2,\"align\":13,\"exist_func\":\"GetEthInputDataExist\",\"pos\":[0,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"container\",\"pos\":[0,16],\"size_func\":\"GetEthContractDataSize\",\"exist_func\":\"GetEthInputDataExist\",\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"exist_func\":\"GetEthContractDataNotExist\",\"text_func\":\"GetEthTransactionData\",\"text_width\":360,\"pos\":[24,16],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"exist_func\":\"GetEthContractDataNotExist\",\"text\":\"Unknown Contract\",\"text_width\":360,\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"text_color\":16105777,\"font\":\"openSansEnIllustrate\"},{\"type\":\"container\",\"exist_func\":\"GetEthContractDataNotExist\",\"aflag\":2,\"cb\":\"EthContractLearnMore\",\"pos\":[0,8],\"size\":[144,30],\"align_to\":-2,\"align\":13,\"bg_color\":1907997,\"children\":[{\"type\":\"label\",\"text\":\"Learn More\",\"text_width\":360,\"pos\":[0,0],\"text_color\":1827014,\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"img_src\":\"imgQrcodeTurquoise\",\"pos\":[120,3],\"text_color\":3056500,\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"label\",\"exist_func\":\"GetEthContractDataExist\",\"text\":\"Method\",\"pos\":[24,16],\"text_color\":16777215,\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"exist_func\":\"GetEthContractDataExist\",\"text_func\":\"GetEthMethodName\",\"pos\":[24,54],\"font\":\"openSansEnIllustrate\"},{\"name\":\"contract_data\",\"type\":\"table\",\"width\":360,\"align\":2,\"pos\":[0,100],\"bg_color\":1907997,\"key_width\":30,\"table_func\":\"GetEthContractData\",\"font\":\"openSansEnIllustrate\",\"exist_func\":\"GetEthContractDataExist\"}]}]}]}", + "{\"name\":\"eth_page\",\"type\":\"tabview\",\"pos\":[36,0],\"size\":[408,900],\"bg_color\":0,\"children\":[{\"type\":\"tabview_child\",\"index\":1,\"tab_name\":\"Overview\",\"text_color\":16777215,\"font\":\"openSansEnIllustrate\",\"children\":[{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,144],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Value\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text\":\"Max Txn Fee\",\"pos\":[24,98],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthValue\",\"pos\":[24,50],\"text_color\":16090890,\"font\":\"openSansEnLittleTitle\"},{\"type\":\"label\",\"text_func\":\"GetEthTxFee\",\"pos\":[156,98],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"pos\":[0,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Network\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthNetWork\",\"pos\":[120,16],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"pos\":[0,16],\"size_func\":\"GetEthToFromSize\",\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"From\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGetFromAddress\",\"text_width\":360,\"pos\":[24,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[24,129],\"exist_func\":\"GetEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetEthEnsName\",\"exist_func\":\"GetEthEnsExist\",\"pos\":[56,126],\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"label\",\"text\":\"To\",\"pos_func\":\"GetEthToLabelPos\",\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text_func\":\"GetEthGetToAddress\",\"text_width\":360,\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[0,11],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetToEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetToEthEnsName\",\"exist_func\":\"GetToEthEnsExist\",\"pos\":[8,0],\"align_to\":-2,\"align\":20,\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"img\",\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetEthContractDataExist\",\"img_src\":\"imgContract\"},{\"type\":\"label\",\"text_func\":\"GetEthContractName\",\"exist_func\":\"GetEthContractDataExist\",\"pos\":[38,8],\"align_to\":-3,\"align\":13,\"font\":\"openSansEnIllustrate\",\"text_color\":10782207}]}]},{\"type\":\"tabview_child\",\"index\":2,\"tab_name\":\"Details\",\"font\":\"openSansEnIllustrate\",\"children\":[{\"table\":{\"FeeMarket\":{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,316],\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Value\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthValue\",\"pos\":[92,16],\"text_color\":16090890,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Fee\",\"pos\":[24,54],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxFee\",\"pos\":[118,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"· Max Fee Price * Gas Limit\",\"pos\":[24,92],\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Priority\",\"pos\":[24,124],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxPriority\",\"pos\":[153,124],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"· Max Priority Fee Price * Gas Limit\",\"pos\":[24,162],\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Fee Price\",\"pos\":[24,194],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxFeePrice\",\"pos\":[169,194],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Priority Fee Price\",\"pos\":[24,232],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMaxPriorityFeePrice\",\"pos\":[242,232],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Gas Limit\",\"pos\":[24,270],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGasLimit\",\"pos\":[127,270],\"font\":\"openSansEnIllustrate\"}]},\"legacy\":{\"type\":\"container\",\"pos\":[0,12],\"size\":[408,208],\"align\":2,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Value\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthValue\",\"pos\":[92,16],\"text_color\":16090890,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Max Txn Fee\",\"pos\":[24,54],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthTxFee\",\"pos\":[156,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text_func\":\"GetTxnFeeDesc\",\"pos\":[24,92],\"text_opa\":144,\"font\":\"openSansDesc\"},{\"type\":\"label\",\"text\":\"Gas Price\",\"pos\":[24,124],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGasPrice\",\"pos\":[127,124],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text\":\"Gas Limit\",\"pos\":[24,162],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGasLimit\",\"pos\":[127,162],\"font\":\"openSansEnIllustrate\"}]}}},{\"type\":\"container\",\"pos\":[16,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Network\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthNetWork\",\"pos\":[120,16],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"exist_func\":\"GetEthContractDataExist\",\"pos\":[0,16],\"size\":[408,62],\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"Method\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthMethodName\",\"pos\":[113,16],\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"container\",\"pos\":[0,16],\"size_func\":\"GetEthToFromSize\",\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"text\":\"From\",\"pos\":[24,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"text_func\":\"GetEthGetFromAddress\",\"text_width\":360,\"pos\":[24,54],\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[24,129],\"exist_func\":\"GetEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetEthEnsName\",\"exist_func\":\"GetEthEnsExist\",\"pos\":[56,126],\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"label\",\"text\":\"To\",\"pos_func\":\"GetEthToLabelPos\",\"text_opa\":144,\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"text_func\":\"GetEthGetToAddress\",\"text_width\":360,\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"pos\":[0,11],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetToEthEnsExist\",\"img_src\":\"imgEns\"},{\"type\":\"label\",\"text_func\":\"GetToEthEnsName\",\"exist_func\":\"GetToEthEnsExist\",\"pos\":[8,0],\"align_to\":-2,\"align\":20,\"font\":\"openSansEnIllustrate\",\"text_color\":1827014},{\"type\":\"img\",\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"exist_func\":\"GetEthContractDataExist\",\"img_src\":\"imgContract\"},{\"type\":\"label\",\"text_func\":\"GetEthContractName\",\"exist_func\":\"GetEthContractDataExist\",\"pos\":[38,8],\"align_to\":-3,\"align\":13,\"font\":\"openSansEnIllustrate\",\"text_color\":10782207}]},{\"type\":\"label\",\"text\":\"Input Data\",\"align_to\":-2,\"align\":13,\"exist_func\":\"GetEthInputDataExist\",\"pos\":[0,16],\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"container\",\"pos\":[0,16],\"size_func\":\"GetEthContractDataSize\",\"exist_func\":\"GetEthInputDataExist\",\"align_to\":-2,\"align\":13,\"bg_opa\":31,\"radius\":24,\"children\":[{\"type\":\"label\",\"exist_func\":\"GetEthContractDataNotExist\",\"text_func\":\"GetEthTransactionData\",\"text_width\":360,\"pos\":[24,16],\"font\":\"openSansEnIllustrate\"},{\"type\":\"label\",\"exist_func\":\"GetEthContractDataNotExist\",\"text\":\"Unknown Contract\",\"text_width\":360,\"pos\":[0,8],\"align_to\":-2,\"align\":13,\"text_color\":16105777,\"font\":\"openSansEnIllustrate\"},{\"type\":\"container\",\"exist_func\":\"GetEthContractDataNotExist\",\"aflag\":2,\"cb\":\"EthContractLearnMore\",\"pos\":[0,8],\"size\":[144,30],\"align_to\":-2,\"align\":13,\"bg_color\":1907997,\"children\":[{\"type\":\"label\",\"text\":\"Learn More\",\"text_width\":360,\"pos\":[0,0],\"text_color\":1827014,\"font\":\"openSansEnIllustrate\"},{\"type\":\"img\",\"img_src\":\"imgQrcodeTurquoise\",\"pos\":[120,3],\"text_color\":3056500,\"font\":\"openSansEnIllustrate\"}]},{\"type\":\"label\",\"exist_func\":\"GetEthContractDataExist\",\"text\":\"Method\",\"pos\":[24,16],\"text_color\":16777215,\"font\":\"openSansEnIllustrate\",\"text_opa\":144},{\"type\":\"label\",\"exist_func\":\"GetEthContractDataExist\",\"text_func\":\"GetEthMethodName\",\"pos\":[24,54],\"font\":\"openSansEnIllustrate\"},{\"name\":\"contract_data\",\"type\":\"table\",\"width\":360,\"align\":2,\"pos\":[0,100],\"bg_color\":1907997,\"key_width\":30,\"table_func\":\"GetEthContractData\",\"font\":\"openSansEnIllustrate\",\"exist_func\":\"GetEthContractDataExist\"}]}]}]}", #else PC_SIMULATOR_PATH "/page_eth.json", #endif @@ -998,8 +998,6 @@ GetObjStateFunc GuiTemplateStateFuncGet(char *type) return GetToEthEnsExist; } else if (!strcmp(type, "GetEthContractDataExist")) { return GetEthContractDataExist; - } else if (!strcmp(type, "GetErc20WarningExist")) { - return GetErc20WarningExist; } else if (!strcmp(type, "GetEthContractDataNotExist")) { return GetEthContractDataNotExist; } else if (!strcmp(type, "GetEthInputDataExist")) { diff --git a/src/ui/gui_chain/others/gui_eth.c b/src/ui/gui_chain/others/gui_eth.c index 350094960..b43c519c5 100644 --- a/src/ui/gui_chain/others/gui_eth.c +++ b/src/ui/gui_chain/others/gui_eth.c @@ -715,7 +715,7 @@ static char *CalcSymbol(void *param) } if (isErc20Transfer(eth)) { - return "Unit"; + return "ERC-20 Token"; } EvmNetwork_t network = _FindNetwork(eth->chain_id); @@ -1266,29 +1266,6 @@ static bool GetEthErc20ContractData(void *parseResult) return true; } -bool GetErc20WarningExist(void *indata, void *param) -{ - TransactionParseResult_DisplayETH *result = (TransactionParseResult_DisplayETH *)g_parseResult; - //make sure is erc20 transfer - if (!isErc20Transfer(result->data)) { - return false; - } - //make sure contract data exist - if (g_erc20ContractData == NULL) { - return false; - } - //check known erc20 contract list - TransactionParseResult_EthParsedErc20Transaction *data = (TransactionParseResult_EthParsedErc20Transaction *)g_erc20ContractData; - char *to = result->data->detail->to; - for (size_t i = 0; i < NUMBER_OF_ARRAYS(ERC20_CONTRACTS); i++) { - Erc20Contract_t contract = ERC20_CONTRACTS[i]; - if (strcasecmp(contract.contract_address, to) == 0) { - return false; - } - } - return true; -} - bool GetEthContractFromInternal(char *address, char *inputData) { for (size_t i = 0; i < NUMBER_OF_ARRAYS(ethereum_abi_map); i++) { diff --git a/src/ui/gui_chain/others/gui_eth.h b/src/ui/gui_chain/others/gui_eth.h index f42a378b8..4f6bf6488 100644 --- a/src/ui/gui_chain/others/gui_eth.h +++ b/src/ui/gui_chain/others/gui_eth.h @@ -38,7 +38,6 @@ void GetEthTransactionData(void *indata, void *param, uint32_t maxLen); bool GetEthEnsExist(void *indata, void *param); bool GetToEthEnsExist(void *indata, void *param); bool GetEthContractDataExist(void *indata, void *param); -bool GetErc20WarningExist(void *indata, void *param); bool GetEthContractDataNotExist(void *indata, void *param); void GetEthContractDataSize(uint16_t *width, uint16_t *height, void *param); void *GetEthContractData(uint8_t *row, uint8_t *col, void *param);