This commit is contained in:
aozhiwei 2023-08-23 12:16:08 +08:00
parent 80b6f7f1dc
commit 2d792b5983

View File

@ -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;
}
/*