diff --git a/ledgerjs-fio/src/interactions/transactionTemplates/commands.ts b/ledgerjs-fio/src/interactions/transactionTemplates/commands.ts index 572c1744..600441bf 100644 --- a/ledgerjs-fio/src/interactions/transactionTemplates/commands.ts +++ b/ledgerjs-fio/src/interactions/transactionTemplates/commands.ts @@ -413,30 +413,28 @@ export function ADD_STORAGE_CHECK(check: VALUE_STORAGE_COMPARE, c: Command): Com } } -export function COMMAND_APPEND_DATA_MEMO_HASH(memo?: VarlenAsciiString, hash?: VarlenAsciiString, offline_url?: VarlenAsciiString): Command { - var varData: Buffer = Buffer.from(""); - if (memo === undefined) { - validate(hash !== undefined, InvalidDataReason.INVALID_HASH); - validate(offline_url !== undefined, InvalidDataReason.INVALID_OFFLINE_URL); - varData = Buffer.concat([ - Buffer.from("0001", "hex"), - varuint32_to_buf(hash.length), - Buffer.from(hash), - Buffer.from("01", "hex"), - varuint32_to_buf(offline_url.length), - Buffer.from(offline_url), - ]) +function serializeOptionalString(str?: VarlenAsciiString): Buffer { + if (str === undefined) { + return Buffer.from("00", "hex") } else { - validate(hash === undefined, InvalidDataReason.INVALID_HASH); - validate(hash === undefined, InvalidDataReason.INVALID_OFFLINE_URL); - varData = Buffer.concat([ + return Buffer.concat([ Buffer.from("01", "hex"), - varuint32_to_buf(memo.length), - Buffer.from(memo), - Buffer.from("0000", "hex"), + varuint32_to_buf(str.length), + Buffer.from(str), ]) } +} + +export function COMMAND_APPEND_DATA_MEMO_HASH(memo?: VarlenAsciiString, hash?: VarlenAsciiString, offline_url?: VarlenAsciiString): Command { + validate((hash !== undefined && offline_url !== undefined) || (hash === undefined && offline_url === undefined), InvalidDataReason.INVALID_HASH); + + const varData = Buffer.concat([ + serializeOptionalString(memo), + serializeOptionalString(hash), + serializeOptionalString(offline_url), + ]) + return { ...defaultCommand, command: COMMAND.APPEND_DATA, diff --git a/src/decodeDH.c b/src/decodeDH.c index 7e1a28cf..84a082cf 100644 --- a/src/decodeDH.c +++ b/src/decodeDH.c @@ -122,78 +122,62 @@ static void decodeNewfundsreqMemo_ui_runStep() { } enum { - DECODE_NEWFUNDSREQ_HASH_UI_STEP_MESSAGE1 = 250, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_MESSAGE2, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_PAYEE_PUBLIC_ADDRESS, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_AMOUNT, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_CHAIN_CODE, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_TOKEN_CODE, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_HASH, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_OFFLINE_URL, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_CONFIRM, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_RESPOND, - DECODE_NEWFUNDSREQ_HASH_UI_STEP_INVALID, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_MESSAGE1 = 250, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_MESSAGE2, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_PAYEE_PUBLIC_ADDRESS, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_AMOUNT, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_CHAIN_CODE, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_TOKEN_CODE, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_CONFIRM, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_RESPOND, + DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_INVALID, }; -static void decodeNewfundsreqHash_ui_runStep() { +static void decodeNewfundsreqNoMemo_ui_runStep() { TRACE("UI step %d", ctx->ui_step); - ui_callback_fn_t *this_fn = decodeNewfundsreqHash_ui_runStep; + ui_callback_fn_t *this_fn = decodeNewfundsreqNoMemo_ui_runStep; UI_STEP_BEGIN(ctx->ui_step, this_fn); - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_MESSAGE1) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_MESSAGE1) { ui_displayPaginatedText("Decrypt content", "", this_fn); } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_MESSAGE2) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_MESSAGE2) { ui_displayPaginatedText("Interpreting", "the message as Request funds", this_fn); } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_PAYEE_PUBLIC_ADDRESS) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_PAYEE_PUBLIC_ADDRESS) { ui_displayAsciiBufferScreen("Payee public address", ctx->parsedContent.payee_public_address->data, ctx->parsedContent.payee_public_address->length, this_fn); } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_AMOUNT) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_AMOUNT) { ui_displayAsciiBufferScreen("Amount", ctx->parsedContent.amount->data, ctx->parsedContent.amount->length, this_fn); } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_CHAIN_CODE) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_CHAIN_CODE) { ui_displayAsciiBufferScreen("Chain code", ctx->parsedContent.chain_code->data, ctx->parsedContent.chain_code->length, this_fn); } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_TOKEN_CODE) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_TOKEN_CODE) { ui_displayAsciiBufferScreen("Token code", ctx->parsedContent.token_code->data, ctx->parsedContent.token_code->length, this_fn); } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_HASH) { - ASSERT(ctx->parsedContent.hash != NULL); - ui_displayAsciiBufferScreen("Hash", - ctx->parsedContent.hash->data, - ctx->parsedContent.hash->length, - this_fn); - } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_OFFLINE_URL) { - ASSERT(ctx->parsedContent.offline_url != NULL); - ui_displayAsciiBufferScreen("Offline URL", - ctx->parsedContent.offline_url->data, - ctx->parsedContent.offline_url->length, - this_fn); - } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_CONFIRM) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_CONFIRM) { ui_displayPrompt("Confirm", "response", this_fn, dh_respond_with_user_reject); } - UI_STEP(DECODE_NEWFUNDSREQ_HASH_UI_STEP_RESPOND) { + UI_STEP(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_RESPOND) { io_send_buf(SUCCESS, NULL, 0); ui_displayBusy(); // needs to happen after I/O ctx->stage = DECODE_STAGE_SEND_REST; } - UI_STEP_END(DECODE_NEWFUNDSREQ_HASH_UI_STEP_INVALID); + UI_STEP_END(DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_INVALID); } // Parse newfundsreq data @@ -210,18 +194,17 @@ static void decodeNewfundsreqUIFlow() { readOptionalStringWithLength(&read, &ctx->parsedContent.hash); readOptionalStringWithLength(&read, &ctx->parsedContent.offline_url); VALIDATE(read == ctx->bufferLen, ERR_INVALID_DATA); + bool hasMemo = (ctx->parsedContent.memo != NULL); + bool hasHash = (ctx->parsedContent.hash != NULL); + bool hasOfflineUrl = (ctx->parsedContent.offline_url != NULL); + VALIDATE((hasHash && hasOfflineUrl) || (!hasHash && !hasOfflineUrl), ERR_INVALID_DATA); - if (ctx->parsedContent.memo != NULL && ctx->parsedContent.hash == NULL && - ctx->parsedContent.offline_url == NULL) { + if (hasMemo) { ctx->ui_step = DECODE_NEWFUNDSREQ_MEMO_UI_STEP_MESSAGE1; decodeNewfundsreqMemo_ui_runStep(); - } else if (ctx->parsedContent.memo == NULL && ctx->parsedContent.hash != NULL && - ctx->parsedContent.offline_url != NULL) { - ctx->ui_step = DECODE_NEWFUNDSREQ_HASH_UI_STEP_MESSAGE1; - decodeNewfundsreqHash_ui_runStep(); - } else { - THROW(ERR_INVALID_DATA); + ctx->ui_step = DECODE_NEWFUNDSREQ_NOMEMO_UI_STEP_MESSAGE1; + decodeNewfundsreqNoMemo_ui_runStep(); } } @@ -318,101 +301,85 @@ static void decodeRecordobtMemo_ui_runStep() { } enum { - DECODE_RECORDOBT_HASH_UI_STEP_MESSAGE1 = 350, - DECODE_RECORDOBT_HASH_UI_STEP_MESSAGE2, - DECODE_RECORDOBT_HASH_UI_STEP_PAYEE_PUBLIC_ADDRESS, - DECODE_RECORDOBT_HASH_UI_STEP_PAYER_PUBLIC_ADDRESS, - DECODE_RECORDOBT_HASH_UI_STEP_AMOUNT, - DECODE_RECORDOBT_HASH_UI_STEP_CHAIN_CODE, - DECODE_RECORDOBT_HASH_UI_STEP_TOKEN_CODE, - DECODE_RECORDOBT_HASH_UI_STEP_STATUS, - DECODE_RECORDOBT_HASH_UI_STEP_OBT_ID, - DECODE_RECORDOBT_HASH_UI_STEP_HASH, - DECODE_RECORDOBT_HASH_UI_STEP_OFFLINE_URL, - DECODE_RECORDOBT_HASH_UI_STEP_CONFIRM, - DECODE_RECORDOBT_HASH_UI_STEP_RESPOND, - DECODE_RECORDOBT_HASH_UI_STEP_INVALID, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_MESSAGE1 = 350, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_MESSAGE2, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_PAYEE_PUBLIC_ADDRESS, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_PAYER_PUBLIC_ADDRESS, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_AMOUNT, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_CHAIN_CODE, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_TOKEN_CODE, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_STATUS, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_OBT_ID, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_CONFIRM, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_RESPOND, + DECODE_RECORDOBT_NO_MEMO_UI_STEP_INVALID, }; -static void decodeRecordobtHash_ui_runStep() { +static void decodeRecordobtNoMemo_ui_runStep() { TRACE("UI step %d", ctx->ui_step); - ui_callback_fn_t *this_fn = decodeRecordobtHash_ui_runStep; + ui_callback_fn_t *this_fn = decodeRecordobtNoMemo_ui_runStep; UI_STEP_BEGIN(ctx->ui_step, this_fn); - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_MESSAGE1) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_MESSAGE1) { ui_displayPaginatedText("Decrypt content", "", this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_MESSAGE2) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_MESSAGE2) { ui_displayPaginatedText("Interpreting", "the message as Record other blockchain transaction metadata", this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_PAYEE_PUBLIC_ADDRESS) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_PAYEE_PUBLIC_ADDRESS) { ui_displayAsciiBufferScreen("Payee public address", ctx->parsedContent.payee_public_address->data, ctx->parsedContent.payee_public_address->length, this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_PAYER_PUBLIC_ADDRESS) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_PAYER_PUBLIC_ADDRESS) { ui_displayAsciiBufferScreen("Payer public address", ctx->parsedContent.payer_public_address->data, ctx->parsedContent.payer_public_address->length, this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_AMOUNT) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_AMOUNT) { ui_displayAsciiBufferScreen("Amount", ctx->parsedContent.amount->data, ctx->parsedContent.amount->length, this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_CHAIN_CODE) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_CHAIN_CODE) { ui_displayAsciiBufferScreen("Chain code", ctx->parsedContent.chain_code->data, ctx->parsedContent.chain_code->length, this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_TOKEN_CODE) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_TOKEN_CODE) { ui_displayAsciiBufferScreen("Token code", ctx->parsedContent.token_code->data, ctx->parsedContent.token_code->length, this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_STATUS) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_STATUS) { ui_displayAsciiBufferScreen("Status", ctx->parsedContent.status->data, ctx->parsedContent.status->length, this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_OBT_ID) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_OBT_ID) { ui_displayAsciiBufferScreen("Obt ID", ctx->parsedContent.obt_id->data, ctx->parsedContent.obt_id->length, this_fn); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_HASH) { - ASSERT(ctx->parsedContent.hash != NULL); - ui_displayAsciiBufferScreen("Hash", - ctx->parsedContent.hash->data, - ctx->parsedContent.hash->length, - this_fn); - } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_OFFLINE_URL) { - ASSERT(ctx->parsedContent.offline_url != NULL); - ui_displayAsciiBufferScreen("Offline URL", - ctx->parsedContent.offline_url->data, - ctx->parsedContent.offline_url->length, - this_fn); - } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_CONFIRM) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_CONFIRM) { ui_displayPrompt("Confirm", "response", this_fn, dh_respond_with_user_reject); } - UI_STEP(DECODE_RECORDOBT_HASH_UI_STEP_RESPOND) { + UI_STEP(DECODE_RECORDOBT_NO_MEMO_UI_STEP_RESPOND) { io_send_buf(SUCCESS, NULL, 0); ui_displayBusy(); // needs to happen after I/O ctx->stage = DECODE_STAGE_SEND_REST; } - UI_STEP_END(DECODE_RECORDOBT_HASH_UI_STEP_INVALID); + UI_STEP_END(DECODE_RECORDOBT_NO_MEMO_UI_STEP_INVALID); } // Parse newfundsreq data @@ -432,18 +399,17 @@ static void decodeRecordobtUIFlow() { readOptionalStringWithLength(&read, &ctx->parsedContent.hash); readOptionalStringWithLength(&read, &ctx->parsedContent.offline_url); VALIDATE(read == ctx->bufferLen, ERR_INVALID_DATA); + bool hasMemo = (ctx->parsedContent.memo != NULL); + bool hasHash = (ctx->parsedContent.hash != NULL); + bool hasOfflineUrl = (ctx->parsedContent.offline_url != NULL); + VALIDATE((hasHash && hasOfflineUrl) || (!hasHash && !hasOfflineUrl), ERR_INVALID_DATA); - if (ctx->parsedContent.memo != NULL && ctx->parsedContent.hash == NULL && - ctx->parsedContent.offline_url == NULL) { + if (hasMemo) { ctx->ui_step = DECODE_RECORDOBT_MEMO_UI_STEP_MESSAGE1; decodeRecordobtMemo_ui_runStep(); - } else if (ctx->parsedContent.memo == NULL && ctx->parsedContent.hash != NULL && - ctx->parsedContent.offline_url != NULL) { - ctx->ui_step = DECODE_RECORDOBT_HASH_UI_STEP_MESSAGE1; - decodeRecordobtHash_ui_runStep(); - } else { - THROW(ERR_INVALID_DATA); + ctx->ui_step = DECODE_RECORDOBT_NO_MEMO_UI_STEP_MESSAGE1; + decodeRecordobtNoMemo_ui_runStep(); } } diff --git a/src/signTransactionParse.c b/src/signTransactionParse.c index 29bb4177..aa71c715 100644 --- a/src/signTransactionParse.c +++ b/src/signTransactionParse.c @@ -86,38 +86,37 @@ static void displayASCIIStringWithLength(const uint8_t *value, display[strLen] = 0; } +// helper for displayMemoHash +static bool validateOptional(const uint8_t *value, uint8_t valueLen, uint8_t *read) { + VALIDATE(valueLen >= *read + 1, ERR_INVALID_DATA); + uint8_t hasOptional = value[*read]; + if (hasOptional) { + VALIDATE(hasOptional == 1, ERR_INVALID_DATA); + VALIDATE(valueLen >= *read + 2, ERR_INVALID_DATA); + uint8_t optionalLen = value[*read + 1]; + VALIDATE(optionalLen < 127, ERR_INVALID_DATA); + *read += 2 + optionalLen; + return true; + } else { + *read += 1; + return false; + } +} + static void displayMemoHash(const uint8_t *value, uint8_t valueLen, char display[MAX_DISPLAY_VALUE_LENGTH]) { // data format: // hasMemo(0x00/0x01), if yes then memolength (1b, < 127) and memo - // then hash and offline url in the same manner - // Either memo is present, or both hash and offline url. + // hasHash(0x00/0x01), if yes then hashlength (1b, < 127) and hash + // hasOfflineUrl(0x00/0x01), if yes then offlineurllength (1b, < 127) and offlineurl + // hash and offline url have to be present at the same time. TRACE_BUFFER(value, valueLen); - VALIDATE(valueLen >= 1, ERR_INVALID_DATA); - if (value[0] == 1) { // has memo - VALIDATE(valueLen >= 2, - ERR_INVALID_DATA); // this also checks that memo has length at least 1 - size_t memoLen = value[1]; - VALIDATE(memoLen < 127, ERR_INVALID_DATA); - VALIDATE(valueLen == memoLen + 4, - ERR_INVALID_DATA); // has memo, memo length, memo, no hash, no url - VALIDATE(value[2 + memoLen] == 0, ERR_INVALID_DATA); // no hash - VALIDATE(value[3 + memoLen] == 0, ERR_INVALID_DATA); // no offline_url - } else if (value[0] == 0) { // no memo - TRACE("No memo"); - VALIDATE(valueLen >= 3, ERR_INVALID_DATA); - VALIDATE(value[1] == 1, ERR_INVALID_DATA); // has hash - size_t hashLen = value[2]; - VALIDATE(hashLen < 127, ERR_INVALID_DATA); - VALIDATE(valueLen >= hashLen + 5, ERR_INVALID_DATA); - VALIDATE(value[hashLen + 3] == 1, ERR_INVALID_DATA); // has url - size_t urlLen = value[hashLen + 4]; - VALIDATE(urlLen < 127, ERR_INVALID_DATA); - VALIDATE(valueLen == hashLen + urlLen + 5, ERR_INVALID_DATA); - } else { - VALIDATE(false, ERR_INVALID_DATA); - } + uint8_t read = 0; + bool hasMemo = validateOptional(value, valueLen, &read); + bool hasHash = validateOptional(value, valueLen, &read); + bool hasOfflineUrl = validateOptional(value, valueLen, &read); + VALIDATE((hasHash && hasOfflineUrl) || (!hasHash && !hasOfflineUrl), ERR_INVALID_DATA); // These data are not meant to e displayed at themoement snprintf(display, MAX_DISPLAY_VALUE_LENGTH, "NOT IMPLEMENTED"); } diff --git a/test-integration/decodeMessage.js b/test-integration/decodeMessage.js index b0da1113..0929220b 100644 --- a/test-integration/decodeMessage.js +++ b/test-integration/decodeMessage.js @@ -67,13 +67,23 @@ const content4 = { } const content5 = { + payee_public_address: "Payee public address", + amount: "Amount 100", + chain_code: "BTC1", + token_code: "BTC2", + memo: undefined, + hash: undefined, + offline_url: undefined, +} + +const content6 = { payee_public_address: "Payee public address", amount: "Amount 100", chain_code: "BTC1", token_code: "BTC2", memo: "My memo", hash: "My hash", - offline_url: "Offline URL", + offline_url: undefined, } const path = [44 + HARDENED, 235 + HARDENED, 0 + HARDENED, 0, 0] @@ -91,6 +101,7 @@ const encryptedContent2 = sharedCipher.encrypt('new_funds_content', content2) const encryptedContent3 = sharedCipher.encrypt('record_obt_data_content', content3) const encryptedContent4 = sharedCipher.encrypt('record_obt_data_content', content4) const encryptedContent5 = sharedCipher.encrypt('new_funds_content', content5) +const encryptedContent6 = sharedCipher.encrypt('new_funds_content', content6) testStep(" - - -", "await app.decodeMessage() - newfundsreq memo"); { @@ -105,7 +116,7 @@ testStep(" - - -", "await app.decodeMessage() - newfundsreq hash"); { const decodeMessagePromise = app.decodeMessage({path: path, publicKeyHex: otherPublicKey.toUncompressed().toBuffer().toString("hex"), message: encryptedContent2, context: "newfundsreq"}); - await device.review([1, 1, 1, 1, 1, 1, 1, 1], "Review decode message"); + await device.review([1, 1, 1, 1, 1, 1], "Review decode message"); const decodeMessageResponse = await decodeMessagePromise; assert.equal(decodeMessageResponse.message.toString("hex"), "145061796565207075626c696320616464726573730a416d6f756e7420313030044254433104425443320001074d792068617368010b4f66666c696e652055524c") } @@ -124,15 +135,24 @@ testStep(" - - -", "await app.decodeMessage() - recordobt hash"); console.log(encryptedContent4) const decodeMessagePromise = app.decodeMessage({path: path, publicKeyHex: otherPublicKey.toUncompressed().toBuffer().toString("hex"), message: encryptedContent4, context: "recordobt"}); - await device.review([1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1], "Review decode message"); + await device.review([1, 2, 1, 1, 1, 1, 1, 1, 1], "Review decode message"); const decodeMessageResponse = await decodeMessagePromise; assert.equal(decodeMessageResponse.message.toString("hex"), "2d5061796572207075626c696320616464726573732069732076657279206c6f6e672c206c6f6e672c206c6f6e672d5061796565207075626c696320616464726573732069732076657279206c6f6e672c206c6f6e672c206c6f6e670a416d6f756e74203130300442544331044254433206537461747573064f62742049440001234d792068617368206973207175697465206c6f6e6720746f6f2c20746f6f2c20746f6f01224f66666c696e652055524c206973207175697465206c6f6e6720746f6f2c20746f6f") } -testStep(" - - -", "await app.decodeMessage() - newfundsreq invalid both memo and hash"); +testStep(" - - -", "await app.decodeMessage() - newfundsreq no memo no hash no offline url"); { const decodeMessagePromise = app.decodeMessage({path: path, publicKeyHex: otherPublicKey.toUncompressed().toBuffer().toString("hex"), message: encryptedContent5, context: "newfundsreq"}); + await device.review([1, 1, 1, 1, 1, 1], "Review decode message"); + const decodeMessageResponse = await decodeMessagePromise; + assert.equal(decodeMessageResponse.message.toString("hex"), "145061796565207075626c696320616464726573730a416d6f756e742031303004425443310442544332000000") +} + +testStep(" - - -", "await app.decodeMessage() - newfundsreq invalid hash defined offlineurl undefined"); +{ + const decodeMessagePromise = app.decodeMessage({path: path, publicKeyHex: otherPublicKey.toUncompressed().toBuffer().toString("hex"), + message: encryptedContent6, context: "newfundsreq"}); await assert.rejects(decodeMessagePromise, DeviceStatusError); } diff --git a/test-integration/signTransactionNewfundsreq.js b/test-integration/signTransactionNewfundsreq.js index 8e413b98..310d5921 100644 --- a/test-integration/signTransactionNewfundsreq.js +++ b/test-integration/signTransactionNewfundsreq.js @@ -156,6 +156,34 @@ const txHash = { }], } +const txNothing = { + expiration: "2021-08-28T12:50:36.686", + ref_block_num: 0x1122, + ref_block_prefix: 0x33445566, + context_free_actions: [], + actions: [{ + account: "fio.reqobt", + name: "newfundsreq", + authorization: [{ + actor: "aftyershcu22", + permission: "active", + }], + data: { + payer_fio_address: "My payer address", + payee_fio_address: "My payee address", + max_fee: 0x11223344, + tpid: "rewards@wallet", + actor: "aftyershcu22", + + other_public_key: otherPublicKey.toUncompressed().toBuffer().toString("hex"), + payee_public_address: "My payee public address", + amount: "amount 1000", + chain_code: "BTC", + token_code: "BTC", + }, + }], +} + //------------------- SERIALIZE TRANSACTION ------------------------------------------------ async function buildTxUsingFioJs(network, tx, iv) { @@ -277,9 +305,9 @@ testStep(" - - -", "Sign testnet transaction - hash"); await runTxTest("TESTNET", txHash, longSequence, secondSequence) } -testStep(" - - -", "Sign testnet mainnet - hash"); +testStep(" - - -", "Sign testnet mainnet - nothing"); { - await runTxTest("MAINNET", txHash, longSequence, secondSequence) + await runTxTest("MAINNET", txNothing, longSequence, secondSequence) } await transport.close() diff --git a/test-integration/signTransactionRecordobt.js b/test-integration/signTransactionRecordobt.js index 1e62aa89..d56c1fb9 100644 --- a/test-integration/signTransactionRecordobt.js +++ b/test-integration/signTransactionRecordobt.js @@ -171,6 +171,41 @@ const txHash = { }], } +const txAll = { + expiration: "2021-08-28T12:50:36.686", + ref_block_num: 0x1122, + ref_block_prefix: 0x33445566, + context_free_actions: [], + actions: [{ + account: "fio.reqobt", + name: "recordobt", + authorization: [{ + actor: "aftyershcu22", + permission: "active", + }], + data: { + fio_request_id: "", + payer_fio_address: "My payer address", + payee_fio_address: "My payee address", + max_fee: 0x11223344, + tpid: "rewards@wallet", + actor: "aftyershcu22", + + other_public_key: otherPublicKey.toUncompressed().toBuffer().toString("hex"), + payer_public_address: "My payer public address", + payee_public_address: "My payee public address", + amount: "amount 1000", + chain_code: "BTC", + token_code: "BTC", + status: "status", + obt_id: "obt ID", + memo: "I have memo", + hash: "I have hash", + offline_url: "I have url", + }, + }], +} + //------------------- SERIALIZE TRANSACTION ------------------------------------------------ async function buildTxUsingFioJs(network, tx, iv) { @@ -295,7 +330,7 @@ testStep(" - - -", "Sign testnet mainnet - memo"); testStep(" - - -", "Sign testnet transaction - hash"); { - await runTxTest("TESTNET", txHash, longSequenceHash, secondSequence) + await runTxTest("TESTNET", txAll, longSequenceHash, secondSequence) } testStep(" - - -", "Sign testnet mainnet - hash"); diff --git a/test-integration/snapshots/decodeMessage/nanos.01.png b/test-integration/snapshots/decodeMessage/nanos.01.png index a0f9b734..0b823004 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.01.png and b/test-integration/snapshots/decodeMessage/nanos.01.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.10.png b/test-integration/snapshots/decodeMessage/nanos.10.png index a0f9b734..0b823004 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.10.png and b/test-integration/snapshots/decodeMessage/nanos.10.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.17.png b/test-integration/snapshots/decodeMessage/nanos.17.png index 10c21272..8d806ca2 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.17.png and b/test-integration/snapshots/decodeMessage/nanos.17.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.18.png b/test-integration/snapshots/decodeMessage/nanos.18.png index 22b41df9..0b823004 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.18.png and b/test-integration/snapshots/decodeMessage/nanos.18.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.19.png b/test-integration/snapshots/decodeMessage/nanos.19.png index 8d806ca2..4a84ea79 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.19.png and b/test-integration/snapshots/decodeMessage/nanos.19.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.20.png b/test-integration/snapshots/decodeMessage/nanos.20.png index a0f9b734..20641a16 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.20.png and b/test-integration/snapshots/decodeMessage/nanos.20.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.21.png b/test-integration/snapshots/decodeMessage/nanos.21.png index 4a84ea79..7cbf9471 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.21.png and b/test-integration/snapshots/decodeMessage/nanos.21.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.22.png b/test-integration/snapshots/decodeMessage/nanos.22.png index 20641a16..f855df8f 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.22.png and b/test-integration/snapshots/decodeMessage/nanos.22.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.23.png b/test-integration/snapshots/decodeMessage/nanos.23.png index 7cbf9471..e4da8444 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.23.png and b/test-integration/snapshots/decodeMessage/nanos.23.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.24.png b/test-integration/snapshots/decodeMessage/nanos.24.png index f855df8f..355c272a 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.24.png and b/test-integration/snapshots/decodeMessage/nanos.24.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.25.png b/test-integration/snapshots/decodeMessage/nanos.25.png index e4da8444..e3087cbe 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.25.png and b/test-integration/snapshots/decodeMessage/nanos.25.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.26.png b/test-integration/snapshots/decodeMessage/nanos.26.png index 355c272a..47045550 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.26.png and b/test-integration/snapshots/decodeMessage/nanos.26.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.27.png b/test-integration/snapshots/decodeMessage/nanos.27.png index e3087cbe..4622c002 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.27.png and b/test-integration/snapshots/decodeMessage/nanos.27.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.28.png b/test-integration/snapshots/decodeMessage/nanos.28.png index 47045550..0a6229c9 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.28.png and b/test-integration/snapshots/decodeMessage/nanos.28.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.29.png b/test-integration/snapshots/decodeMessage/nanos.29.png index 4622c002..8d806ca2 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.29.png and b/test-integration/snapshots/decodeMessage/nanos.29.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.30.png b/test-integration/snapshots/decodeMessage/nanos.30.png index 0a6229c9..0b823004 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.30.png and b/test-integration/snapshots/decodeMessage/nanos.30.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.31.png b/test-integration/snapshots/decodeMessage/nanos.31.png index 8d806ca2..4a84ea79 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.31.png and b/test-integration/snapshots/decodeMessage/nanos.31.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.32.png b/test-integration/snapshots/decodeMessage/nanos.32.png index a0f9b734..20641a16 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.32.png and b/test-integration/snapshots/decodeMessage/nanos.32.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.33.png b/test-integration/snapshots/decodeMessage/nanos.33.png index 4a84ea79..7cbf9471 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.33.png and b/test-integration/snapshots/decodeMessage/nanos.33.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.34.png b/test-integration/snapshots/decodeMessage/nanos.34.png index 20641a16..f855df8f 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.34.png and b/test-integration/snapshots/decodeMessage/nanos.34.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.35.png b/test-integration/snapshots/decodeMessage/nanos.35.png index 7cbf9471..e4da8444 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.35.png and b/test-integration/snapshots/decodeMessage/nanos.35.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.36.png b/test-integration/snapshots/decodeMessage/nanos.36.png index f855df8f..355c272a 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.36.png and b/test-integration/snapshots/decodeMessage/nanos.36.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.37.png b/test-integration/snapshots/decodeMessage/nanos.37.png index e4da8444..e3087cbe 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.37.png and b/test-integration/snapshots/decodeMessage/nanos.37.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.38.png b/test-integration/snapshots/decodeMessage/nanos.38.png index 355c272a..47045550 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.38.png and b/test-integration/snapshots/decodeMessage/nanos.38.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.39.png b/test-integration/snapshots/decodeMessage/nanos.39.png index e3087cbe..4622c002 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.39.png and b/test-integration/snapshots/decodeMessage/nanos.39.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.40.png b/test-integration/snapshots/decodeMessage/nanos.40.png index 47045550..8d806ca2 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.40.png and b/test-integration/snapshots/decodeMessage/nanos.40.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.41.png b/test-integration/snapshots/decodeMessage/nanos.41.png index 4622c002..0b823004 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.41.png and b/test-integration/snapshots/decodeMessage/nanos.41.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.42.png b/test-integration/snapshots/decodeMessage/nanos.42.png index 066aed0d..4a84ea79 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.42.png and b/test-integration/snapshots/decodeMessage/nanos.42.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.43.png b/test-integration/snapshots/decodeMessage/nanos.43.png index e55ef587..20641a16 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.43.png and b/test-integration/snapshots/decodeMessage/nanos.43.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.44.png b/test-integration/snapshots/decodeMessage/nanos.44.png index 8d806ca2..7cbf9471 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.44.png and b/test-integration/snapshots/decodeMessage/nanos.44.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.45.png b/test-integration/snapshots/decodeMessage/nanos.45.png index a0f9b734..e4da8444 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.45.png and b/test-integration/snapshots/decodeMessage/nanos.45.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.46.png b/test-integration/snapshots/decodeMessage/nanos.46.png index 4a84ea79..355c272a 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.46.png and b/test-integration/snapshots/decodeMessage/nanos.46.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.47.png b/test-integration/snapshots/decodeMessage/nanos.47.png index 20641a16..e3087cbe 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.47.png and b/test-integration/snapshots/decodeMessage/nanos.47.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.48.png b/test-integration/snapshots/decodeMessage/nanos.48.png index 7cbf9471..8d806ca2 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.48.png and b/test-integration/snapshots/decodeMessage/nanos.48.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.49.png b/test-integration/snapshots/decodeMessage/nanos.49.png index e4da8444..0b823004 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.49.png and b/test-integration/snapshots/decodeMessage/nanos.49.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.50.png b/test-integration/snapshots/decodeMessage/nanos.50.png index 355c272a..4a84ea79 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.50.png and b/test-integration/snapshots/decodeMessage/nanos.50.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.51.png b/test-integration/snapshots/decodeMessage/nanos.51.png index e3087cbe..20641a16 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.51.png and b/test-integration/snapshots/decodeMessage/nanos.51.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.52.png b/test-integration/snapshots/decodeMessage/nanos.52.png index 0a6229c9..7cbf9471 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.52.png and b/test-integration/snapshots/decodeMessage/nanos.52.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.53.png b/test-integration/snapshots/decodeMessage/nanos.53.png index 8d806ca2..e4da8444 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.53.png and b/test-integration/snapshots/decodeMessage/nanos.53.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.54.png b/test-integration/snapshots/decodeMessage/nanos.54.png index a0f9b734..355c272a 100644 Binary files a/test-integration/snapshots/decodeMessage/nanos.54.png and b/test-integration/snapshots/decodeMessage/nanos.54.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.55.png b/test-integration/snapshots/decodeMessage/nanos.55.png new file mode 100644 index 00000000..e3087cbe Binary files /dev/null and b/test-integration/snapshots/decodeMessage/nanos.55.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.56.png b/test-integration/snapshots/decodeMessage/nanos.56.png new file mode 100644 index 00000000..0a6229c9 Binary files /dev/null and b/test-integration/snapshots/decodeMessage/nanos.56.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.57.png b/test-integration/snapshots/decodeMessage/nanos.57.png new file mode 100644 index 00000000..8d806ca2 Binary files /dev/null and b/test-integration/snapshots/decodeMessage/nanos.57.png differ diff --git a/test-integration/snapshots/decodeMessage/nanos.58.png b/test-integration/snapshots/decodeMessage/nanos.58.png new file mode 100644 index 00000000..0b823004 Binary files /dev/null and b/test-integration/snapshots/decodeMessage/nanos.58.png differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.01.png b/test-integration/snapshots/decodeMessage/nanosp.01.png deleted file mode 100644 index a7a87405..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.01.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.02.png b/test-integration/snapshots/decodeMessage/nanosp.02.png deleted file mode 100644 index d2f0dd67..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.02.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.03.png b/test-integration/snapshots/decodeMessage/nanosp.03.png deleted file mode 100644 index a1a25bcc..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.03.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.04.png b/test-integration/snapshots/decodeMessage/nanosp.04.png deleted file mode 100644 index 1c8a714f..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.04.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.05.png b/test-integration/snapshots/decodeMessage/nanosp.05.png deleted file mode 100644 index 14b19bdf..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.05.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.06.png b/test-integration/snapshots/decodeMessage/nanosp.06.png deleted file mode 100644 index e23183a4..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.06.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.07.png b/test-integration/snapshots/decodeMessage/nanosp.07.png deleted file mode 100644 index 56eff548..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.07.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.10.png b/test-integration/snapshots/decodeMessage/nanosp.10.png deleted file mode 100644 index a7a87405..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.10.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.11.png b/test-integration/snapshots/decodeMessage/nanosp.11.png deleted file mode 100644 index d2f0dd67..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.11.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.12.png b/test-integration/snapshots/decodeMessage/nanosp.12.png deleted file mode 100644 index a1a25bcc..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.12.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.13.png b/test-integration/snapshots/decodeMessage/nanosp.13.png deleted file mode 100644 index 1c8a714f..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.13.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.14.png b/test-integration/snapshots/decodeMessage/nanosp.14.png deleted file mode 100644 index 14b19bdf..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.14.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.15.png b/test-integration/snapshots/decodeMessage/nanosp.15.png deleted file mode 100644 index e23183a4..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.15.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.16.png b/test-integration/snapshots/decodeMessage/nanosp.16.png deleted file mode 100644 index 56eff548..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.16.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.17.png b/test-integration/snapshots/decodeMessage/nanosp.17.png deleted file mode 100644 index 5854c8c5..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.17.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.18.png b/test-integration/snapshots/decodeMessage/nanosp.18.png deleted file mode 100644 index 8ffe94b0..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.18.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.19.png b/test-integration/snapshots/decodeMessage/nanosp.19.png deleted file mode 100644 index 0966b381..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.19.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.20.png b/test-integration/snapshots/decodeMessage/nanosp.20.png deleted file mode 100644 index a7a87405..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.20.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.21.png b/test-integration/snapshots/decodeMessage/nanosp.21.png deleted file mode 100644 index d2f0dd67..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.21.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.22.png b/test-integration/snapshots/decodeMessage/nanosp.22.png deleted file mode 100644 index 63ca3308..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.22.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.23.png b/test-integration/snapshots/decodeMessage/nanosp.23.png deleted file mode 100644 index 6f75fc20..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.23.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.24.png b/test-integration/snapshots/decodeMessage/nanosp.24.png deleted file mode 100644 index 1c8a714f..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.24.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.25.png b/test-integration/snapshots/decodeMessage/nanosp.25.png deleted file mode 100644 index 50781aad..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.25.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.26.png b/test-integration/snapshots/decodeMessage/nanosp.26.png deleted file mode 100644 index 14b19bdf..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.26.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.27.png b/test-integration/snapshots/decodeMessage/nanosp.27.png deleted file mode 100644 index e23183a4..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.27.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.28.png b/test-integration/snapshots/decodeMessage/nanosp.28.png deleted file mode 100644 index 56eff548..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.28.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.29.png b/test-integration/snapshots/decodeMessage/nanosp.29.png deleted file mode 100644 index 9fbc447c..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.29.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.30.png b/test-integration/snapshots/decodeMessage/nanosp.30.png deleted file mode 100644 index 6fb64278..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.30.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.31.png b/test-integration/snapshots/decodeMessage/nanosp.31.png deleted file mode 100644 index 8a50d7e0..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.31.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.32.png b/test-integration/snapshots/decodeMessage/nanosp.32.png deleted file mode 100644 index 0966b381..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.32.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.33.png b/test-integration/snapshots/decodeMessage/nanosp.33.png deleted file mode 100644 index a7a87405..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.33.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.34.png b/test-integration/snapshots/decodeMessage/nanosp.34.png deleted file mode 100644 index d2f0dd67..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.34.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.35.png b/test-integration/snapshots/decodeMessage/nanosp.35.png deleted file mode 100644 index 63ca3308..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.35.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.36.png b/test-integration/snapshots/decodeMessage/nanosp.36.png deleted file mode 100644 index 6f75fc20..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.36.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.37.png b/test-integration/snapshots/decodeMessage/nanosp.37.png deleted file mode 100644 index 8b705272..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.37.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.38.png b/test-integration/snapshots/decodeMessage/nanosp.38.png deleted file mode 100644 index 05aa18f8..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.38.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.39.png b/test-integration/snapshots/decodeMessage/nanosp.39.png deleted file mode 100644 index 14b19bdf..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.39.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.40.png b/test-integration/snapshots/decodeMessage/nanosp.40.png deleted file mode 100644 index e23183a4..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.40.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.41.png b/test-integration/snapshots/decodeMessage/nanosp.41.png deleted file mode 100644 index 56eff548..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.41.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.42.png b/test-integration/snapshots/decodeMessage/nanosp.42.png deleted file mode 100644 index 9fbc447c..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.42.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.43.png b/test-integration/snapshots/decodeMessage/nanosp.43.png deleted file mode 100644 index 6fb64278..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.43.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.44.png b/test-integration/snapshots/decodeMessage/nanosp.44.png deleted file mode 100644 index 5a9a698b..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.44.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.45.png b/test-integration/snapshots/decodeMessage/nanosp.45.png deleted file mode 100644 index 0f9f76e5..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.45.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.46.png b/test-integration/snapshots/decodeMessage/nanosp.46.png deleted file mode 100644 index 0966b381..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.46.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.47.png b/test-integration/snapshots/decodeMessage/nanosp.47.png deleted file mode 100644 index a7a87405..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.47.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.48.png b/test-integration/snapshots/decodeMessage/nanosp.48.png deleted file mode 100644 index d2f0dd67..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.48.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.49.png b/test-integration/snapshots/decodeMessage/nanosp.49.png deleted file mode 100644 index a1a25bcc..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.49.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.50.png b/test-integration/snapshots/decodeMessage/nanosp.50.png deleted file mode 100644 index 1c8a714f..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.50.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.51.png b/test-integration/snapshots/decodeMessage/nanosp.51.png deleted file mode 100644 index 14b19bdf..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.51.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.52.png b/test-integration/snapshots/decodeMessage/nanosp.52.png deleted file mode 100644 index e23183a4..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.52.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.53.png b/test-integration/snapshots/decodeMessage/nanosp.53.png deleted file mode 100644 index 56eff548..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.53.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.54.png b/test-integration/snapshots/decodeMessage/nanosp.54.png deleted file mode 100644 index 8a50d7e0..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.54.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.55.png b/test-integration/snapshots/decodeMessage/nanosp.55.png deleted file mode 100644 index 0966b381..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.55.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.56.png b/test-integration/snapshots/decodeMessage/nanosp.56.png deleted file mode 100644 index cbdc0a71..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.56.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.57.png b/test-integration/snapshots/decodeMessage/nanosp.57.png deleted file mode 100644 index a7a87405..00000000 Binary files a/test-integration/snapshots/decodeMessage/nanosp.57.png and /dev/null differ diff --git a/test-integration/snapshots/decodeMessage/nanox.17.png b/test-integration/snapshots/decodeMessage/nanox.17.png index 5854c8c5..0966b381 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.17.png and b/test-integration/snapshots/decodeMessage/nanox.17.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.18.png b/test-integration/snapshots/decodeMessage/nanox.18.png index 8ffe94b0..c843773c 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.18.png and b/test-integration/snapshots/decodeMessage/nanox.18.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.19.png b/test-integration/snapshots/decodeMessage/nanox.19.png index 0966b381..89232403 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.19.png and b/test-integration/snapshots/decodeMessage/nanox.19.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.20.png b/test-integration/snapshots/decodeMessage/nanox.20.png index c843773c..eb63da2d 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.20.png and b/test-integration/snapshots/decodeMessage/nanox.20.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.21.png b/test-integration/snapshots/decodeMessage/nanox.21.png index 89232403..5d91b1e4 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.21.png and b/test-integration/snapshots/decodeMessage/nanox.21.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.22.png b/test-integration/snapshots/decodeMessage/nanox.22.png index eb63da2d..dbe6f3f7 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.22.png and b/test-integration/snapshots/decodeMessage/nanox.22.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.23.png b/test-integration/snapshots/decodeMessage/nanox.23.png index 5d91b1e4..a27c581c 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.23.png and b/test-integration/snapshots/decodeMessage/nanox.23.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.24.png b/test-integration/snapshots/decodeMessage/nanox.24.png index dbe6f3f7..94384bb3 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.24.png and b/test-integration/snapshots/decodeMessage/nanox.24.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.25.png b/test-integration/snapshots/decodeMessage/nanox.25.png index a27c581c..e23183a4 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.25.png and b/test-integration/snapshots/decodeMessage/nanox.25.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.26.png b/test-integration/snapshots/decodeMessage/nanox.26.png index 94384bb3..56eff548 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.26.png and b/test-integration/snapshots/decodeMessage/nanox.26.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.27.png b/test-integration/snapshots/decodeMessage/nanox.27.png index e23183a4..9fbc447c 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.27.png and b/test-integration/snapshots/decodeMessage/nanox.27.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.28.png b/test-integration/snapshots/decodeMessage/nanox.28.png index 56eff548..dc6bcf5b 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.28.png and b/test-integration/snapshots/decodeMessage/nanox.28.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.29.png b/test-integration/snapshots/decodeMessage/nanox.29.png index 9fbc447c..8a50d7e0 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.29.png and b/test-integration/snapshots/decodeMessage/nanox.29.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.30.png b/test-integration/snapshots/decodeMessage/nanox.30.png index dc6bcf5b..0966b381 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.30.png and b/test-integration/snapshots/decodeMessage/nanox.30.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.31.png b/test-integration/snapshots/decodeMessage/nanox.31.png index 8a50d7e0..c843773c 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.31.png and b/test-integration/snapshots/decodeMessage/nanox.31.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.32.png b/test-integration/snapshots/decodeMessage/nanox.32.png index 0966b381..89232403 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.32.png and b/test-integration/snapshots/decodeMessage/nanox.32.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.33.png b/test-integration/snapshots/decodeMessage/nanox.33.png index c843773c..eb63da2d 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.33.png and b/test-integration/snapshots/decodeMessage/nanox.33.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.34.png b/test-integration/snapshots/decodeMessage/nanox.34.png index 89232403..5d91b1e4 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.34.png and b/test-integration/snapshots/decodeMessage/nanox.34.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.35.png b/test-integration/snapshots/decodeMessage/nanox.35.png index eb63da2d..7624fa47 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.35.png and b/test-integration/snapshots/decodeMessage/nanox.35.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.36.png b/test-integration/snapshots/decodeMessage/nanox.36.png index 5d91b1e4..759abef5 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.36.png and b/test-integration/snapshots/decodeMessage/nanox.36.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.37.png b/test-integration/snapshots/decodeMessage/nanox.37.png index 7624fa47..94384bb3 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.37.png and b/test-integration/snapshots/decodeMessage/nanox.37.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.38.png b/test-integration/snapshots/decodeMessage/nanox.38.png index 759abef5..e23183a4 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.38.png and b/test-integration/snapshots/decodeMessage/nanox.38.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.39.png b/test-integration/snapshots/decodeMessage/nanox.39.png index 94384bb3..56eff548 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.39.png and b/test-integration/snapshots/decodeMessage/nanox.39.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.40.png b/test-integration/snapshots/decodeMessage/nanox.40.png index e23183a4..9fbc447c 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.40.png and b/test-integration/snapshots/decodeMessage/nanox.40.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.41.png b/test-integration/snapshots/decodeMessage/nanox.41.png index 56eff548..dc6bcf5b 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.41.png and b/test-integration/snapshots/decodeMessage/nanox.41.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.42.png b/test-integration/snapshots/decodeMessage/nanox.42.png index 9fbc447c..0966b381 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.42.png and b/test-integration/snapshots/decodeMessage/nanox.42.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.43.png b/test-integration/snapshots/decodeMessage/nanox.43.png index dc6bcf5b..c843773c 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.43.png and b/test-integration/snapshots/decodeMessage/nanox.43.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.44.png b/test-integration/snapshots/decodeMessage/nanox.44.png index d9bc6a61..89232403 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.44.png and b/test-integration/snapshots/decodeMessage/nanox.44.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.45.png b/test-integration/snapshots/decodeMessage/nanox.45.png index ae332bd6..a64aac08 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.45.png and b/test-integration/snapshots/decodeMessage/nanox.45.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.46.png b/test-integration/snapshots/decodeMessage/nanox.46.png index 0966b381..dbe6f3f7 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.46.png and b/test-integration/snapshots/decodeMessage/nanox.46.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.47.png b/test-integration/snapshots/decodeMessage/nanox.47.png index c843773c..94384bb3 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.47.png and b/test-integration/snapshots/decodeMessage/nanox.47.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.48.png b/test-integration/snapshots/decodeMessage/nanox.48.png index 89232403..e23183a4 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.48.png and b/test-integration/snapshots/decodeMessage/nanox.48.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.49.png b/test-integration/snapshots/decodeMessage/nanox.49.png index a64aac08..56eff548 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.49.png and b/test-integration/snapshots/decodeMessage/nanox.49.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.50.png b/test-integration/snapshots/decodeMessage/nanox.50.png index dbe6f3f7..0966b381 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.50.png and b/test-integration/snapshots/decodeMessage/nanox.50.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.51.png b/test-integration/snapshots/decodeMessage/nanox.51.png index 94384bb3..c843773c 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.51.png and b/test-integration/snapshots/decodeMessage/nanox.51.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.52.png b/test-integration/snapshots/decodeMessage/nanox.52.png index e23183a4..89232403 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.52.png and b/test-integration/snapshots/decodeMessage/nanox.52.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.53.png b/test-integration/snapshots/decodeMessage/nanox.53.png index 56eff548..a64aac08 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.53.png and b/test-integration/snapshots/decodeMessage/nanox.53.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.54.png b/test-integration/snapshots/decodeMessage/nanox.54.png index 8a50d7e0..dbe6f3f7 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.54.png and b/test-integration/snapshots/decodeMessage/nanox.54.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.55.png b/test-integration/snapshots/decodeMessage/nanox.55.png index 0966b381..94384bb3 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.55.png and b/test-integration/snapshots/decodeMessage/nanox.55.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.56.png b/test-integration/snapshots/decodeMessage/nanox.56.png index 348d43dc..e23183a4 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.56.png and b/test-integration/snapshots/decodeMessage/nanox.56.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.57.png b/test-integration/snapshots/decodeMessage/nanox.57.png index c843773c..56eff548 100644 Binary files a/test-integration/snapshots/decodeMessage/nanox.57.png and b/test-integration/snapshots/decodeMessage/nanox.57.png differ diff --git a/test-integration/snapshots/decodeMessage/nanosp.08.png b/test-integration/snapshots/decodeMessage/nanox.58.png similarity index 100% rename from test-integration/snapshots/decodeMessage/nanosp.08.png rename to test-integration/snapshots/decodeMessage/nanox.58.png diff --git a/test-integration/snapshots/decodeMessage/nanosp.09.png b/test-integration/snapshots/decodeMessage/nanox.59.png similarity index 100% rename from test-integration/snapshots/decodeMessage/nanosp.09.png rename to test-integration/snapshots/decodeMessage/nanox.59.png diff --git a/test-integration/snapshots/decodeMessage/nanox.60.png b/test-integration/snapshots/decodeMessage/nanox.60.png new file mode 100644 index 00000000..348d43dc Binary files /dev/null and b/test-integration/snapshots/decodeMessage/nanox.60.png differ diff --git a/test-integration/snapshots/decodeMessage/nanox.61.png b/test-integration/snapshots/decodeMessage/nanox.61.png new file mode 100644 index 00000000..c843773c Binary files /dev/null and b/test-integration/snapshots/decodeMessage/nanox.61.png differ