diff --git a/src/js/ripple/transaction.js b/src/js/ripple/transaction.js index cbb0b018..a4d0b524 100644 --- a/src/js/ripple/transaction.js +++ b/src/js/ripple/transaction.js @@ -612,7 +612,7 @@ Transaction.prototype.addMemo = function(type, data) { } if (!/(undefined|string)/.test(typeof data)) { - throw new Error('MemoData must be string'); + throw new Error('MemoData must be a string'); } function toHex(str) { diff --git a/test/transaction-test.js b/test/transaction-test.js index df7aae62..35ba628b 100644 --- a/test/transaction-test.js +++ b/test/transaction-test.js @@ -1050,7 +1050,7 @@ describe('Transaction', function() { assert.throws(function() { transaction.addMemo(1); - }, 'MemoType must be a string'); + }, /^Error: MemoType must be a string$/); }); it('Add Memo - invalid MemoData', function() { @@ -1059,7 +1059,7 @@ describe('Transaction', function() { assert.throws(function() { transaction.addMemo('key', 1); - }, 'MemoData must be a string'); + }, /^Error: MemoData must be a string$/); }); it('Construct AccountSet transaction', function() {