From 2d792b5983f686e7bf7d2441277fa73055bdc20d Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 23 Aug 2023 12:16:08 +0800 Subject: [PATCH] 1 --- webapp/services/BlockChainService.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webapp/services/BlockChainService.php b/webapp/services/BlockChainService.php index 5139d8de..079b824e 100644 --- a/webapp/services/BlockChainService.php +++ b/webapp/services/BlockChainService.php @@ -197,8 +197,7 @@ class BlockChainService { break; default: { - error_log("unknow currencyName " . $currencyName); - die(); + return false; } break; } @@ -207,6 +206,9 @@ class BlockChainService { public static function parseCurrencyVal($currencyName, $val, &$intVal, &$floatVal) { $decimals = self::getCurrencyDecimals($currencyName); + if ($decimals === false) { + return false; + } $intVal = '0'; $floatVal = '0'; if (strlen($val) <= $decimals) { @@ -215,6 +217,7 @@ class BlockChainService { $intVal = substr($val, 0, $decimals); $floatVal = substr($val, $decimals); } + return true; } /*