diff --git a/packages/hw-app-btc/src/Btc.js b/packages/hw-app-btc/src/Btc.js index 8289fb457..7ca8e582b 100644 --- a/packages/hw-app-btc/src/Btc.js +++ b/packages/hw-app-btc/src/Btc.js @@ -960,7 +960,8 @@ const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc splitTransaction( transactionHex: string, isSegwitSupported: ?boolean = false, - hasTimestamp?: boolean = false + hasTimestamp?: boolean = false, + hasExtraData?: boolean = false ): Transaction { const inputs = []; const outputs = []; @@ -1023,10 +1024,12 @@ const tx1 = btc.splitTransaction("01000000014ea60aeac5252c14291d428915bd7ccd1bfc } else { locktime = transaction.slice(offset, offset + 4); } + offset += 4; if (overwinter) { - offset += 4; nExpiryHeight = transaction.slice(offset, offset + 4); offset += 4; + } + if (hasExtraData) { extraData = transaction.slice(offset); } return { diff --git a/packages/test/snapshots.json b/packages/test/snapshots.json index 193089dcf..a348471c2 100644 --- a/packages/test/snapshots.json +++ b/packages/test/snapshots.json @@ -14,10 +14,10 @@ "e04280000102": "9000", "e04280002281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac": "9000", "e042800022a0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac": "9000", - "e04280000400000000": "32009efac773da236484dae8f0fdba3d7e0ba1d05070d1a34fc44943e638441262a04f1001000000a0860100000000000f606575b484bc729000", + "e04280000400000000": "32000bb4c773da236484dae8f0fdba3d7e0ba1d05070d1a34fc44943e638441262a04f1001000000a0860100000000003a4814ec53fbf7f39000", "e04000000d03800000000000000000000000": "41046666422d00f1b308fc7527198749f06fedb028b979c09f60d0348ef79c985e4138b86996b354774c434488d61c7fb20a83293ef3195d422fde9354e6cf2a74ce223137383731457244716465764c544c57424836577a6a556331454b4744517a434d41612d17bc55b7aa153ae07fba348692c2976e6889b769783d475ba7488fb547709000", "e0440000050100000001": "9000", - "e04480003b013832009efac773da236484dae8f0fdba3d7e0ba1d05070d1a34fc44943e638441262a04f1001000000a0860100000000000f606575b484bc7219": "9000", + "e04480003b013832000bb4c773da236484dae8f0fdba3d7e0ba1d05070d1a34fc44943e638441262a04f1001000000a0860100000000003a4814ec53fbf7f319": "9000", "e04480001d76a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88acffffffff": "9000", "e04a80002301905f0100000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac": "00009000", "e04800001303800000000000000000000000000000000001": "3145022100ff492ad0b3a634aa7751761f7e063bf6ef4148cd44ef8930164580d5ba93a17802206fac94b32e296549e2e478ce806b58d61cfacbfed35ac4ceca26ac531f92b20a019000" @@ -33,7 +33,7 @@ "e04280000102": "9000", "e04280002281b72e00000000001976a91472a5d75c8d2d0565b656a5232703b167d50d5a2b88ac": "9000", "e042800022a0860100000000001976a9144533f5fb9b4817f713c48f0bfe96b9f50c476c9b88ac": "9000", - "e04280000400000000": "32009323c773da236484dae8f0fdba3d7e0ba1d05070d1a34fc44943e638441262a04f1001000000a0860100000000004179cc03d0e7c1c49000", + "e04280000400000000": "320097ffc773da236484dae8f0fdba3d7e0ba1d05070d1a34fc44943e638441262a04f1001000000a086010000000000e68a3c92a48caad59000", "e0440000050100000001": "9000", "e04480002600c773da236484dae8f0fdba3d7e0ba1d05070d1a34fc44943e638441262a04f100100000069": "9000", "e04480003252210289b4a3ad52a919abd2bdd6920d8a6879b1e788c38aa76f0440a6f32a9f1996d02103a3393b1439d1693b063482c04b": "9000", @@ -79,7 +79,7 @@ }, "testEth": { "cache": { - "e006000000": "010100159000" + "e006000000": "000100189000" } }, "testEth2": { @@ -99,7 +99,7 @@ }, "testXrp": { "cache": { - "e006000000": "000100039000" + "e006000000": "000100049000" } }, "testXrp2": { @@ -109,17 +109,17 @@ }, "testXrp3": { "cache": { - "e004004083058000002c8000009080000000000000000000000012000022800000002400000002614000000001315d3468400000000000000c73210324e5f600b52bb3d9246d49c4ab1722ba7f32b7a3e4f9f2b8a1a28b9118cc36c48114f31b152151b6f42c1d61fe4139d34b424c8647d183142ecfc1831f6e979c6da907e88b1cad602db59e2f": "304402204acdef814cf00459b81776d75d4437c20f0ba97493fac6794e726793728a40680220292f13d8abc1f24e4747b1452961c5edd31a1feb3e932272df13ce9b1f9447c19000" + "e004004083058000002c8000009080000000000000000000000012000022800000002400000002614000000001315d3468400000000000000c73210324e5f600b52bb3d9246d49c4ab1722ba7f32b7a3e4f9f2b8a1a28b9118cc36c48114f31b152151b6f42c1d61fe4139d34b424c8647d183142ecfc1831f6e979c6da907e88b1cad602db59e2f": "3044022041673ea6da17205b9b0d279436b508cd092b686bf5b921ddf4fbf38879e4950402207510cebf32019f5d994102bfe6570bb2f5d0b931902ad6d839c5b4552a492cb99000" } }, "testStr": { "cache": { - "e006000000": "000101019000" + "e006000000": "000300009000" } }, "testStr2": { "cache": { - "e002010117038000002c8000009480000000766961206c756d696e61": "7691d85048acc4ed085d9061ce0948bbdf7de6a92b790aaf241d31b7dcaa423881b9f7cb3bd2fad4f0fdab9da1407e8e85f702fa58584fba3104e4549b85ca8046d73a4010870bc4765eff7e0bafcfe91390c4475ba3fcc598750758ed770e0ffe47279273939c24fc0b8bdda584b5b0ad01f0c51208661d2aae5ffa687ce6f89000" + "e002010117038000002c8000009480000000766961206c756d696e61": "7691d85048acc4ed085d9061ce0948bbdf7de6a92b790aaf241d31b7dcaa423881b9f7cb3bd2fad4f0fdab9da1407e8e85f702fa58584fba3104e4549b85ca8046d73a4010870bc4765eff7e0bafcfe91390c4475ba3fcc598750758ed770e0f9000" } }, "testStr3": { @@ -127,28 +127,5 @@ "e004008096038000002c80000094800000007ac33997544e3175d266bd022439b22cdb16508c01163f26e5cb2a3e1045a979000000020000000020da998b75e42b1f7f85d075c127f5b246df12ad96f010bcf7f76f72b16e57130000006400c5b4a5000000190000000000000000000000010000000000000001000000009541f02746240c1e9f3843d28e56f0a583ecd27502fb0f4a27d4d0922f": "9000", "e004800013e064a200000000000000000098968000000000": "79e6da561676d16f17e91ad0dbbe917e3da0fffe660aa9f277669385960b0aec8dcf002b7305b329cc02f2eabd2f20320dee4828b412ed2850b9771ffb23920d9000" } - }, - "testAda": { - "cache": { - "8001010000": "20fbbfc85d9a15267484c01b3c6e458d2fca3ceb7549834209ea77b96437c2f31005c751fcfeb8027d5f0ac114abefa11d0b021ee25954d24c19f4fd2b63b308749000" - } - }, - "testAda2": { - "cache": { - "8004000000": "0001019000" - } - }, - "testAda3": { - "cache": { - "8001020004feedbeef": "207a18d4127421be13446832a44cce0399da60419c50399737b6acd245734610f09000" - } - }, - "testAda4": { - "cache": { - "800201023b839f8200d8185826825820e981442c2be40475bb42193ca35907861d90715854de6fcba767b98f1789b51219439aff9f8282d818584a83581ce7fe": "9000", - "800202023b8e468d2249f18cd7bf9aec0d4374b7d3e18609ede8589f82f7f0a20058208200581c240596b9b63fc010c06fbe92cf6f820587406534795958c411": "9000", - "800203021ae662dc014443c0688e001a6768cc861b0037699e3ea6d064ffa0": "0101414c39314e2e2e2e7831475764d0a63e9e6937009000", - "8003000004ffffffff": "6fc4b6614bacd5be2e4c7ec2ef10ff5b4e334afda4a3a2d96236cd6ffadb52a5305fcd51704cf2c20173668db456af5a5b272557adc8eebfb68ec78b8a24030c9000" - } } -} +} \ No newline at end of file diff --git a/packages/test/src/runTests.js b/packages/test/src/runTests.js index 73e7123b9..f444d43b6 100644 --- a/packages/test/src/runTests.js +++ b/packages/test/src/runTests.js @@ -14,10 +14,6 @@ import testXrp3 from "./testXrp3"; import testStr from "./testStr"; import testStr2 from "./testStr2"; import testStr3 from "./testStr3"; -import testAda from "./testAda"; -import testAda2 from "./testAda2"; -import testAda3 from "./testAda3"; -import testAda4 from "./testAda4"; function expectAppContext(appName) { // TODO improve this by waiting user to do an action? @@ -47,12 +43,7 @@ var tests = [ expectAppContext("Stellar"), { name: "testStr", run: testStr }, { name: "testStr2", run: testStr2 }, - { name: "testStr3", run: testStr3 }, - expectAppContext("Cardano (ada)"), - { name: "testAda", run: testAda }, - { name: "testAda2", run: testAda2 }, - { name: "testAda3", run: testAda3 }, - { name: "testAda4", run: testAda4 } + { name: "testStr3", run: testStr3 } ]; const defaultWaitForAppSwitch = step =>