Deprecates "funding account" and account creation options#1130
Deprecates "funding account" and account creation options#1130KPrasch merged 2 commits intonucypher:sekanjabinfrom
Conversation
| if not self.token_balance >= amount: | ||
| raise self.StakerError(f"Insufficient token balance ({self.token_agent}) " | ||
| f"for new stake initialization of {amount}") | ||
| raise self.InsufficientTokens(f"Insufficient token balance ({self.token_agent}) " |
| if checksum_address: | ||
| if not is_checksum_address(checksum_address): | ||
| raise ValueError(f"{checksum_address} is an invalid EIP-55 checksum address.") | ||
| if not is_checksum_address(checksum_address): |
There was a problem hiding this comment.
Don't we have a decorator for this, IIRC?
| @click.option('--offline', help="Operate in offline mode", is_flag=True) | ||
| @click.option('--provider-uri', help="Blockchain provider's URI i.e. 'file:///path/to/geth.ipc'", type=click.STRING) | ||
| @click.option('--funding-address', help="Address to stake NU ERC20 tokens", type=EIP55_CHECKSUM_ADDRESS) | ||
| @click.option('--pre-funded', help="Do not fund new stake's accounts", is_flag=True, default=False) |
|
|
||
|
|
||
| def test_initialize_stake_with_existing_staking_account(software_stakeholder, stake_value, token_economics): | ||
| def test_initialize_stake_with_existing_account(software_stakeholder, stake_value, token_economics): |
| _receipt = testerchain.wait_for_receipt(txhash) | ||
|
|
||
| token_agent = Agency.get_agent(NucypherTokenAgent) | ||
| token_agent.transfer(amount=NU(200_000, 'NU').to_nunits(), |
|
Looks good, but somehow I have the following problem. |
|
Despite having the registry set, raises an exception with the following message: Should all the commands work after merging this PR? |
|
@michwill - I suspect that you were running the tests at the same time you were running this command? I think there is an outstanding bug, wherein your config file is overwritten by some test. Looking into this (This is Issue is not introduced in this PR). Yes - I think all previously functional commands will still work here. |
|
@KPrasch not at the same time: before. But I see what you say - maybe can remove all configs after running tests |
Codecov Report
@@ Coverage Diff @@
## sekanjabin #1130 +/- ##
===============================================
- Coverage 82% 58.46% -23.55%
===============================================
Files 72 71 -1
Lines 9733 9616 -117
===============================================
- Hits 7982 5622 -2360
- Misses 1751 3994 +2243
Continue to review full report at Codecov.
|
|
@michwill - I added an additional mock to help ensure that the default configuration root is not being written to the disk during tests. I do not know for certain that it is fixed. |
The name says it all.