Skip to content

Commit

Permalink
#noticket createTokenWebHook update
Browse files Browse the repository at this point in the history
  • Loading branch information
anastasov-menasoft committed Dec 20, 2019
1 parent 053e7cc commit 84d5309
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 2019-12-20, Version 4.1.1

#### Breaking changes:
* createTokenWebHook method params updated

## 2019-12-06, Version 4.1.0

#### Notable changes:
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cryptoapis.io",
"version": "4.1.0",
"version": "4.1.1",
"description": "Crypto APIs SDK",
"main": "src/index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/rest-apis/blockchain/ETH/webhook.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ class ETHWebHook extends BaseWebHook {
*
* @param {string} callbackURL - Webhook callback url
* @param {string} address - Address from the blockchain.
* @param {number} confirmations - Receive webhook after a specified number of confirmations.
* @param {object} [optData] - Optional data.
* @param {object} [queryParams] - Additional query parameters.
*
* @returns {*|Promise<any | never>}
*/
createTokenWebHook(callbackURL, address, optData = {}, queryParams = {}) {
createTokenWebHook(callbackURL, address, confirmations, optData = {}, queryParams = {}) {
const data = {
...optData,
event: EVENT.ETH.TOKEN,
url: callbackURL,
address: address,
confirmations: confirmations,
};

return this.request.post(this.basePath + this.getSelectedNetwork() + '/hooks', data, queryParams);
Expand Down

0 comments on commit 84d5309

Please sign in to comment.