Add base position notional (#29)

This commit is contained in:
Jared Vu
2023-09-11 15:15:03 -07:00
committed by GitHub
parent 710e5ac113
commit 0c4b605666
4 changed files with 23 additions and 12 deletions
+2 -2
View File
@@ -37,9 +37,9 @@
"@cosmjs/proto-signing": "^0.31.0",
"@cosmjs/stargate": "^0.31.0",
"@cosmjs/tendermint-rpc": "^0.31.0",
"@dydxprotocol/abacus": "^0.4.16",
"@dydxprotocol/abacus": "^0.4.18",
"@dydxprotocol/v4-client-js": "^0.33.1",
"@dydxprotocol/v4-localization": "^0.0.25",
"@dydxprotocol/v4-localization": "^0.1.4",
"@ethersproject/providers": "^5.7.2",
"@js-joda/core": "^5.5.3",
"@radix-ui/react-collapsible": "^1.0.3",
+8 -8
View File
@@ -27,14 +27,14 @@ dependencies:
specifier: ^0.31.0
version: 0.31.0
'@dydxprotocol/abacus':
specifier: ^0.4.16
version: 0.4.16
specifier: ^0.4.18
version: 0.4.18
'@dydxprotocol/v4-client-js':
specifier: ^0.33.1
version: 0.33.1
'@dydxprotocol/v4-localization':
specifier: ^0.0.25
version: 0.0.25
specifier: ^0.1.4
version: 0.1.4
'@ethersproject/providers':
specifier: ^5.7.2
version: 5.7.2
@@ -1145,8 +1145,8 @@ packages:
resolution: {integrity: sha512-RpfLEtTlyIxeNPGKcokS+p3BZII/Q3bYxryFRglh5H3A3T8q9fsLYm72VYAMEOOIBLEa8o93kFLiBDUWKrwXZA==}
dev: true
/@dydxprotocol/abacus@0.4.16:
resolution: {integrity: sha512-FTvzgVZ0xjMRmfHwlyoluUSG4Uu4FUHPnaTvLLPl0ER0junmaVDrmBydAUMWMEYGiLyx/k0ln1cLUDrYF2aX6A==}
/@dydxprotocol/abacus@0.4.18:
resolution: {integrity: sha512-WqfgIgUPpMN2Dl2/kGARSBBgOCFrltUsVXnQOTEc4DJStCDn+7qHCfQMXSlvGMkYQE9eL5vKUOBbgyGtw/Pq1g==}
dev: false
/@dydxprotocol/v4-client-js@0.33.1:
@@ -1172,8 +1172,8 @@ packages:
- utf-8-validate
dev: false
/@dydxprotocol/v4-localization@0.0.25:
resolution: {integrity: sha512-Rp6VHA8z+nwgvTjjB3fvL8gY7bd4DYDHV+NPoL0MFuRm39vhFxGlBVAGDkXPkQTh6YU5BlZV2yXLkDeSfFqEBQ==}
/@dydxprotocol/v4-localization@0.1.4:
resolution: {integrity: sha512-wvpoP+FgiIAkqYCocRzlJXiljWfLPHg2QOB9cTajSIUYp635wphnacKwy5DnR6XByQ/H3r7BiF6Z8GDIa/d+Lw==}
dev: false
/@dydxprotocol/v4-proto@0.1.2:
+4
View File
@@ -5,6 +5,10 @@ export const tradeTooltips: TooltipStrings = {
title: stringGetter({ key: TOOLTIP_STRING_KEYS.ACCOUNT_LEVERAGE_TITLE }),
body: stringGetter({ key: TOOLTIP_STRING_KEYS.ACCOUNT_LEVERAGE_BODY }),
}),
'base-position-notional': ({ stringGetter }) => ({
title: stringGetter({ key: TOOLTIP_STRING_KEYS.BASE_POSITION_NOTIONAL_TITLE }),
body: stringGetter({ key: TOOLTIP_STRING_KEYS.BASE_POSITION_NOTIONAL_BODY }),
}),
'bracket-sl': ({ stringGetter }) => ({
title: stringGetter({ key: TOOLTIP_STRING_KEYS.BRACKET_ORDER_SL_TITLE }),
body: stringGetter({ key: TOOLTIP_STRING_KEYS.BRACKET_ORDER_SL_BODY }),
+9 -2
View File
@@ -29,6 +29,7 @@ export const MarketDetails: React.FC = () => {
if (!configs) return null;
const {
basePositionNotional,
tickSize,
stepSize,
initialMarginFraction,
@@ -113,11 +114,17 @@ export const MarketDetails: React.FC = () => {
),
},
{
key: 'initial-margin-fraction',
label: stringGetter({ key: STRING_KEYS.INITIAL_MARGIN_FRACTION }),
key: 'base-initial-margin-fraction',
label: stringGetter({ key: STRING_KEYS.BASE_INITIAL_MARGIN_FRACTION }),
tooltip: 'initial-margin-fraction',
value: <Output useGrouping value={initialMarginFraction} type={OutputType.SmallPercent} />,
},
{
key: 'base-position-notional',
label: stringGetter({ key: STRING_KEYS.BASE_POSITION_NOTIONAL }),
tooltip: 'base-position-notional',
value: <Output useGrouping value={basePositionNotional} type={OutputType.Number} />,
},
];
return (