|
@@ -1,4 +1,3 @@
|
|
-
|
|
|
|
const axios = require('axios');
|
|
const axios = require('axios');
|
|
|
|
|
|
|
|
|
|
@@ -8,11 +7,11 @@ const logger = require('./logger.js');
|
|
var url = account_config.CZZ_BASEURL
|
|
var url = account_config.CZZ_BASEURL
|
|
|
|
|
|
|
|
|
|
-const withdraw = async (params) => {
|
|
+const withdraw = async(params) => {
|
|
params.privateKey = ''
|
|
params.privateKey = ''
|
|
params.toAddress = params.receiver
|
|
params.toAddress = params.receiver
|
|
logger.info('http-withdraw', process.env.NODE_ENV, url, ' params ', params)
|
|
logger.info('http-withdraw', process.env.NODE_ENV, url, ' params ', params)
|
|
- var data = { ...params }
|
|
+ var data = {...params }
|
|
return new Promise(resolve => {
|
|
return new Promise(resolve => {
|
|
axios.post(url + '/withdraw', data, { timeout: 5 * 60 * 1000 })
|
|
axios.post(url + '/withdraw', data, { timeout: 5 * 60 * 1000 })
|
|
.then(res => {
|
|
.then(res => {
|
|
@@ -26,7 +25,7 @@ const withdraw = async (params) => {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
-const check_withdraw_status = async (params) => {
|
|
+const check_withdraw_status = async(params) => {
|
|
logger.info('txn_status_czz', process.env.NODE_ENV, url, ' params ', params)
|
|
logger.info('txn_status_czz', process.env.NODE_ENV, url, ' params ', params)
|
|
var pars = {
|
|
var pars = {
|
|
txn_hash: params.hash,
|
|
txn_hash: params.hash,
|