WIN-2308041133\Administrator 6 mēneši atpakaļ
vecāks
revīzija
4f99cf9193

+ 4 - 5
extend/blockchain/TronService.php

@@ -94,13 +94,12 @@ class TronService
         if (!self::$trxWallet) {
         if (!self::$trxWallet) {
             return 0;
             return 0;
         }
         }
-//        try {
+        try {
             $balance = self::$trxWallet->balance($address);
             $balance = self::$trxWallet->balance($address);
             return (float)$balance;
             return (float)$balance;
-//        } catch (\Exception $e) {
-//            var_dump($e->getMessage());die();
-//            return 0;
-//        }
+        } catch (\Exception $e) {
+            return 0;
+        }
     }
     }
 
 
 
 

+ 0 - 1
vendor/fenguoz/tron-php/src/TRC20.php

@@ -34,7 +34,6 @@ class TRC20 extends TRX
             'parameter' => $format,
             'parameter' => $format,
             'owner_address' => $address->hexAddress,
             'owner_address' => $address->hexAddress,
         ]);
         ]);
-//        var_dump($body);die();
         if (isset($body->result->code)) {
         if (isset($body->result->code)) {
             throw new TronErrorException(hex2bin($body->result->message));
             throw new TronErrorException(hex2bin($body->result->message));
         }
         }