-
Notifications
You must be signed in to change notification settings - Fork 115
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
[TRA-84] Move SA module address transfers to use perpetual based SA accounts #1146
Changes from 4 commits
8f36ca0
7dfad36
4a3d396
4a7d3a9
78ebcda
b03e4d4
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 |
---|---|---|
|
@@ -1244,6 +1244,13 @@ func TestGetMidPrices(t *testing.T) { | |
mock.Anything, | ||
mock.Anything, | ||
).Return(nil) | ||
mockBankKeeper.On( | ||
"SendCoins", | ||
mock.Anything, | ||
mock.Anything, | ||
mock.Anything, | ||
mock.Anything, | ||
).Return(nil) | ||
Comment on lines
+1247
to
+1253
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. The |
||
|
||
ks := keepertest.NewClobKeepersTestContext(t, memclob, mockBankKeeper, indexer_manager.NewIndexerEventManagerNoop()) | ||
ctx := ks.Ctx.WithIsCheckTx(true) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -647,7 +647,7 @@ func TestPlaceShortTermOrder(t *testing.T) { | |
memClob := memclob.NewMemClobPriceTimePriority(false) | ||
mockBankKeeper := &mocks.BankKeeper{} | ||
mockBankKeeper.On( | ||
"SendCoinsFromModuleToModule", | ||
"SendCoins", | ||
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. The mock setup for Consider specifying the expected arguments to ensure the test accurately reflects the intended behavior. For example: mockBankKeeper.On(
"SendCoins",
mock.AnythingOfType("*context.Context"),
expectedFromAddress,
expectedToAddress,
expectedAmount,
).Return(nil) |
||
mock.Anything, | ||
mock.Anything, | ||
mock.Anything, | ||
Comment on lines
647
to
653
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.
In both It's recommended to replace |
||
|
@@ -875,7 +875,7 @@ func TestAddPreexistingStatefulOrder(t *testing.T) { | |
memClob := memclob.NewMemClobPriceTimePriority(false) | ||
mockBankKeeper := &mocks.BankKeeper{} | ||
mockBankKeeper.On( | ||
"SendCoinsFromModuleToModule", | ||
"SendCoins", | ||
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. Similar to the previous comment, the mock setup for Adjust the mock setup to include expected arguments for better test accuracy. |
||
mock.Anything, | ||
mock.Anything, | ||
mock.Anything, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test
TestLiquidateSubaccounts
thoroughly simulates the liquidation process with a detailed setup. However, it contains commented-out assertions at the end, suggesting that some verifications might be incomplete. Ensure that the test fully verifies the intended behavior by completing or updating these assertions.Consider completing or updating the commented-out assertions at the end of the test to ensure comprehensive verification of the liquidation process.
The test
TestPrepareCheckState
is comprehensive, simulating various states and checking for expected operations in the memclob. However, it contains commented-out assertions, suggesting that some verifications might be incomplete. Ensure that the test fully verifies the intended behavior by completing or updating these assertions.Consider completing or updating the commented-out assertions to ensure comprehensive verification of the
PrepareCheckState
function's behavior.