near / near-workspaces-js

Write tests once, run them both on NEAR TestNet and a controlled NEAR Sandbox local environment
https://near.github.io/near-workspaces-js/
GNU General Public License v3.0
42 stars 21 forks source link

Not auto create account when insufficient balance #113

Closed ailisp closed 2 years ago

ailisp commented 2 years ago

@MaximusHaximus pointed out that auto create account, transfer remaining balance to new account is the current behavior whenever the test account doesn't sufficient balance. However, if we want to test the transaction should fail when insufficient balance, current approach blocks us. It's wise to leave this manual and transparent to the user.

I took a deep look recently. It only applied to Testnet AccountManager. I guess the reason is to workaround CI, but it's a wrong place of this mechanism: if needed, txn should be explicitly retried in test code, not library code, with recreated account.