ink icon indicating copy to clipboard operation
ink copied to clipboard

Balance integration fix

Open faculerena opened this issue 2 years ago • 2 comments

Summary

  • [N] y/n | Does it introduce breaking changes?
  • [N] y/n | Is it dependant on the specific version of cargo-contract or pallet-contracts?

Updated the default balance in integration tests.

Description

We updated the default balance in integration tests to be the same as in e2e-tests. This is not definitive, as we want opinions if this should be like this.

Checklist before requesting a review

  • [X] My code follows the style guidelines of this project
  • [ ] I have added an entry to CHANGELOG.md
  • [X] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [X] Any dependent changes have been merged and published in downstream modules

faculerena avatar Nov 09 '23 18:11 faculerena

I changed the value to be the same as the testnet genesis. This is the same value that this test gives in an e2e test.

  let alice_balance = client
      .balance(ink_e2e::account_id(ink_e2e::AccountKeyring::Alice))
      .await
      .expect("Failed to get account balance");

In this case, alice_balance is (1 << 60), and for each account in the keyring this is true too, except for one and two, that is 0.

faculerena avatar Nov 15 '23 14:11 faculerena