11import { isSuccessCommandResult } from "@ledgerhq/device-management-kit" ;
22
33import {
4- ProvideWeb3CheckCommand ,
4+ ProvideTransactionCheckCommand ,
55 TRANSACTION_CHECK_CLA ,
66 TRANSACTION_CHECK_INS ,
77 TRANSACTION_CHECK_P1_PROVIDE ,
8- } from "@internal/app-binder/command/ProvideWeb3CheckCommand " ;
8+ } from "@internal/app-binder/command/ProvideTransactionCheckCommand " ;
99import {
1010 P2_EXTEND ,
1111 P2_MORE ,
1212} from "@internal/app-binder/command/utils/apduChunking" ;
1313
14- describe ( "ProvideWeb3CheckCommand " , ( ) => {
14+ describe ( "ProvideTransactionCheckCommand " , ( ) => {
1515 describe ( "name" , ( ) => {
16- it ( "should be 'provideWeb3Check '" , ( ) => {
17- const command = new ProvideWeb3CheckCommand ( {
16+ it ( "should be 'provideTransactionCheck '" , ( ) => {
17+ const command = new ProvideTransactionCheckCommand ( {
1818 payload : new Uint8Array ( [ 0xaa ] ) ,
1919 isFirstChunk : true ,
2020 hasMore : false ,
2121 } ) ;
22- expect ( command . name ) . toBe ( "provideWeb3Check " ) ;
22+ expect ( command . name ) . toBe ( "provideTransactionCheck " ) ;
2323 } ) ;
2424 } ) ;
2525
2626 describe ( "getApdu" , ( ) => {
2727 const payload = new Uint8Array ( [ 0xaa , 0xbb , 0xcc ] ) ;
2828
2929 it ( "single chunk: P2 = 0x00 (no EXTEND, no MORE)" , ( ) => {
30- const command = new ProvideWeb3CheckCommand ( {
30+ const command = new ProvideTransactionCheckCommand ( {
3131 payload,
3232 isFirstChunk : true ,
3333 hasMore : false ,
@@ -43,7 +43,7 @@ describe("ProvideWeb3CheckCommand", () => {
4343 } ) ;
4444
4545 it ( "first of many: P2 = P2_MORE" , ( ) => {
46- const command = new ProvideWeb3CheckCommand ( {
46+ const command = new ProvideTransactionCheckCommand ( {
4747 payload,
4848 isFirstChunk : true ,
4949 hasMore : true ,
@@ -54,7 +54,7 @@ describe("ProvideWeb3CheckCommand", () => {
5454 } ) ;
5555
5656 it ( "middle chunk: P2 = P2_MORE | P2_EXTEND" , ( ) => {
57- const command = new ProvideWeb3CheckCommand ( {
57+ const command = new ProvideTransactionCheckCommand ( {
5858 payload,
5959 isFirstChunk : false ,
6060 hasMore : true ,
@@ -65,7 +65,7 @@ describe("ProvideWeb3CheckCommand", () => {
6565 } ) ;
6666
6767 it ( "last chunk: P2 = P2_EXTEND" , ( ) => {
68- const command = new ProvideWeb3CheckCommand ( {
68+ const command = new ProvideTransactionCheckCommand ( {
6969 payload,
7070 isFirstChunk : false ,
7171 hasMore : false ,
@@ -78,7 +78,7 @@ describe("ProvideWeb3CheckCommand", () => {
7878
7979 describe ( "parseResponse" , ( ) => {
8080 it ( "should return success on 0x9000" , ( ) => {
81- const command = new ProvideWeb3CheckCommand ( {
81+ const command = new ProvideTransactionCheckCommand ( {
8282 payload : new Uint8Array ( [ 0xaa ] ) ,
8383 isFirstChunk : true ,
8484 hasMore : false ,
@@ -91,7 +91,7 @@ describe("ProvideWeb3CheckCommand", () => {
9191 } ) ;
9292
9393 it ( "should return error on non-success status" , ( ) => {
94- const command = new ProvideWeb3CheckCommand ( {
94+ const command = new ProvideTransactionCheckCommand ( {
9595 payload : new Uint8Array ( [ 0xaa ] ) ,
9696 isFirstChunk : true ,
9797 hasMore : false ,
0 commit comments