forked from crypto-com/thaler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Problem (Fix crypto-com#949): deposit amount fee calculation is not c…
…orrect Solution: - Fix DummySigner for deposit transaction - Fix mock_enc_dec payload padding
- Loading branch information
Showing
5 changed files
with
41 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
from chainrpc import RPC | ||
from .common import wait_for_tx | ||
|
||
rpc = RPC() | ||
|
||
|
||
@pytest.mark.withfee | ||
def test_deposit_amount(addresses): | ||
'execute a deposit amount to self, check staking state change' | ||
bonded1 = int(rpc.staking.state(addresses.unbonded_staking)['bonded']) | ||
txid = rpc.staking.deposit_amount(addresses.unbonded_staking, 100000000) | ||
wait_for_tx(rpc, txid) | ||
rpc.wallet.sync() | ||
bonded2 = int(rpc.staking.state(addresses.unbonded_staking)['bonded']) | ||
assert bonded1 + 100000000 == bonded2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters