|
@@ -147,14 +147,7 @@ const getAllTokenWithdrawInfoLists = async (obj) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-function readRedis(key) {
|
|
|
- return new Promise((resolve) => {
|
|
|
- redis.redis_get(key).then(result => {
|
|
|
- // console.log("redis_get=", JSON.parse(result)); // Prints "value"
|
|
|
- resolve(result);
|
|
|
- });
|
|
|
- })
|
|
|
-}
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 获取代币价格 -> usdPrice
|
|
@@ -164,7 +157,7 @@ const getAllTotkenPrice = async () => {
|
|
|
console.log('当前环境:', process.env.NODE_ENV);
|
|
|
console.log("getAllTotkenPrice in"); // Prints "value"
|
|
|
var token_price_key = reids_token_config.TOKENPRICE;
|
|
|
- return await readRedis(token_price_key)
|
|
|
+ return await redis.readRedis(token_price_key)
|
|
|
} catch (error) {
|
|
|
console.error("getTotkenPrice=", error);
|
|
|
return toJson(ERROR_CODE_001, null, error.toString());
|