-
Notifications
You must be signed in to change notification settings - Fork 104
Eth connector statistic #104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
34bea1e
78b9b01
830e9ee
e9af627
aadbec6
454f937
d149ef3
9427dcf
49780be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -585,3 +585,16 @@ fn test_ft_transfer_call_fee_greater_than_amount() { | |
| let balance = total_supply_eth(&master_account, CONTRACT_ACC); | ||
| assert_eq!(balance, 0); | ||
| } | ||
|
|
||
| #[test] | ||
| fn test_get_accounts_counter() { | ||
| let (master_account, contract) = init(CUSTODIAN_ADDRESS); | ||
| call_deposit_near(&contract, CONTRACT_ACC); | ||
|
|
||
| let counter = master_account.view(CONTRACT_ACC.into(), "get_accounts_counter", &[]); | ||
| let counter: u128 = String::from_utf8(counter.unwrap()) | ||
| .unwrap() | ||
| .parse() | ||
| .unwrap(); | ||
| assert_eq!(counter, 2); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is the value 2? I only see one call to deposit so I would only expect there to be one account.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please look to that test:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right, there is a fee as well, so one deposit creates two accounts. Thanks for clarifying; it might be worth saying this in a comment as well. Also, I recommend extending the test to have a transfer between those two accounts after the deposit, and confirm that the count does not change (because the number of unique accounts is the same). |
||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.