From d57bce65e8d139032cc12900adccd87f0b439374 Mon Sep 17 00:00:00 2001 From: artpoddybnyy Date: Thu, 13 Jun 2019 12:56:40 +0300 Subject: [PATCH 1/2] added headers for send func --- src/blockchain/transport.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/blockchain/transport.js b/src/blockchain/transport.js index b045415..76dae62 100644 --- a/src/blockchain/transport.js +++ b/src/blockchain/transport.js @@ -18,7 +18,7 @@ const ATTEMPT_TIMEOUT = 500 * @param {number} timeout * @return {Promise} */ -export function send (explorerBasePath, type, data, secretKey, attempts, timeout) { +export function send (explorerBasePath, type, data, secretKey, headers, attempts, timeout) { if (typeof explorerBasePath !== 'string') { throw new TypeError('Explorer base path endpoint of wrong data type is passed. String is required.') } @@ -63,7 +63,7 @@ export function send (explorerBasePath, type, data, secretKey, attempts, timeout return axios.post(`${explorerBasePath}`, { tx_body: txBody - }).then(() => { + }, headers).then(() => { if (attempts === 0) { return txHash } From 0d9df3a3e37b2dd46aec1b6d298ccf6a06944a84 Mon Sep 17 00:00:00 2001 From: artpoddybnyy Date: Thu, 13 Jun 2019 13:17:03 +0300 Subject: [PATCH 2/2] headers as last param --- src/blockchain/transport.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/blockchain/transport.js b/src/blockchain/transport.js index 76dae62..fb6385e 100644 --- a/src/blockchain/transport.js +++ b/src/blockchain/transport.js @@ -18,7 +18,7 @@ const ATTEMPT_TIMEOUT = 500 * @param {number} timeout * @return {Promise} */ -export function send (explorerBasePath, type, data, secretKey, headers, attempts, timeout) { +export function send (explorerBasePath, type, data, secretKey, attempts, timeout, headers) { if (typeof explorerBasePath !== 'string') { throw new TypeError('Explorer base path endpoint of wrong data type is passed. String is required.') }