Skip to content

Commit 4358b20

Browse files
committed
get the last wallet xxx option
1 parent e949323 commit 4358b20

1 file changed

Lines changed: 1 addition & 1 deletion

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) {

0 commit comments

Comments
 (0)