Skip to content

Commit

Permalink
Merge pull request #3390 from input-output-hk/piotr/mint_to_foreign_w…
Browse files Browse the repository at this point in the history
…allet_e2e_test_failing

Remove `min_utxo_value + lovelace_per_utxo` check from minting to foreign wallet test
  • Loading branch information
piotr-iohk authored Jul 15, 2022
2 parents 381c237 + aceef62 commit ddc52e2
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions test/e2e/spec/e2e_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,6 @@ def get_policy_id_from_decode(tx_decoded_mint_or_burn)
# Tx4: Burns them
it "Mint to foreign wallet / Cannot burn if I don't have keys" do

src_before = get_shelley_balances(@wid)
target_before = get_shelley_balances(@target_id)
address = SHELLEY.addresses.list(@target_id).first['id']
policy_script = 'cosigner#0'
Expand All @@ -1365,21 +1364,8 @@ def get_policy_id_from_decode(tx_decoded_mint_or_burn)

tx_id = tx_submitted['id']
wait_for_tx_in_ledger(@wid, tx_id)
src_after_minting = get_shelley_balances(@wid)
target_after_minting = get_shelley_balances(@target_id)

# verify ADA balance is correct on src wallet:
# we are minting and sending to external address
# therefore the cost is fee + mintUTxOValue of ADA that is required
# for transfering the assets over the network
# in this the total `cost` is pure ADA minUTxOValue + 11 'utxo words' + fee
min_utxo_value = NETWORK.parameters['minimum_utxo_value']['quantity'].to_i
era = NETWORK.information['node_era']
lovelace_per_utxo_word = (era == 'babbage' ? 34480 : 34482)
min_utxo_value_tokens = min_utxo_value + 11 * lovelace_per_utxo_word
expect(src_after_minting['available']).to eq (src_before['available'] - expected_fee - min_utxo_value_tokens)
expect(src_after_minting['total']).to eq (src_before['total'] - expected_fee - min_utxo_value_tokens)

# verify assets have been minted and on target wallet's balance
assets_to_check = get_assets_from_decode(tx_decoded['mint'])
assets = assets_balance(target_after_minting['assets_total'], { assets_to_check: assets_to_check })
Expand Down

0 comments on commit ddc52e2

Please sign in to comment.