Bump TS client

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2023-11-24 11:07:58 +01:00
parent 0fd43fd39d
commit 4a53a1006e
9 changed files with 15 additions and 15 deletions

View File

@ -12,7 +12,7 @@ const AccountOrders = () => {
const tabsWithCount: [string, number][] = useMemo(() => { const tabsWithCount: [string, number][] = useMemo(() => {
const stopOrdersCount = const stopOrdersCount =
mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.hasData) mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.isConfigured)
?.length || 0 ?.length || 0
const tabs: [string, number][] = [ const tabs: [string, number][] = [
['trade:limit', Object.values(openOrders).flat().length], ['trade:limit', Object.values(openOrders).flat().length],

View File

@ -29,7 +29,7 @@ const AccountTabs = () => {
unsettledPerpPositions?.length unsettledPerpPositions?.length
const stopOrdersCount = const stopOrdersCount =
mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.hasData) mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.isConfigured)
?.length || 0 ?.length || 0
const tabs: [string, number][] = [ const tabs: [string, number][] = [

View File

@ -20,7 +20,7 @@ const SwapInfoTabs = () => {
['swap:swap-history', 0], ['swap:swap-history', 0],
] ]
const stopOrdersCount = const stopOrdersCount =
mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.hasData) mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.isConfigured)
?.length || 0 ?.length || 0
tabs.splice(1, 0, ['trade:trigger-orders', stopOrdersCount]) tabs.splice(1, 0, ['trade:trigger-orders', stopOrdersCount])
return tabs return tabs

View File

@ -136,7 +136,7 @@ const SwapOrders = () => {
const orders = useMemo(() => { const orders = useMemo(() => {
if (!mangoAccount) return [] if (!mangoAccount) return []
return mangoAccount.tokenConditionalSwaps.filter((tcs) => tcs.hasData) return mangoAccount.tokenConditionalSwaps.filter((tcs) => tcs.isConfigured)
}, [mangoAccount]) }, [mangoAccount])
const formattedTableData = useCallback(() => { const formattedTableData = useCallback(() => {

View File

@ -36,7 +36,7 @@ const TradeInfoTabs = () => {
unsettledPerpPositions?.length unsettledPerpPositions?.length
const stopOrdersCount = const stopOrdersCount =
mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.hasData) mangoAccount?.tokenConditionalSwaps.filter((tcs) => tcs.isConfigured)
?.length || 0 ?.length || 0
return [ return [

View File

@ -80,7 +80,7 @@ const getTriggerOrders = () => {
const mangoAccount = mangoStore.getState().mangoAccount.current const mangoAccount = mangoStore.getState().mangoAccount.current
if (!mangoAccount) return [] if (!mangoAccount) return []
const triggerOrders = mangoAccount.tokenConditionalSwaps.filter( const triggerOrders = mangoAccount.tokenConditionalSwaps.filter(
(tcs) => tcs.hasData, (tcs) => tcs.isConfigured,
) )
return triggerOrders return triggerOrders
} }
@ -821,7 +821,7 @@ const TradingViewChart = () => {
const openOrders = account.openOrders const openOrders = account.openOrders
const triggerOrders = const triggerOrders =
account.current?.tokenConditionalSwaps.filter( account.current?.tokenConditionalSwaps.filter(
(tcs) => tcs.hasData, (tcs) => tcs.isConfigured,
) || [] ) || []
const orderLines = mangoStore.getState().tradingView.orderLines const orderLines = mangoStore.getState().tradingView.orderLines
tvWidgetRef.current?.onChartReady(() => { tvWidgetRef.current?.onChartReady(() => {

View File

@ -73,7 +73,7 @@ export default function useMangoAccountAccounts() {
const usedPerpOo: PerpOo[] = perpOpenOrders.filter( const usedPerpOo: PerpOo[] = perpOpenOrders.filter(
(p) => p.orderMarket !== 65535, (p) => p.orderMarket !== 65535,
) )
const usedTcs = tokenConditionalSwaps.filter((tcs) => tcs.hasData) const usedTcs = tokenConditionalSwaps.filter((tcs) => tcs.isConfigured)
const emptyPerps = usedPerps.filter( const emptyPerps = usedPerps.filter(
(p) => (p) =>

View File

@ -23,7 +23,7 @@
"dependencies": { "dependencies": {
"@blockworks-foundation/mango-feeds": "0.1.7", "@blockworks-foundation/mango-feeds": "0.1.7",
"@blockworks-foundation/mango-mints-redemption": "^0.0.10", "@blockworks-foundation/mango-mints-redemption": "^0.0.10",
"@blockworks-foundation/mango-v4": "0.20.4", "@blockworks-foundation/mango-v4": "0.20.6",
"@blockworks-foundation/mango-v4-settings": "0.2.18", "@blockworks-foundation/mango-v4-settings": "0.2.18",
"@blockworks-foundation/mangolana": "0.0.1-beta.15", "@blockworks-foundation/mangolana": "0.0.1-beta.15",
"@headlessui/react": "1.6.6", "@headlessui/react": "1.6.6",

View File

@ -17,7 +17,7 @@
resolved "https://registry.yarnpkg.com/@apocentre/alias-sampling/-/alias-sampling-0.5.3.tgz#897ff181b48ad7b2bcb4ecf29400214888244f08" resolved "https://registry.yarnpkg.com/@apocentre/alias-sampling/-/alias-sampling-0.5.3.tgz#897ff181b48ad7b2bcb4ecf29400214888244f08"
integrity sha512-7UDWIIF9hIeJqfKXkNIzkVandlwLf1FWTSdrb9iXvOP8oF544JRXQjCbiTmCv2c9n44n/FIWtehhBfNuAx2CZA== integrity sha512-7UDWIIF9hIeJqfKXkNIzkVandlwLf1FWTSdrb9iXvOP8oF544JRXQjCbiTmCv2c9n44n/FIWtehhBfNuAx2CZA==
"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.22.6", "@babel/runtime@^7.23.2": "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.5", "@babel/runtime@^7.17.2", "@babel/runtime@^7.20.13", "@babel/runtime@^7.20.7", "@babel/runtime@^7.21.0", "@babel/runtime@^7.22.5", "@babel/runtime@^7.23.2":
version "7.23.4" version "7.23.4"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.4.tgz#36fa1d2b36db873d25ec631dcc4923fdc1cf2e2e" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.23.4.tgz#36fa1d2b36db873d25ec631dcc4923fdc1cf2e2e"
integrity sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg== integrity sha512-2Yv65nlWnWlSpe3fXEyX5i7fx5kIKo4Qbcj+hMO0odwaneFjfXw5fdum+4yL20O0QiaHpia0cYQ9xpNMqrBwHg==
@ -50,10 +50,10 @@
bn.js "^5.2.1" bn.js "^5.2.1"
eslint-config-prettier "^9.0.0" eslint-config-prettier "^9.0.0"
"@blockworks-foundation/mango-v4@0.20.4": "@blockworks-foundation/mango-v4@0.20.6":
version "0.20.4" version "0.20.6"
resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.20.4.tgz#0123fa4fede9b4e47917ebade99c8918971aaddd" resolved "https://registry.yarnpkg.com/@blockworks-foundation/mango-v4/-/mango-v4-0.20.6.tgz#c94e1c38ef9fde4a0e87aa139f3e942ddfcb7403"
integrity sha512-Dcea6cyLMGCEcw3oNMyvK9DbFqZVqlD6bjvs0UnO++zVzFrbK5KcyGDQoZPKF4JnfBEO1J7P++zJLmBAammFOQ== integrity sha512-SlikGVoFXEnFNsbUKaZvrgpmfDSQ4A29rRhPdiPiU3XuS0gEMEvMCl8lr0C9euByhGfIzCv7CK0pdknP3Il8sw==
dependencies: dependencies:
"@blockworks-foundation/mango-v4-settings" "^0.2.16" "@blockworks-foundation/mango-v4-settings" "^0.2.16"
"@coral-xyz/anchor" "^0.28.1-beta.2" "@coral-xyz/anchor" "^0.28.1-beta.2"
@ -1041,7 +1041,7 @@
dependencies: dependencies:
"@noble/hashes" "1.3.1" "@noble/hashes" "1.3.1"
"@noble/curves@^1.0.0", "@noble/curves@^1.1.0", "@noble/curves@^1.2.0": "@noble/curves@^1.1.0", "@noble/curves@^1.2.0":
version "1.2.0" version "1.2.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35" resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35"
integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw== integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==