mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 12:15:51 +00:00
Fix typo in invalid MemoData error
This commit is contained in:
@@ -612,7 +612,7 @@ Transaction.prototype.addMemo = function(type, data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!/(undefined|string)/.test(typeof 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) {
|
function toHex(str) {
|
||||||
|
|||||||
@@ -1050,7 +1050,7 @@ describe('Transaction', function() {
|
|||||||
|
|
||||||
assert.throws(function() {
|
assert.throws(function() {
|
||||||
transaction.addMemo(1);
|
transaction.addMemo(1);
|
||||||
}, 'MemoType must be a string');
|
}, /^Error: MemoType must be a string$/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Add Memo - invalid MemoData', function() {
|
it('Add Memo - invalid MemoData', function() {
|
||||||
@@ -1059,7 +1059,7 @@ describe('Transaction', function() {
|
|||||||
|
|
||||||
assert.throws(function() {
|
assert.throws(function() {
|
||||||
transaction.addMemo('key', 1);
|
transaction.addMemo('key', 1);
|
||||||
}, 'MemoData must be a string');
|
}, /^Error: MemoData must be a string$/);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Construct AccountSet transaction', function() {
|
it('Construct AccountSet transaction', function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user