@@ -1465,9 +1465,9 @@ describe('Recovery:', function () {
14651465 let recoveryParams ;
14661466
14671467 it ( 'should construct a recovery tx with MPCv2 TSS' , async function ( ) {
1468- recoveryNocks . nockVetRecovery ( bitgo ) ;
14691468 const basecoin = bitgo . coin ( 'tvet' ) ;
14701469 const baseAddress = ethLikeDKLSKeycard . senderAddress ;
1470+ recoveryNocks . nockVetRecovery ( bitgo , baseAddress ) ;
14711471 recoveryParams = {
14721472 userKey : ethLikeDKLSKeycard . userKey ,
14731473 backupKey : ethLikeDKLSKeycard . backupKey ,
@@ -1484,48 +1484,21 @@ describe('Recovery:', function () {
14841484 recovery . should . have . property ( 'tx' ) ;
14851485 } ) ;
14861486
1487- // it('should construct an unsigned sweep tx with TSS', async function () {
1488- // recoveryNocks.nockEthLikeRecovery(bitgo, nockUnsignedSweepTSSData);
1489- //
1490- // const basecoin = bitgo.coin('hteth');
1491- //
1492- // const userKey =
1493- // '0234eb39b22fed523ece7c78da29ba1f1de5b64a6e48013e0914de793bc1df0570e779de04758732734d97e54b782c8b336283811af6a2c57bd81438798e1c2446';
1494- // const backupKey =
1495- // '0234eb39b22fed523ece7c78da29ba1f1de5b64a6e48013e0914de793bc1df0570e779de04758732734d97e54b782c8b336283811af6a2c57bd81438798e1c2446';
1496- //
1497- // recoveryParams = {
1498- // userKey: userKey,
1499- // backupKey: backupKey,
1500- // walletContractAddress: '0xe7406dc43d13f698fb41a345c7783d39a4c2d191',
1501- // recoveryDestination: '0xac05da78464520aa7c9d4c19bd7a440b111b3054',
1502- // walletPassphrase: TestBitGo.V2.TEST_RECOVERY_PASSCODE,
1503- // isTss: true,
1504- // gasPrice: '20000000000',
1505- // gasLimit: '500000',
1506- // replayProtectionOptions: {
1507- // chain: 42,
1508- // hardfork: 'london',
1509- // },
1510- // };
1511- //
1512- // const transaction = await basecoin.recover(recoveryParams);
1513- // should.exist(transaction);
1514- // const output = transaction as unknown as UnsignedSweepTxMPCv2;
1515- // output.should.have.property('txRequests');
1516- // output.txRequests.should.have.length(1);
1517- // output.txRequests[0].should.have.property('transactions');
1518- // output.txRequests[0].transactions.should.have.length(1);
1519- // output.txRequests[0].should.have.property('walletCoin');
1520- // output.txRequests[0].transactions[0].should.have.property('unsignedTx');
1521- // output.txRequests[0].transactions[0].unsignedTx.should.have.property('serializedTxHex');
1522- // output.txRequests[0].transactions[0].unsignedTx.should.have.property('signableHex');
1523- // output.txRequests[0].transactions[0].unsignedTx.should.have.property('derivationPath');
1524- // output.txRequests[0].transactions[0].unsignedTx.should.have.property('feeInfo');
1525- // output.txRequests[0].transactions[0].unsignedTx.should.have.property('parsedTx');
1526- // const parsedTx = output.txRequests[0].transactions[0].unsignedTx.parsedTx as { spendAmount: string };
1527- // parsedTx.should.have.property('spendAmount');
1528- // (output.txRequests[0].transactions[0].unsignedTx.parsedTx as { outputs: any[] }).should.have.property('outputs');
1529- // });
1487+ it ( 'should construct an unsigned sweep tx with TSS' , async function ( ) {
1488+ recoveryNocks . nockVetRecovery ( bitgo , '0xad848d2c97a08b2cd5e7f28f76ecd45dd0f82e0e' ) ;
1489+ const basecoin = bitgo . coin ( 'tvet' ) ;
1490+
1491+ const unsignedSweepRecoveryParams = {
1492+ bitgoKey :
1493+ '03f54983c529802697d9a2320ded23eb7f15118fcba01156356c2264f04d32b4caa77fcf8cf3f73547078e984f28787c4c1e694586214b609e45b6de9cc32ad6e5' ,
1494+ recoveryDestination : ethLikeDKLSKeycard . destinationAddress ,
1495+ } ;
1496+
1497+ const recovery = await basecoin . recover ( unsignedSweepRecoveryParams ) ;
1498+ should . exist ( recovery ) ;
1499+ recovery . should . have . property ( 'txHex' ) ;
1500+ recovery . should . have . property ( 'coin' ) ;
1501+ recovery . coin . should . equal ( 'tvet' ) ;
1502+ } ) ;
15301503 } ) ;
15311504} ) ;
0 commit comments