瀏覽代碼

Rwa兑换

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

+ 2 - 2
application/api/controller/Exchange.php

@@ -72,11 +72,11 @@ class Exchange extends Api
           $type_id           = $this->request->post('type_id');           // 类型0U 1茶宝
           $coin_from_address = $this->request->post('coin_from_address'); // 代码转入地址
           $usdt_from_address = $this->request->post('usdt_from_address'); // U转入地址
-          if (empty($ids) || empty($usdt_from_address)) {
+          if (empty($ids) ) {
               $this->error(__('Parameter error'));
           }
           //检查区块链地址是否合法
-          if(!(isErc20AddressValid($usdt_from_address))){
+          if(!empty($usdt_from_address) &&  !(isErc20AddressValid($usdt_from_address))){
               $this->error(__('Invalid parameters'));
           }
           //福利兑换记录