Skip to content
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

Static typing: Historical funding and fixing issues with isolated market orders #739

Merged
merged 5 commits into from
Nov 5, 2024

Conversation

ruixhuang
Copy link
Contributor

Tested on Android and iOS.

@ruixhuang ruixhuang marked this pull request as ready for review November 4, 2024 18:42
@@ -68,7 +68,7 @@ internal class ReceiptCalculator {
listOf(
ReceiptLine.Equity,
ReceiptLine.MarginUsage,
ReceiptLine.Fee,
ReceiptLine.TransferFee,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mobile only. FE web doesn't use this.

@@ -193,11 +193,12 @@ internal class SubaccountTransformerV2(
hasTransfer: Boolean = false,
) {
val deltaMarketId = delta?.marketId
val positions = subaccount.openPositions
val positions = subaccount.openPositions ?: mapOf()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixing issue when create a new subaccount for isolated margin.

usdcSize = usdcSize,
fee = null,
fee = transfer.fee,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mobile only. FE web doesn't use this.

@@ -27,7 +27,8 @@ enum class ReceiptLine(val rawValue: String) {
CrossMarginUsage("CROSS_MARGIN_USAGE"),
PositionMargin("POSITION_MARGIN"),
PositionLeverage("POSITION_LEVERAGE"),
LiquidationPrice("LIQUIDATION_PRICE");
LiquidationPrice("LIQUIDATION_PRICE"),
TransferFee("TRANSFER_FEE");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mobile only. FE web doesn't use this.

val modified = input?.mutable() ?: iMapOf<String, Any>().mutable()
modified.safeSet("transfer.fee", gas)
update(StateChanges(iListOf(Changes.input)), oldState)
if (stateMachine.staticTyping) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding processing for transfer gas

tyleroooo
tyleroooo previously approved these changes Nov 5, 2024
Copy link
Contributor

@tyleroooo tyleroooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really don't know what's going on here. My approval means very little in this case.

Copy link
Contributor

@tyleroooo tyleroooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

continuing to yolo stamp

@ruixhuang ruixhuang merged commit 338b6e6 into main Nov 5, 2024
3 checks passed
@ruixhuang ruixhuang deleted the feature/historical_fundings branch November 5, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants