Browse Source

验证地址是否以0x开头

afa 4 months ago
parent
commit
81f930ae84
1 changed files with 2 additions and 4 deletions
  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();