@@ -9,7 +9,7 @@ function createCommitTransactionPsbt(commitAddress: string, walletKeys: utxolib.
99
1010 commitTransactionPsbt . addOutput ( {
1111 script : commitTransactionOutputScript ,
12- value : BigInt ( 42 ) ,
12+ value : BigInt ( 10_000 ) ,
1313 } ) ;
1414
1515 const walletUnspent = testutil . mockWalletUnspent ( networks . testnet , BigInt ( 20_000 ) , { keys : walletKeys } ) ;
@@ -64,7 +64,7 @@ describe('inscriptions', () => {
6464 } ) ;
6565 } ) ;
6666
67- xdescribe ( 'Inscription Reveal Data' , ( ) => {
67+ describe ( 'Inscription Reveal Data' , ( ) => {
6868 it ( 'should sign reveal transaction and validate reveal size' , ( ) => {
6969 const walletKeys = testutil . getDefaultWalletKeys ( ) ;
7070 const inscriptionData = Buffer . from ( 'And Desert You' , 'ascii' ) ;
@@ -76,19 +76,20 @@ describe('inscriptions', () => {
7676 ) ;
7777
7878 const commitTransactionPsbt = createCommitTransactionPsbt ( address , walletKeys ) ;
79+ // Use the commit address (P2TR) as recipient to match the output script size
80+ // used in getInscriptionRevealSize estimation
7981 const fullySignedRevealTransaction = inscriptions . signRevealTransaction (
8082 walletKeys . user . privateKey as Buffer ,
8183 tapLeafScript ,
8284 address ,
83- '2N9R3mMCv6UfVbWEUW3eXJgxDeg4SCUVsu9' ,
85+ address ,
8486 commitTransactionPsbt . getUnsignedTx ( ) . toBuffer ( ) ,
8587 networks . testnet
8688 ) ;
8789
8890 fullySignedRevealTransaction . finalizeTapInputWithSingleLeafScriptAndSignature ( 0 ) ;
8991 const actualVirtualSize = fullySignedRevealTransaction . extractTransaction ( true ) . virtualSize ( ) ;
9092
91- // TODO(BG-70861): figure out why size is slightly different and re-enable test
9293 assert . strictEqual ( revealTransactionVSize , actualVirtualSize ) ;
9394 } ) ;
9495 } ) ;
0 commit comments