Skip to content
Permalink
Browse files

Transfer jest tests (#1180)

* better daedalus tests

* legacy Yoroi transfer tests
  • Loading branch information
SebastienGllmt committed Dec 3, 2019
1 parent 34b6552 commit b793db31dc1619ac614048b2477bef0c0067bb08
@@ -156,8 +156,6 @@ const nextRegularSpend: void => Array<RemoteTransaction> = () => [{
amount: '1100000'
},
{
// eslint-disable-next-line max-len
// '0465267961fefd53aefe4cf741dc0df9902d360bca0de4c0abe88ca89d0d08dd3dd993c5b8ca62c78801d3228a8de6b9e18217b001820c24d60c1bcd91c895d585'
address: getAddressForType(
TX_TEST_MNEMONIC_1,
[
@@ -18,7 +18,6 @@ import type {
} from '../../../../types/TransferTypes';
import { RustModule } from '../../lib/cardanoCrypto/rustLoader';
import type { AddressKeyMap } from '../types';
import environment from '../../../../environment';
import { buildDaedalusTransferTx as shelleyFormatDaedalusTx } from '../shelley/daedalusTransfer';
import { buildDaedalusTransferTx as legacyFormatDaedalusTx } from '../byron/daedalusTransfer';

@@ -71,6 +70,7 @@ export async function buildDaedalusTransferTx(payload: {|
addressKeys: AddressKeyMap,
outputAddr: string,
getUTXOsForAddresses: AddressUtxoFunc,
legacy: boolean,
|}): Promise<TransferTx> {
const senderUtxos = await toSenderUtxos({
outputAddr: payload.outputAddr,
@@ -83,7 +83,7 @@ export async function buildDaedalusTransferTx(payload: {|
addressKeys: payload.addressKeys,
senderUtxos,
};
return environment.isShelley()
? shelleyFormatDaedalusTx(txRequest)
: legacyFormatDaedalusTx(txRequest);
return payload.legacy
? legacyFormatDaedalusTx(txRequest)
: shelleyFormatDaedalusTx(txRequest);
}

0 comments on commit b793db3

Please sign in to comment.
You can’t perform that action at this time.