@@ -12,8 +12,7 @@ describe("SignTransactionCommand", () => {
1212 derivationPath : "44'/133'/0'/0/0" ,
1313 lockTime : 1 ,
1414 sigHashType : 0x01 ,
15- expiryHeight : new Uint8Array ( [ 0x01 , 0x02 , 0x03 , 0x04 ] ) ,
16- additionals : [ "zcash" ] ,
15+ expiryHeight : Buffer . from ( [ 0x01 , 0x02 , 0x03 , 0x04 ] ) ,
1716 } ) ;
1817
1918 const apdu = command . getApdu ( ) . getRawApdu ( ) ;
@@ -27,6 +26,7 @@ describe("SignTransactionCommand", () => {
2726 derivationPath : "44'/133'/0'/0/0" ,
2827 lockTime : 0 ,
2928 sigHashType : 0x01 ,
29+ expiryHeight : Buffer . alloc ( 4 , 0 ) ,
3030 } ) ;
3131 const response = command . parseResponse (
3232 new ApduResponse ( {
@@ -44,11 +44,12 @@ describe("SignTransactionCommand", () => {
4444 ) ;
4545 } ) ;
4646
47- it ( "appends 4-byte zero expiry when expiryHeight omitted (no additionals required) " , ( ) => {
47+ it ( "appends 4-byte expiry height from task-normalized buffer " , ( ) => {
4848 const command = new SignTransactionCommand ( {
4949 derivationPath : "44'/133'/0'/1/2" ,
5050 lockTime : 0 ,
5151 sigHashType : 0x01 ,
52+ expiryHeight : Buffer . alloc ( 4 , 0 ) ,
5253 } ) ;
5354
5455 expect ( Buffer . from ( command . getApdu ( ) . getRawApdu ( ) ) . toString ( "hex" ) ) . toBe (
@@ -61,6 +62,7 @@ describe("SignTransactionCommand", () => {
6162 derivationPath : "44'/133'/0'/0/0" ,
6263 lockTime : 0 ,
6364 sigHashType : 0x01 ,
65+ expiryHeight : Buffer . alloc ( 4 , 0 ) ,
6466 } ) ;
6567 const result = command . parseResponse (
6668 new ApduResponse ( {
0 commit comments