Skip to content

Commit eb8a8e8

Browse files
authored
Update messagewizwiz.php
1 parent 43b417b commit eb8a8e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

settings/messagewizwiz.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
$rateLimit = $botState['rateLimit']??0;
77
if(time() > $rateLimit){
8-
$rate = json_decode(file_get_contents("https://api.changeto.technology/api/rate"),true)['result'];
9-
if(!empty($rate['USD'])) $botState['USDRate'] = $rate['USD'];
10-
if(!empty($rate['TRX'])) $botState['TRXRate'] = $rate['TRX'];
8+
$rate = json_decode(curl_get_file_contents("https://api.pooleno.ir/v1/currency/short-name/trx?type=buy"),true);
9+
$botState['USDRate'] = round($rate['priceUsdt'],2);
10+
$botState['TRXRate'] = round($rate['priceFiat'] / 10,2);
1111
$botState['rateLimit'] = strtotime("+1 hour");
1212

1313
$stmt = $connection->prepare("SELECT * FROM `setting` WHERE `type` = 'BOT_STATES'");

0 commit comments

Comments
 (0)