Skip to content

Commit

Permalink
fix: delete support detection
Browse files Browse the repository at this point in the history
  • Loading branch information
wabicai committed Nov 28, 2024
1 parent 2d6108a commit 0d2c505
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 44 deletions.
2 changes: 1 addition & 1 deletion packages/connect-examples/expo-example/src/data/benfen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ const api: PlaygroundProps[] = [
path: "m/44'/728'/0'/0'/0'",
coinType: '3078323a3a6266633a3a424643',
rawTx:
'0x000000000003401000566c2926bc6fe43fec2d7aa337c08d837d9fd45c11ddd5bdf20f170ec76acc48f6eb900000000002018416af329177d5e30dd927587f9e19bd955e4f91b9afb5e7febabc2e5cdfc39010005987d519580c6259ed69f343dfe64b45cef423a3695f6350a89b2975cc133a88f6eb9000000000020b2bae1c1d9d3bc25e465c9ed289d0547871ac0abdb6353d17201a6183cce98d701000648af64274f2dcddbbc9406bf6871453f9c27c79e8dc59c0a767e62a80a31308f6eb90000000000205393f4daf633178542f618f597bc0b75eebfba48668cd552f753891c5fd6ec41010007a056e52610ad434372c5515a44cd286a1bc2bdd6beb1f0ccbb7daec6ae05678f6eb900000000002034bf4df33eb6d76af72e6e44407aecb13f21522dfd7249a836e848f16a63c6db01000a2cb885031d30c86cd4e8556d876bc51b02c0de1f050b29fdabc43d96751c138f6eb9000000000020099aab73473c15a4933523dfc885c1783a8aa7bd24860881ede9c0a161e9cf0e01000dd7b4c3c9376fde0e1a73fb5facecf6a88bd7ae83e3a9c19ff20dde58748e4a8f6eb900000000002018363226c76369ce6356266244c0d803da281a13cf97a249e7fb94208b83472c010016da1c4c84da72ba8e566f3ff75b43cf6acfa5371a6f84651d4de3cd6a23f1128f6eb90000000000209e2b82f8b6668ab6c08ae8f0e1477d37b934007f0f5d737be0817c3e0af1cb2c01001a4988b521a707352bd34658037478bbba32533fe1eb6dc90bb084403f5b29f48f6eb9000000000020ead89fc502509743e60589d478868d6af8c4e612751849c529aa5be60f3eb8c301002088480d5446c86558680265c1e09cb3b91aa3192fae0cc52a4857123b9115138f6eb900000000002062610bed1d3e749fa8e20413618ffb1eff117a1448407b2fb451e0350b1a7b5e010023eb18caf53d20739565ee1860061c6392f6264348b5f7dbe0b1458ad421bc728f6eb90000000000208ff91314b4e17827913c3036836879db584b8ace49289d9d1617eb04db32cfc101002fb27600d2820f99422fd36cd81960514a2fb9fb84d6915db89d3343d3c440148f6eb9000000000020eae6ec55ffa13b34c66dc3039c277954b74ab4e46976cebebb4bd82cb8ba63fb0100348c52fb5c13397c8cbedf29ff99af06e7e5e0c8fd0bf6f791b7788ee1712bac8f6eb9000000000020fd6f6cf6269629ed2e22801e01ba129e69767f217c8947250d3aade9ba8e04470100366f00d8d3953e98ac926686bb29c0517234a62e7fc7dcc0f22b941a0b7089588f6eb900000000002098fd699eda00058550059bdb8a2fc1ff5832a949b1dd6c148290e89098956b8b010037925f1f9d3c2a6ad4d79d0830ae35ce9ff60f2613a1837f19bf41a6cb40d2ed8f6eb900000000002048c2bf3b083a59ea401e958915b94ae4085867a87db31a285e70c8493634320b01003e535c4944aaca92e8ff302070596298007af7735dd613abf9faee839bd93a978f6eb9000000000020cb9a599fe43c7678df9a972d4d3691a75f0c9ec645baf4f644b9918b66d5fffb010042680ec818eef48e5b71295156113f61ae2da3ac49680732a092167bec71a2748f6eb9000000000020d16f211ea3b5e2fc8f2a0f1086ddd2eb9a665a170ade544880933b8aed480b570100455eb8344bc52662c2de274d0a8b6a095ac64c06430ccc481ebf95661ef00c9e8f6eb9000000000020f42cf9a59a09252179b96d22a0ea22dc52904fee67b2eba44c839f3b42b0d408010046409de8f441bdb5f0281d0b84c6e9ca28596de1823ff068c6e9115fa6288b1b8f6eb9000000000020af6897e2be26e29861fbc170f69533e8af9e9b00e854a31449ca49cc85a2b2a901004a53e4a342d5492ae8f9bec5738e1741a449c1b2ef4167bfd25d945df666c7738f6eb90000000000202360f3328cf866d20379415aeb40b8039e08b4570155ff4b0333d637c8daac9401004b428a2f3e1a9ca481a2d5500a0d5718c510d4ad6dd04684b469060aa5d0fb2ede73b90000000000203fb94734d3dd64f6ac1d9ed9a0fc00a6e2e41e11a1caf2e98d9a4517304ef71901004edbd27eaf39070427ef3b1d5c9da15189c02c255e9d8a72d6eb586d979da1c78f6eb900000000002063500f4ed81d014bc9d061ef73532a627c1b84c6231a15b967420f03e50b28ba01005177b13b2be42bf9a1052719604f3cb6b61e185117b969cd8172c5d33df612b48f6eb9000000000020268676b28a100511931d04a835dc556365a45749ed69998c3b5578f632a8cbe3010055f967aeac0063a1ff8106812e1b8a6c90f7d6a976a163e9b186a109d1d014038f6eb9000000000020500795546605114cdf25d980bc686a6d5d0fe80c74e934682d2d2eff0ef6dd5d010060115c30bd2f5486de0d4089e7eebf7f7e4ab8dee374d07398f5325edf6642418f6eb900000000002085f5051cc2bac84b8b990363863d61b2017f6f004ebb5d5739e725d9d9e46c9a010064c7b4ff5f961b857a4b3480c3c4344a9c1e313bff09bfe853dd909b5e99923b8f6eb90000000000207cdec3d657864dd5f45723bda776332187df2cb49c33ef35df2f6094045bde2501007093b179375a1c0f054db897e3a158173de8410fb47562b66f45ee19174f73098f6eb90000000000204fe9c99d0ed1cce0f34d3eeb01e8c7ef79186c193cc4908ae3536b671cde1995010070c71c8c9e94de2e4c6423233d4763569309eacea874d8ab0263f22873f003998f6eb9000000000020774b136b52cdd73908afb52d1f0b15948d6ce19ed1a4e6eceaac64251d3d0e13010077dc8865dc2b8d5089e7f17039b9d3e2475d39d96bbc703525bc4d195add5c158f6eb90000000000200ea0031c30777bee0061840de4866d3105e619e2491bee268a0f9b10b1a44e6901007a144fd60380bba0165b643b1b092037052374972bf237ae180ff5e4123159f98f6eb9000000000020470dd9bd7b3f82ef6b50d6a1936ca9841a5fa32ba6c3c255564890f14bdd555201007e81afa63670554f8caacd5ed6642fe0668c5435acba0995d68cd1c86bc058998f6eb9000000000020f87e11ee8b24f8772fd50e49380e0d00912aebb317455c6c8e6108498a262be80100809dab1316444724bc6f9cd834d3e968edf0868b7378dcb537fb21d6f58bd53d8f6eb9000000000020816ec005357cb79213d1065ffccf839fdeff27ddef387984f9565081e1b5b17b010083b65ca354325c863df5e3072ed05648a5cbca8a121b8879dd56ca238a85c8a08f6eb9000000000020ac6abee050e399cffb65ba1f858a41f42a554c02b4e8a08a7bdfcf5b1ec4a04d010085cc8d90ecf8b265f598d6a53974cfc69271f3207a797c957a3d9db20c179b4d8f6eb90000000000201215d7f261512a1d694aaae4041da74e18e23ae9a3d337cfeb7a15bedfe71c1c01008776216712dd280ca92d54ff19ec523d7a820a0293031f36349624293f0f489f8f6eb900000000002035d1bac2ce23775fa9b7e6046d15d7229db2b8be4f4c30fb44908bac4ee9f2cd0100894b8b12e7e2a90acff4e79e1048a2430d35f7a7b1081d8e0f256736f5b516178f6eb9000000000020d755ca5055f63ed7ca59c55d93c8f819d815cfd613815bc32843edfe810491fc01008a7b8a0789350fb8542bcd75fe09a898ede521558af5433546edb4386bf46a898f6eb90000000000207b1c02f890aba63a6f2afc2b95fa26d1d23c7bf3ce7a7205fdc17f607757ec2d01008ee03e88a2a9654c87e68e849ef846dfa582fc11299afb90a489107df2d4cb8b8f6eb9000000000020f867877262835cbbe615cebee383e96a89153f4ec31d69405dec09dc826f6c72010092182a6daf44fc33ddcbf78c54f7d6fb96ebc6354fa9f5621f87137b82e0ece48f6eb90000000000205dea5f5b7dea63d48ea6c95e7576d537662dba9d1288a591aa86be7be4881e3b01009d41393696f50dde5c1367edac923b03d96a215961bc2859a4c064e4b27fd5d08f6eb9000000000020a2748e9a82b4685cf0d640e39a98d3912f25016cd11fbc14f46ced0121b50cc401009f033aee128f590757d576e00ae16693c34f29a4c3e7c86cd1abc28dbb8698e18f6eb9000000000020f1589f28e2190d7ad653b976abfa40bf8941418ba643211d6e1ec8c0f83fc76b0100a5f1da44a8ebe87e4b9b26c5b7785c03aa1faf1d7e45f50d4166ede20294dc628f6eb9000000000020e8a0eb2ebe6d04432fc414dbf47a81b4d9b25a448ef9a9af88c5a0084748cac30100bb751d5eb820df50018f6be3073811c28018a9a73950db9f634330b7ddfe2ae48f6eb9000000000020b9fa279428b20a260b1fde2d39745e5e5876403ca96481ef5abe8f909bfabebf0100c1101cefc78f0f7457db21420163ef662a5acb75e124b9803b7f21127c2575a08f6eb9000000000020140ec8ee5c79f94cd632ba378d384c2f045c2c39a364e42c2b43770614c2c2940100c351d40c38832af1795e1c6f053376ef736f795a7c3542e9a81c7b17a32c493e8f6eb90000000000200d341ebc77efeebc9485647c981b2c4c516072d18d5981b9371cfaa0708695a10100ce694fa871baf98bc43831a946090cf14ef86a3da712b3febce2172dc997edcf8f6eb900000000002034d661165da8ee80355427e2fcffb43c85c0b18a184231d7d9a8250bbde48ec00100d686f1da3c7f81d35b8d3af224a5a5dfbabf65dc61d8566631cfb87bd3d97cdb8f6eb9000000000020e90e709ed5ccdef4c552407b3cac49aa4d63ae253f19cc4abb778430aa2308db0100e2a80d6a8a02fdf44e7691cf80098204a6c04480d94d28c01a4a81fb033ff3538f6eb9000000000020271ad8de0217b29c1e02c61b7a944ee2b68790667823eb6ba812e3f8a6ebced10100f2db9f2c4a4e479c9220594c5d6dc9a9b23fe33bee7f533002db5ff98e9e4aea8f6eb900000000002006da36107ed7e4de46535c32c6026d0df812d041f5c16f56cca3a112c9c1ef5801000358128f4617c9cf8446cc597b0b34c34ade63f3d0709c8ab088de66f14a496df585b70000000000201077ab43987e7fefc430b9fa49be36a86ccff8f3d17a5f15ae416a2f01c66fd500084c040000000000000100020189fad2c9fe78631fd61eb5c980ca6714bb5c1315fa406991fa10b69baed38f6eb90000000000207a5681c46883102688801e79f4b01523c30608995877cb93935823d03c820d13002017f3a9bd36da0639153d3c38032217ea298eb1991e0a62cc5924e2dd71293735030301300030010000010100010200010300010400010500010600010700010800010900010a00010b00010c00010d00010e00010f00011000011100011200011300011400011500011600011700011800011900011a00011b00011c00011d00011e00011f00012000012100012200012300012400012500012600012700012800012900012a00012b00012c00012d00012e00012f00020132000101310001010301000000013300b4ced58018b75d7ba72a10fa97c09b7bf66533ff104bf9db1bfdb004b17d8eaa0183006eb3c5499c3cb4b022f20955f387312ed312389c552fa39e35d6423d0c74df73b90000000000204f66fe4812109dab92ecdc23720cb57afe86b90e0b257abae4eecf091f0b89e2b4ced58018b75d7ba72a10fa97c09b7bf66533ff104bf9db1bfdb004b17d8eaa6400000000000000004461000000000000',
'0000000000340100027e179b5d888d95a9852e5503dd0730ab78f35412c9065f7df1c5c3acd874a0e273b9000000000020793e8072a90e63db0efa50b37834671aed7640c10bfa01994d0363679d5bf11501000358128f4617c9cf8446cc597b0b34c34ade63f3d0709c8ab088de66f14a496de273b90000000000209ebfc4f3eafd4065ea2c3e9ed775335e96ae04e6ae8706aa5537b508ee3492c8010004009983de3452c5876fed1eb2e4c5280dc650b76d852301b20ec0e92972dfa4e273b9000000000020530b7457e63ba4bab6845836f937813ab3d8b5ce16d194a5ab6fdb8fcd3067840100042f3df005ddedf662428dd90c5e673be607e9c21b4b4250c51b46ceb81c8412e273b9000000000020d5fde14f91325f4d6a19dce5f6707947eea55fcbac92a011405f89ac54c79b3b010005d298d667e608d100ebba1ae5f4972e0c9f3c1f6c72dc44c42890ffd3f938a6e273b9000000000020237b4fa3c15ac6719a08afb4ecb86a8ecd407cc4f31a4204f498c97f461b34a001000698cbcbc5ea23f2bacd1e13d3354fa618069fa718268c15b7fd8f71171364fce273b9000000000020d033e3f0583e1a8b24fbb56a3c6ecc83af490abcdbd1ff994825884ee302751001000b33a803b5f130a75abb315f442298de353aa42c601d0e4b9adfda9b38dbfb81e273b90000000000207c06ff991eba0ae44e21322756aaffef2c1338099556cefb0d68b7bf589475c501000c9e5bf27ccc253d1efab83a71effa3b861f364a889b224e133c5ca793038fabe273b90000000000203e0d9f4c3700bd9a6cf8296b9450b7916a932f21faa1c0d7eb50d79a3d36feee01000e1f77b40a60207d1581c2e1fd8e86b7c01971d0e63aa1a667388eae70ee68d2e273b9000000000020895c6c7d89a13c0d83f7fa8586b047bda112717f2852c1cc48a1f43141a1b56901000f226eab7f4b603c678ed99f535b2f19046c070e86f7d642f1b51bb6b482504ae273b9000000000020bff05f3301abdcd654a18cf5840e0fb2fd6c40f09ff3319c4071422aafc43c190100128faa41a63dd4f06713011be96438c77374ad64e98aaf1de209103f310442aae273b9000000000020fc4d72254ecd63aaf55c2c8de8dec8c96864705dd0f8bb1646702bf550ae3685010013dac3b35caa38198b2d8e718b875002fe8c0281bd843bbba0a36fb75ae102a0e273b9000000000020f2a3538920917503a54569fb2746c299b9e3f2ffe4584b011263efd99d8b4c87010015789455d7b055ecdfb5829fb61d403853c27638b81caf487ded28c8f6996273e273b9000000000020bb3d0ee3786a7117f7d27b89f9254c1ebf2a7fd2332ff8f44d4a7a17332092d4010015b5f497001ef7bb58bb6979c1b6ab4616d33ff217fd11ba14c91ef446bb473fe273b90000000000201d17f049ddffe45a186ba982c2edadc075b073d6cfa762c018f7a4a53d41ea0b010015e3f573e6342a7cbaf55bada270589ebf4d2510436209e794e537315a18ad9be273b9000000000020b577d4d1771c5c80811a422d4476e5048c5c28536894c64a99ca9f9e33c5bb9301001623a6b745769cf9655ea2076671c32b76e71802b410d0ddfe84dda7082acc5de273b9000000000020e444e22d3cea6691cc7a79e83127e82bb5857925d80fbf786f513688531dd01f0100186cb833953d0e691b11701aec483fab4b40234d65c831b3086166ce824dc0b3e273b900000000002043bb814ae1fc409ec1ee06c9e6b60ced084b50146f7ef06af4595157143800f70100212f3db5c4979cbb9bd8ebbada41814cf00776380c15dc1ec4e34f9c6b7dc563e273b90000000000201a4d27ee8ace85f9939ed3896e7774eb858056275d08c3dc333aed6319a8b3030100293e3fcacfb6d605c28408f3498df2271d99e289168d2f3599e6d97274377c4ce273b90000000000206a26e8cf00d7941424b111bf98790d4056d9b2d5d1c9fa72e7bda61041b6321301002952997d8174dcdd166685c031cac390e799a3ceda17e4ea817ce514fadc555ce273b90000000000204725ba6978cdc83f353dcdd9c15015011e0f11828bd6540abe313649776fae3e01002b3b3797d15b9852828d908603056fa5a80cb00b1da6ed0c4645ad1bd3a3d6b6e273b9000000000020fcff637e481a0bbdcecfec84290f2e23b531cca2bb661a73e69de16e28c5e23a01002c221e14b6533b4162babe18f963de27006e321eea4f9205251c4795d373170fe273b9000000000020028a00e881a3f32438ae753df6810b91a90d19f9a941033d3a9fb5468cb9de8801002da1ee19f20a5ea20d5d9ea102d813d0c933aac2ac9b3e2800f9aca093cd36fbe273b9000000000020004b4fb4c2f1f4348f96b64e6c90779af3a5ecbecc5bf98b849e5726394e83e701002fe45725a5ecd03e32ab4d757be0eaca09efa69acf304aa51141b2905dbd974fe273b9000000000020fe2759c7921d88e8d097c7800d6c69a33f012a114a7e0e9f0e4f9eaf0456142101003574ba403edcabd7a9d7c0863e1114a663d671a9c8d1fab1f84e876e377175eee273b90000000000203b300da63687034548e825b85eebc16478736da946a7ede0999c8c257399094b010035a91b4e477dae85fb1e37de096ef59c89c983f3a4c438da5dae39d1ab2d2b1be273b9000000000020672302b843ba690de34b519db7ff770978c4376b49d7c8c7f489fe5b85ceec59010038bb12f11c9e6447214277ad0f248f284faf5d44e86729bf6c2fcbad12713702e273b900000000002021913542bc4fea33b764664135e03b0015b91507c761af3bfb6af9737334742f0100474e05d02af596bcdf82ca2b86c186d2969bb8c18aebcf01a9080a9a3bb90574e273b900000000002026d26d0ea7b84a03e79e478eec1dee75423617660d01d6d25c7251ff27f1724e010049925c1511bd7fc50f00165000259f1b1da15eb8c3e3884055874fc5beea90f6e273b9000000000020e7a587f8263b1b57d5da4c261957de77636b6e2804fc0e225f2f6209202b2f9201004bf4b3524d31425d1d6d433bfc3f253e79fdac086b6fb48846bbffc7f25d035de273b9000000000020442c0ca1bc3e28862fd903ccaea3b99b4f1a450c6b3717a594259c0fe960693401004e472d7321d02ba73ec083f0a643839ed0165f46bf54b0b25876f0a7a3af3b08e273b9000000000020ee36bccf8c285ef88e3bbd98502f6b49390cfd1aad8255d1de01654691bd5b00010052e063cd1118874019aac418672f65a27d06e017bd62082e21320071247f009ce273b9000000000020225869d4ba6d33b960420ae129da71525cdb41eb8801a857e1f975f167381d9301005366bd23401ed7c877e6485d4d8ab449cefc22c4d496dc791b55d44cb66e8c91e273b90000000000201f25937e0bf0437dcab239a9f25d5e5aae8f657d38c28dc0cca73bc5e4e656ac0100568ba56d14dd9213727bd02885cfd259c7ef945d49411dddd0b3a859d88eb5ade273b900000000002053d638e8aa16ebb81725453faa18f3354d1d61dedcec63134a05672e7d6700980100585191234b8949f3747b39513c0a23065f325137ab617888e52532683c148ec2e273b9000000000020f859811059a1f247b54893ba47811fd6c0898e73fb194b848e9bb603238a402b01005e83f4463ffab97d063a57e105b780cdfd47c7661dfc404ffbe67df0f08589f5e273b90000000000205958a0e72bacd618b93a6c9759f91471d734c8a82e86e79a3fc9ae5c3cc3ab4501005f9ab3544276860e67fc5abc413b8efdab6b2c5bb50d1c012d1fef0ce775e802e273b9000000000020da0f17909301e4615157f84dfee88fa5a3beefffaaca82c29f7b34e9706f9f37010060a9c9cdc052f1b11eb294d3bd401c092e457cd87942a3c4e226eae035862f5de273b9000000000020a3f19cfa4642881c8115cab006f98a736da24bfc7644a9e69dc04769a9ab03bd0100634d47cb70bb95d50dcbbf3925664ffce3add3de12d3528f8f99b7a1968df99de273b90000000000201f33640c725bc3bcbe3db47a4faf99d82c4017086f684d805aaa8fa50f778ac7010063d08ebe3ae73d0de9488f68a509f7c431416a943624bea4812c89347dacc3a7e273b900000000002006aa44f56271039f32cdaec4881ae45c0b9946c8ae6346b8258458480f80b3d301006b8ae976f5a425ae0c042ac3e1b8cb318a19933a1e60e04901f9b1486a66c552e273b900000000002061d7db3d1e7fe7bdcf58dbbe92c554246d67ee406bcbb2a6e0b0e40445392b8101006c0f706931d5da9f19e23412c425fbdea70e5b3416f1e2210f283c3347d9f8fee273b90000000000209a63f2e6ea804fa307cdf5ca1faf212fcdd4a5f45a731711c45669a40dc3d7aa010071685038f12b2cdda527521b6227b1e4ea5bf37a64e5e8afeac03db00ddd010be273b9000000000020138206a1bcdf4614f38ecd4b1110368f8a0f957961f346c8762a9c9d45a755800100745d53ec4e5d31d368f3e1873ef1566bd8c4eda89975e198461bbb797a1e48f9e273b9000000000020b5276852c344be0a47b1ba32b5007bba018b247d91a7614484fea181d423665e0100746b5c4732a096773985e3e4ea043757bb30afd09175cc185ca97686f27bff7be273b9000000000020650c9d4b2ff086f6e9027a126007b235789833da5734c2a3a6cb36e294ca1911010076ec74eba40aacd18446c95459ad8a8a7125106bd0ecb237eaf26152be5d5f21e273b9000000000020cff4549a2e23ecba7c0db3b51c744712429ad4901689abf145737c377ee40189010078be0fd6761aca67fcd1a6e3efe0b57665628908b2496619a3bbad85a3ab5a87e273b9000000000020168c57e1f6aede8d9fe2b1c6bbb832e29e5f1d8149ff79e6e40e92f17efb29f0010079cdd7bdca5cc6da211db3c479edc3ef0b8d551d7ddc6b7fd78494413ff5ed49e273b90000000000204474d30207b91fb6eca9b9c233a7087d8b4e7855768d1e76c48c33c0f64b9faf0100020189fad2c9fe78631fd61eb5c980ca6714bb5c1315fa406991fa10b69baed3e173b9000000000020bda2eb813d1e942886398e77db0dd860f7e769daf38fc9030870d4bddbdfc4b100080a00000000000000010000b800b7fef1f3c18eeac265b8eebee9e65bee6ee435af02453bf39b58a8f452e273b9000000000020e1b441b0b5b4cdaf46f7acba2b7e0262620fd5b2ceb6e2ca7ef9d45cbb47e3c1002017f3a9bd36da0639153d3c38032217ea298eb1991e0a62cc5924e2dd71293735030301300030010000010100010200010300010400010500010600010700010800010900010a00010b00010c00010d00010e00010f00011000011100011200011300011400011500011600011700011800011900011a00011b00011c00011d00011e00011f00012000012100012200012300012400012500012600012700012800012900012a00012b00012c00012d00012e00012f00020132000101310001010301000000013300b4ced58018b75d7ba72a10fa97c09b7bf66533ff104bf9db1bfdb004b17d8eaa0183006eb3c5499c3cb4b022f20955f387312ed312389c552fa39e35d6423d0c74e273b90000000000208c1c43b2ac96240becd2db8f69b348109a0cf3604af4ac2bbf1d43e88d1196deb4ced58018b75d7ba72a10fa97c09b7bf66533ff104bf9db1bfdb004b17d8eaa6400000000000000004461000000000000',
},
},
],
Expand Down
8 changes: 4 additions & 4 deletions packages/core/src/api/alephium/AlephiumSignTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class AlephiumSignTransaction extends BaseMethod<HardwareAlephium
| TypedResponseMessage<'AlephiumBytecodeRequest'>,
data: Buffer,
scriptOpt?: Buffer,
dataOffset = 0
dataOffset = 0,

Check failure on line 57 in packages/core/src/api/alephium/AlephiumSignTransaction.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Delete `,`
): Promise<AlephiumSignedTx> => {
if (res.type === 'AlephiumSignedTx') {
return res.message;
Expand All @@ -80,7 +80,7 @@ export default class AlephiumSignTransaction extends BaseMethod<HardwareAlephium
['AlephiumSignedTx', 'AlephiumTxRequest', 'AlephiumBytecodeRequest'],
{
...resourceAckParams,
}
},

Check failure on line 83 in packages/core/src/api/alephium/AlephiumSignTransaction.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Delete `,`
);

return this.processTxRequest(typedCall, response, data, scriptOpt, newOffset);
Expand All @@ -100,7 +100,7 @@ export default class AlephiumSignTransaction extends BaseMethod<HardwareAlephium
['AlephiumSignedTx', 'AlephiumBytecodeRequest'],
{
...resourceAckParams,
}
},

Check failure on line 103 in packages/core/src/api/alephium/AlephiumSignTransaction.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Delete `,`
);

return this.processTxRequest(typedCall, response, data, scriptOpt, dataOffset);
Expand All @@ -126,7 +126,7 @@ export default class AlephiumSignTransaction extends BaseMethod<HardwareAlephium
['AlephiumSignedTx', 'AlephiumTxRequest', 'AlephiumBytecodeRequest'],
{
...this.params,
}
},

Check failure on line 129 in packages/core/src/api/alephium/AlephiumSignTransaction.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

Delete `,`
);

return this.processTxRequest(typedCall, res, data, scriptOpt, offset);
Expand Down
40 changes: 9 additions & 31 deletions packages/core/src/api/benfen/BenfenSignTransaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,6 @@ export default class BenfenSignTransaction extends BaseMethod<BenfenSignTx> {
};
}

supportChunkTransfer() {
const deviceType = getDeviceType(this.device.features);
const deviceFirmwareVersion = getDeviceFirmwareVersion(this.device.features).join('.');

if (DeviceModelToTypes.model_mini.includes(deviceType)) {
if (semver.valid(deviceFirmwareVersion)) {
return semver.gte(deviceFirmwareVersion, '3.7.0');
}
} else if (DeviceModelToTypes.model_touch.includes(deviceType)) {
if (semver.valid(deviceFirmwareVersion)) {
return semver.gte(deviceFirmwareVersion, '4.8.0');
}
}

return false;
}

chunkByteSize = 1024;

processTxRequest = async (
Expand Down Expand Up @@ -106,20 +89,15 @@ export default class BenfenSignTransaction extends BaseMethod<BenfenSignTx> {

async run() {
const typedCall = this.device.getCommands().typedCall.bind(this.device.getCommands());
let offset = 0;
let data: Buffer = Buffer.from('');

if (this.supportChunkTransfer()) {
offset = this.chunkByteSize;
data = Buffer.from(this.params.raw_tx, 'hex');
this.params = {
address_n: this.params.address_n,
coin_type: this.params.coin_type,
raw_tx: '',
data_initial_chunk: bytesToHex(new Uint8Array(data.buffer).subarray(0, this.chunkByteSize)),
data_length: data.length,
};
}
const offset = this.chunkByteSize;
const data = Buffer.from(this.params.raw_tx, 'hex');
this.params = {
address_n: this.params.address_n,
coin_type: this.params.coin_type,
raw_tx: '',
data_initial_chunk: bytesToHex(new Uint8Array(data.buffer).subarray(0, this.chunkByteSize)),
data_length: data.length,
};

const res = await typedCall('BenfenSignTx', ['BenfenSignedTx', 'BenfenTxRequest'], {
...this.params,
Expand Down
4 changes: 0 additions & 4 deletions packages/core/src/types/api/benfenGetAddress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ import type { CommonParams, Response } from '../params';
export type BenfenAddress = {
path: string;
pub?: string;
/**
* @deprecated Use `pub` instead.
*/
publicKey?: string;
} & HardwareBenfenAddress;

export type BenfenGetAddressParams = {
Expand Down
Loading

0 comments on commit 0d2c505

Please sign in to comment.