bfx-api-node-models
Advanced tools
Comparing version 1.1.4 to 1.1.5
@@ -5,2 +5,4 @@ 'use strict' | ||
const _isFinite = require('lodash/isFinite') | ||
const _isString = require('lodash/isString') | ||
const _isEmpty = require('lodash/isEmpty') | ||
const { prepareAmount, preparePrice } = require('bfx-api-node-util') | ||
@@ -77,2 +79,3 @@ | ||
* @param {number} data.placedId | ||
* @param {string?} data.affiliateCode | ||
* @param {Object?} apiInterface - saved for a later call to registerListeners() | ||
@@ -91,2 +94,3 @@ */ | ||
this.affiliateCode = data.affiliateCode | ||
this._apiInterface = apiInterface | ||
@@ -468,2 +472,8 @@ | ||
toNewOrderPacket () { | ||
const meta = { ...(this.meta || {}) } | ||
if (_isString(this.affiliateCode) && !_isEmpty(this.affiliateCode)) { | ||
meta.aff_code = this.affiliateCode // eslint-disable-line | ||
} | ||
const data = { | ||
@@ -476,3 +486,3 @@ gid: this.gid, | ||
flags: this.flags || 0, | ||
meta: this.meta, // optional | ||
meta, | ||
@@ -479,0 +489,0 @@ // optional, populated only for new orders; it is mtsTIF for existing orders |
{ | ||
"name": "bfx-api-node-models", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "Object models for usage with the Bitfinex node API", | ||
@@ -5,0 +5,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
180658
4140