@33cn/chain33-transaction-parser
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -78,4 +78,4 @@ "use strict"; | ||
} | ||
return tools.utf82rstr(tools.hex2str(note)); | ||
return tools.utf82rstr(tools.hex2str(note.substr(2))); | ||
} | ||
exports.parseTransferNote = parseTransferNote; |
{ | ||
"name": "@33cn/chain33-transaction-parser", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"description": "解析交易", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -85,3 +85,3 @@ import txmap from './txmap' | ||
} | ||
return tools.utf82rstr(tools.hex2str(note)) | ||
return tools.utf82rstr(tools.hex2str(note.substr(2))) | ||
} |
@@ -54,5 +54,5 @@ /** | ||
describe('the hexadecimal should be parse into utf-8 chars', () => { | ||
it('"0xe5ae89e585a8e694afe587bae8b4b9e794a83a20313030303030" should be " 安全支出费用: 100000"', () => { | ||
should(parseTransferNote('0xe5ae89e585a8e694afe587bae8b4b9e794a83a20313030303030')).be.equal('\u0000安全支出费用: 100000') | ||
it('"0xe5ae89e585a8e694afe587bae8b4b9e794a83a20313030303030" should be "安全支出费用: 100000"', () => { | ||
should(parseTransferNote('0xe5ae89e585a8e694afe587bae8b4b9e794a83a20313030303030')).be.equal('安全支出费用: 100000') | ||
}) | ||
}) |
23832