瀏覽代碼

验证地址是否以0x开头

afa 4 月之前
父節點
當前提交
81f930ae84
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      application/api/controller/Ledger.php

+ 2 - 4
application/api/controller/Ledger.php

@@ -124,10 +124,8 @@ class Ledger extends Api
         if(empty($amount) || empty($account)){
             $this->error(__('Parameter error'));
         }
-        // 验证地址是否以0x开头
-        if($type == 0 && substr($account, 0, 2) !== '0x'){
-            $this->error(__('Invalid address format, must start with 0x'));
-        }
+        // 
+       
         $real   = bcsub($amount, bcmul(getConfig('frozen_transfer'), $amount, 2), 2) ; // 手续费
         // 启动事务
         Db::startTrans();