diff --git a/cardano-rosetta-server/test/e2e/fixture-data.ts b/cardano-rosetta-server/test/e2e/fixture-data.ts index 6b780ea5..442aaa76 100644 --- a/cardano-rosetta-server/test/e2e/fixture-data.ts +++ b/cardano-rosetta-server/test/e2e/fixture-data.ts @@ -1314,6 +1314,127 @@ export const CONSTRUCTION_PAYLOADS_WITH_TWO_WITHDRAWALS = { } }; +export const CONSTRUCTION_PAYLOADS_WITH_TWO_WITHDRAWALS = { + network_identifier: { + blockchain: 'cardano', + network: 'mainnet' + }, + operations: [ + { + operation_identifier: { + index: 0, + network_index: 0 + }, + type: operationType.INPUT, + status: 'success', + account: { + address: 'addr1vxa5pudxg77g3sdaddecmw8tvc6hmynywn49lltt4fmvn7cpnkcpx' + }, + amount: { + value: '-90000', + currency: { + symbol: 'ADA', + decimals: 6 + } + }, + coin_change: { + coin_identifier: { + // eslint-disable-next-line sonarjs/no-duplicate-string + identifier: '2f23fd8cca835af21f3ac375bac601f97ead75f2e79143bdf71fe2c4be043e8f:1' + }, + coin_action: 'coin_spent' + } + }, + { + operation_identifier: { + index: 1 + }, + related_operations: [ + { + index: 0 + } + ], + type: operationType.OUTPUT, + status: 'success', + account: { + address: 'addr1vxa5pudxg77g3sdaddecmw8tvc6hmynywn49lltt4fmvn7cpnkcpx' + }, + amount: { + value: '10000', + currency: { + symbol: 'ADA', + decimals: 6 + } + } + }, + { + operation_identifier: { + index: 2 + }, + related_operations: [ + { + index: 0 + } + ], + type: operationType.OUTPUT, + status: 'success', + account: { + address: 'addr1vxa5pudxg77g3sdaddecmw8tvc6hmynywn49lltt4fmvn7cpnkcpx' + }, + amount: { + value: '40000', + currency: { + symbol: 'ADA', + decimals: 6 + } + } + }, + { + operation_identifier: { + index: 3 + }, + type: operationType.WITHDRAWAL, + status: 'success', + amount: { + value: '10000', + currency: { + symbol: 'ADA', + decimals: 6 + } + }, + metadata: { + staking_credential: { + hex_bytes: '1B400D60AAF34EAF6DCBAB9BBA46001A23497886CF11066F7846933D30E5AD3F', + curve_type: 'edwards25519' + } + } + }, + { + operation_identifier: { + index: 4 + }, + type: operationType.WITHDRAWAL, + status: 'success', + amount: { + value: '10000', + currency: { + symbol: 'ADA', + decimals: 6 + } + }, + metadata: { + staking_credential: { + hex_bytes: '31fc9813a71d8db12a4f2e3382ab0671005665b70d0cd1a9fb6c4a4e9ceabc90', + curve_type: 'edwards25519' + } + } + } + ], + metadata: { + ttl: 1000 + } +}; + export const CONSTRUCTION_PAYLOADS_WITH_STAKE_KEY_REGISTRATION_AND_WITHDRAWAL = { network_identifier: { blockchain: 'cardano', @@ -1404,7 +1525,7 @@ export const CONSTRUCTION_PAYLOADS_WITH_STAKE_KEY_REGISTRATION_AND_WITHDRAWAL = }, { operation_identifier: { - index: 3 + index: 4 }, type: operationType.WITHDRAWAL, status: 'success',