Skip to content

Commit 95dc807

Browse files
authored
Merge pull request #8 from ezeswci/fix-ledgers
get the last wallet xxx option
2 parents e949323 + e1087f6 commit 95dc807

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/ledger_entry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class LedgerEntry extends Model {
1818
constructor (data = {}) {
1919
super(data, FIELDS, BOOL_FIELDS, FIELD_KEYS)
2020
const spl = this.description.split('wallet')
21-
this.wallet = (spl && spl[1]) ? spl[1].trim() : null
21+
this.wallet = (spl && spl.length > 1) ? spl[spl.length - 1].trim() : null
2222
}
2323

2424
static unserialize (arr) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "bfx-api-node-models",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "Object models for usage with the Bitfinex node API",
55
"engines": {
66
"node": ">=7"

0 commit comments

Comments
 (0)