|
4 | 4 | babbageTxBodyWithScripts,
|
5 | 5 | contextWithKnownAddresses,
|
6 | 6 | contextWithoutKnownAddresses,
|
| 7 | + knownAddress, |
7 | 8 | knownAddressKeyPath,
|
8 | 9 | knownAddressPaymentKeyPath,
|
9 | 10 | knownAddressStakeKeyPath,
|
@@ -45,6 +46,11 @@ describe('tx', () => {
|
45 | 46 | expect(
|
46 | 47 | await txToTrezor(txBody, {
|
47 | 48 | ...contextWithKnownAddresses,
|
| 49 | + outputsFormat: [ |
| 50 | + Trezor.PROTO.CardanoTxOutputSerializationFormat.ARRAY_LEGACY, |
| 51 | + Trezor.PROTO.CardanoTxOutputSerializationFormat.ARRAY_LEGACY, |
| 52 | + Trezor.PROTO.CardanoTxOutputSerializationFormat.ARRAY_LEGACY |
| 53 | + ], |
48 | 54 | txInKeyPathMap: { [TxInId(txBody.inputs[0])]: knownAddressPaymentKeyPath }
|
49 | 55 | })
|
50 | 56 | ).toEqual({
|
@@ -202,10 +208,13 @@ describe('tx', () => {
|
202 | 208 | expect(
|
203 | 209 | await txToTrezor(babbageTxBodyWithScripts, {
|
204 | 210 | ...contextWithKnownAddresses,
|
| 211 | + outputsFormat: [ |
| 212 | + Trezor.PROTO.CardanoTxOutputSerializationFormat.MAP_BABBAGE, |
| 213 | + Trezor.PROTO.CardanoTxOutputSerializationFormat.MAP_BABBAGE |
| 214 | + ], |
205 | 215 | txInKeyPathMap: {
|
206 | 216 | [TxInId(babbageTxBodyWithScripts.inputs[0])]: knownAddressPaymentKeyPath
|
207 |
| - }, |
208 |
| - useBabbageOutputs: true |
| 217 | + } |
209 | 218 | })
|
210 | 219 | ).toEqual({
|
211 | 220 | additionalWitnessRequests: [
|
@@ -286,7 +295,12 @@ describe('tx', () => {
|
286 | 295 | });
|
287 | 296 |
|
288 | 297 | test('can map transaction with collaterals', async () => {
|
289 |
| - expect(await txToTrezor(txBodyWithCollaterals, contextWithoutKnownAddresses)).toEqual({ |
| 298 | + expect( |
| 299 | + await txToTrezor(txBodyWithCollaterals, { |
| 300 | + ...contextWithoutKnownAddresses, |
| 301 | + collateralReturnFormat: Trezor.PROTO.CardanoTxOutputSerializationFormat.ARRAY_LEGACY |
| 302 | + }) |
| 303 | + ).toEqual({ |
290 | 304 | additionalWitnessRequests: [],
|
291 | 305 | collateralInputs: [
|
292 | 306 | {
|
@@ -325,11 +339,16 @@ describe('tx', () => {
|
325 | 339 | expect(
|
326 | 340 | await txToTrezor(plutusTxWithBabbage, {
|
327 | 341 | ...contextWithKnownAddresses,
|
| 342 | + collateralReturnFormat: Trezor.PROTO.CardanoTxOutputSerializationFormat.MAP_BABBAGE, |
| 343 | + knownAddresses: [knownAddress], |
| 344 | + outputsFormat: [ |
| 345 | + Trezor.PROTO.CardanoTxOutputSerializationFormat.MAP_BABBAGE, |
| 346 | + Trezor.PROTO.CardanoTxOutputSerializationFormat.MAP_BABBAGE |
| 347 | + ], |
328 | 348 | txInKeyPathMap: {
|
329 | 349 | [TxInId(plutusTxWithBabbage.inputs[0])]: knownAddressPaymentKeyPath,
|
330 | 350 | [TxInId(plutusTxWithBabbage.collaterals[0])]: knownAddressPaymentKeyPath
|
331 |
| - }, |
332 |
| - useBabbageOutputs: true |
| 351 | + } |
333 | 352 | })
|
334 | 353 | ).toEqual({
|
335 | 354 | additionalWitnessRequests: [
|
|
0 commit comments