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

v2.7.5 #1218

Merged
merged 250 commits into from
Nov 11, 2024
Merged

v2.7.5 #1218

Show file tree
Hide file tree
Changes from 239 commits
Commits
Show all changes
250 commits
Select commit Hold shift + click to select a range
fd6130b
feature: initial commit, basic refactor
StefChatz Oct 2, 2024
91c8f5c
fix constant rerenders, and can now edit the inputs without constantl…
StefChatz Oct 3, 2024
44759ee
refactor numberInput, useDebounce for smooth UI slider, also add debo…
StefChatz Oct 3, 2024
98b0a2d
feature: small tweaks based on comments
StefChatz Oct 4, 2024
3738866
feature: fix failed builds and address comments
StefChatz Oct 4, 2024
a275381
Merge pull request #1163 from mars-protocol/perps-refactor-perp-module
linkielink Oct 4, 2024
fb7e031
Merge branch 'main' of https://github.com/mars-protocol/mars-v2-front…
linkielink Oct 6, 2024
f4d5126
feat: update files
linkielink Oct 6, 2024
b282e5f
Merge branch 'perps-refactor-perp-module' of https://github.com/mars-…
linkielink Oct 6, 2024
de395b1
feature: implelement reduceOnly, enable Stop
StefChatz Oct 7, 2024
c9b01c5
feature: add SL/TL to positions
StefChatz Oct 8, 2024
ada8856
feature: fix failing build and update wasm
StefChatz Oct 9, 2024
9721edc
feature: make perps in dropdown and make it default home page
StefChatz Oct 9, 2024
dda8c7b
feature: add SL/TP flags
StefChatz Oct 9, 2024
404e4d3
feature: styles changes
StefChatz Oct 9, 2024
139444e
feature: update oracle prices sent to HC
StefChatz Oct 10, 2024
50a0493
refactor: remove log
StefChatz Oct 10, 2024
c437016
feature: update switch and fix scale
StefChatz Oct 10, 2024
36e1f3a
feature: address PR comments
StefChatz Oct 10, 2024
9aea5e4
feature: add auto-close open limit orders on close position
StefChatz Oct 10, 2024
ab4efad
feature: update types, wording etc
StefChatz Oct 11, 2024
db43a28
feature: fix type miss matching
StefChatz Oct 11, 2024
201be04
fix: fix entry price
linkielink Oct 11, 2024
3a07eca
Merge pull request #1170 from mars-protocol/perps-reduce-only-SL
linkielink Oct 11, 2024
780113b
Merge branch 'develop' of https://github.com/mars-protocol/mars-v2-fr…
linkielink Oct 11, 2024
5bd3888
fix: check for empty account
linkielink Oct 11, 2024
4e897bc
feat: added NTRN bridge messages
linkielink Oct 11, 2024
0ba7008
feature: remove liquidation price as more bugs with the helper seem t…
StefChatz Oct 11, 2024
5b2ee00
fix: unbreak broken swaps on osmosis
linkielink Oct 11, 2024
0e045df
fix: typo
linkielink Oct 11, 2024
e57389d
fix: refactor svgs
linkielink Oct 11, 2024
4f986b7
env: update contracts to retreat ones
Patricie29 Oct 14, 2024
8312920
feature: use competition contracts
StefChatz Oct 14, 2024
a5e40b7
optimize: batch fetch perp markets
bobthebuidlr Oct 16, 2024
c7a1f68
optimize: ensure V1 account not fetched on V2
bobthebuidlr Oct 16, 2024
e128fc2
improve: perp market state
bobthebuidlr Oct 16, 2024
7295ee2
fix: typescript errors + build
bobthebuidlr Oct 16, 2024
5ee0dfe
Merge pull request #1178 from mars-protocol/network-optimizations
linkielink Oct 18, 2024
e1a90b9
Merge branch 'develop' of https://github.com/mars-protocol/mars-v2-fr…
linkielink Oct 21, 2024
033e8fe
feat: added cached endpoints
linkielink Oct 21, 2024
d979a4f
fix: preview and perps summary modal
linkielink Oct 21, 2024
b01b19e
fix: tidy
linkielink Oct 21, 2024
a401289
fix: function over if
linkielink Oct 21, 2024
4af9a8c
Merge pull request #1185 from mars-protocol/preview-fix
linkielink Oct 21, 2024
6c2b4bf
Merge pull request #1186 from mars-protocol/cached-api
linkielink Oct 21, 2024
1c218df
refactor: update active perps vault positions
linkielink Oct 21, 2024
1af5c6c
tidy: refactor
linkielink Oct 21, 2024
43ee6c5
feature: liquidation scaling
StefChatz Oct 15, 2024
a514048
feature: remove all scaling and match hc object to SC object
StefChatz Oct 18, 2024
73b2690
refactor: address limitPrice
StefChatz Oct 18, 2024
c7d4da2
feature: add UI fixes and update wasm
StefChatz Oct 22, 2024
f5b3480
feature: fix failing build
StefChatz Oct 22, 2024
c749977
Merge pull request #1177 from mars-protocol/perps-liquidation-price
linkielink Oct 22, 2024
687d2df
Merge branch 'main' of https://github.com/mars-protocol/mars-v2-front…
linkielink Oct 22, 2024
af0ccc0
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 22, 2024
07e9706
feature: use competition contracts
StefChatz Oct 14, 2024
98f8f3f
feature: update to new contracts
StefChatz Oct 22, 2024
9096537
Merge pull request #1188 from mars-protocol/perps-internal-comp
StefChatz Oct 22, 2024
9c18419
feature: filter assets
StefChatz Oct 22, 2024
58e8599
Merge pull request #1189 from mars-protocol/fix-double-assets
linkielink Oct 22, 2024
736f152
feat: deactivate GetStartedModal
linkielink Oct 22, 2024
9ffecac
fix: fix callout
linkielink Oct 22, 2024
e3635bd
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 22, 2024
ed8e19a
fix: perps preview
linkielink Oct 22, 2024
10becfa
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 22, 2024
ff78196
feature: liquidation price wasm fix
StefChatz Oct 22, 2024
340c7c6
tidy: mq perps page
Patricie29 Oct 22, 2024
349b4e4
Merge branch 'perps' into perps-mq-fixes
Patricie29 Oct 22, 2024
8218ac1
Merge pull request #1191 from mars-protocol/perps-mq-fixes
linkielink Oct 23, 2024
b3caed6
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
c1e0376
feat: added liquidation prices to the summaries
linkielink Oct 23, 2024
5b03e5c
fix: remove liquidation price for limit orders
linkielink Oct 23, 2024
424d7bd
fix: added greaterThan logic to perps balances table
linkielink Oct 23, 2024
9286ae3
Merge pull request #1192 from mars-protocol/liq-prices
linkielink Oct 23, 2024
803833c
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
e9bd2a0
fix: fixed toast messages for perps
linkielink Oct 23, 2024
346b603
feat: mutate keys based on transaction
linkielink Oct 23, 2024
6f618d2
Merge pull request #1193 from mars-protocol/toast-logic
linkielink Oct 23, 2024
a2b2a0a
Merge branch 'perps' into mutation-logic
linkielink Oct 23, 2024
cb49d5a
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
4346241
fix: close button
linkielink Oct 23, 2024
df8dd1a
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
fec0d4b
feat: add close labels
linkielink Oct 23, 2024
d2018ec
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
a19ab80
fix: fix deeplinks
linkielink Oct 23, 2024
9e756d0
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
0f932c6
fix: fix font sizes
linkielink Oct 23, 2024
cc83588
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
7577a32
feat: added deposit from wallet to vault
linkielink Oct 23, 2024
0042e21
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 23, 2024
ea9c18a
refactor: perps as default page on logo click
Patricie29 Oct 23, 2024
193074d
refactor: update min decimals for funding rate
Patricie29 Oct 23, 2024
2899aae
Merge pull request #1195 from mars-protocol/perps-as-main-page
linkielink Oct 24, 2024
e5da0b9
Merge branch 'perps' into mutation-logic
linkielink Oct 24, 2024
eabfa3d
Merge pull request #1194 from mars-protocol/mutation-logic
linkielink Oct 24, 2024
0d02878
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 24, 2024
70ba761
fix: fixed entryprices
linkielink Oct 24, 2024
9e9cbc7
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 24, 2024
b419b52
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 24, 2024
fdebece
fix: unlend USDC for trigger orders
linkielink Oct 24, 2024
a8f7378
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 24, 2024
586a983
fix: borrow or unlend keeper fee on limit orders
linkielink Oct 24, 2024
b48d845
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 24, 2024
a2df12a
fix: create and cancel limit order toasts
linkielink Oct 24, 2024
21f9095
fix: added keeper fee payment to limit order toast
linkielink Oct 24, 2024
549534b
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 24, 2024
e80e033
fix: beautify errors
linkielink Oct 24, 2024
6371215
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 24, 2024
b01b4c9
feature: create Collateral Power metric for portfolio summary
StefChatz Oct 25, 2024
d5a183f
refactor: make collateral power optional to account for hls to use de…
StefChatz Oct 25, 2024
9509ac7
fix: remove caching
linkielink Oct 25, 2024
9601ba0
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 25, 2024
da6da44
fix: vault transactions
linkielink Oct 25, 2024
8e01a5a
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 25, 2024
d140cc2
fix: strip the caching layer from vault
linkielink Oct 25, 2024
9697717
tidy: format
linkielink Oct 25, 2024
24edf3e
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 25, 2024
83c913b
fix: remove mutation timeout
linkielink Oct 25, 2024
96ba03b
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 25, 2024
0c7308d
fix: updated hc
linkielink Oct 25, 2024
7f1a309
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 25, 2024
0dbd1bd
feature: add liquidationthreshhhols for max ltv
StefChatz Oct 25, 2024
df156f9
Merge pull request #1197 from mars-protocol/perps-collateral-power
StefChatz Oct 25, 2024
acc17ec
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 25, 2024
80ab175
fix: super high APYs
linkielink Oct 25, 2024
6fdab33
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 25, 2024
7d2c4a6
feat: added trading view indicators
linkielink Oct 24, 2024
b3e7bc7
fix: remove entryPrice from init
linkielink Oct 24, 2024
5fccdbd
fix: keep shapes and remove horizonal_lines
linkielink Oct 24, 2024
5c2b4e3
fix: lock lines
linkielink Oct 24, 2024
231762c
fix: disable selection
linkielink Oct 24, 2024
9f62314
fix: zOrder
linkielink Oct 24, 2024
c0b3509
feat: added Limit Order labels
linkielink Oct 25, 2024
5b88f1f
feature: updates to position closing and opacity on strategy
StefChatz Oct 26, 2024
e80690f
fix: adjusted to feedback
linkielink Oct 26, 2024
7d8abc2
Merge pull request #1196 from mars-protocol/tradingview-indicators
linkielink Oct 26, 2024
ff344fe
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 26, 2024
82964b2
fix: use keeperFee.denom
linkielink Oct 26, 2024
739f623
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 26, 2024
c62ea49
fix: remove perps vault from collateral power
linkielink Oct 28, 2024
0cb96e7
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
8a50ad3
fix: perps vault
linkielink Oct 28, 2024
625f7f3
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
d94b8c0
fix: Net worth
linkielink Oct 28, 2024
c6cbce6
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
3c5725c
fix: account leverage
linkielink Oct 28, 2024
e4884b0
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
fbfba72
tidy: refactor
linkielink Oct 28, 2024
6e34b9a
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
8d01bdf
fix: added isBalancesTable
linkielink Oct 28, 2024
4bf45d0
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
680feee
feat: add PEPE
linkielink Oct 28, 2024
6f3daaf
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
932d649
fix: leverage
linkielink Oct 28, 2024
3d9996b
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
da204b2
feat: add auto repay
linkielink Oct 28, 2024
38381ce
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
1a10278
fix: remove repay
linkielink Oct 28, 2024
98adb9a
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
9e1826d
fix: account leverage and APY
linkielink Oct 28, 2024
594816b
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
a3de6af
fix: AccountSummary
linkielink Oct 28, 2024
4f6a0b8
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
7fd788a
fix: fixed APR to APY
linkielink Oct 28, 2024
db05b91
fix: added seconds to counter
linkielink Oct 28, 2024
e68f746
fix: added autolend to perps vault withdraw
linkielink Oct 28, 2024
d44efec
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 28, 2024
4e6001c
feature: add dynamic decimal places
StefChatz Oct 28, 2024
88117e5
feature: fix decimals to capture at least a 1% move in small denoms a…
StefChatz Oct 28, 2024
917a471
refactor: add removed part of code
StefChatz Oct 28, 2024
9a83749
feature: add decimals in tradingFees/LiquidationPrice
StefChatz Oct 28, 2024
492cefb
feature: add minimum decimals, add $ sign to perps row
StefChatz Oct 28, 2024
ca14297
Update src/components/perps/BalancesTable/Columns/EntryPrice.tsx
StefChatz Oct 28, 2024
e08be7e
Update src/components/perps/BalancesTable/Columns/Size.tsx
StefChatz Oct 28, 2024
350c3dd
feature: address PR comments
StefChatz Oct 28, 2024
40ea611
Merge pull request #1203 from mars-protocol/dynamic-decimal-places
linkielink Oct 28, 2024
6cb6e60
env: dependencies update
linkielink Oct 28, 2024
49e3d83
fix: perps liq price without debt
linkielink Oct 29, 2024
5352c34
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 29, 2024
ab39303
Merge branch 'develop' of https://github.com/mars-protocol/mars-v2-fr…
linkielink Oct 29, 2024
00485ca
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 29, 2024
7e56160
fix: updated HC
linkielink Oct 29, 2024
d4144db
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 29, 2024
f1d9bef
feat: beautify net OI message
linkielink Oct 29, 2024
c57f8e4
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 29, 2024
391ec86
fix: generalized
linkielink Oct 29, 2024
d0aade3
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Oct 29, 2024
3985ee2
env: changed to internal testnet comp
linkielink Oct 29, 2024
2ed315d
feature: add the decimals to asset select on spot/perps
StefChatz Oct 30, 2024
d5a6daf
Merge pull request #1205 from mars-protocol/new-decimal-logic-spot
linkielink Oct 30, 2024
79f2cc8
fix: update stables
linkielink Nov 1, 2024
7d7182a
fix: portfolio page
linkielink Nov 1, 2024
034c175
tidy: refactor
linkielink Nov 1, 2024
10a2085
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Nov 1, 2024
c6e6afb
fix: remove Stop Loss indicators
linkielink Nov 1, 2024
ac7d7ac
fix : fixed flickering and grid template
linkielink Nov 1, 2024
68880ca
fix: remove OrderTable columns
linkielink Nov 1, 2024
539e5bf
fix: only remove lines we created
linkielink Nov 1, 2024
75764df
fix: tidy
linkielink Nov 1, 2024
711ec01
fix: added Limit Price header
linkielink Nov 1, 2024
3d60a4b
fix: only check horizontal_lines for removal
linkielink Nov 1, 2024
8676d15
fix: updated the limit orders
linkielink Nov 2, 2024
8c1ddf3
fix: fixed labels
linkielink Nov 2, 2024
b478d36
fix: fixed fee labels
linkielink Nov 2, 2024
a908a34
fix: update trading view chart indicator styling
Patricie29 Nov 4, 2024
e7d5ee2
Merge pull request #1206 from mars-protocol/tw-fix
linkielink Nov 4, 2024
184cd96
fix: adjusted trading view zoom levels
linkielink Nov 4, 2024
a2b3707
fix: change copy of edit position
linkielink Nov 4, 2024
779c882
env: use pre competition contracts
linkielink Nov 6, 2024
f5a8a91
feat: add chartStore
linkielink Nov 6, 2024
6689c7b
feature: create limit order from chart using right click
StefChatz Nov 6, 2024
a80c68e
fix: enhanced error handling
linkielink Nov 6, 2024
bd84efa
Merge branch 'perps-internal-comp' into tradingview-limit-price
linkielink Nov 6, 2024
d8fb0a7
feature: address comments, and fix limit order value
StefChatz Nov 6, 2024
a2933fa
Update src/components/trade/TradeChart/index.tsx
StefChatz Nov 6, 2024
9011426
feature: fix failing build
StefChatz Nov 6, 2024
007f502
Merge pull request #1212 from mars-protocol/tradingview-limit-price
linkielink Nov 6, 2024
b8d9c5a
Merge branch 'perps-internal-comp' of https://github.com/mars-protoco…
linkielink Nov 6, 2024
0fc1b17
env: update dependencies
linkielink Nov 6, 2024
64c96dc
feature: conditional denoms for limit and open order
StefChatz Nov 6, 2024
cfa7c9d
feature: perps stop order
StefChatz Nov 7, 2024
df04434
feature: add confirmation dialog
StefChatz Nov 7, 2024
22e7024
feature: update endpoints
StefChatz Nov 7, 2024
05fece1
fix: updated the endpoints to cached API
linkielink Nov 7, 2024
cb207ff
refactor: flesh out comparison
StefChatz Nov 7, 2024
bd62b1a
refactor: update to handle stop orders and trade direction
StefChatz Nov 7, 2024
55ebf2d
Apply suggestions from code review
StefChatz Nov 7, 2024
096ca4a
refactor: prettier format
StefChatz Nov 7, 2024
fef5f09
tidy: format
linkielink Nov 7, 2024
2f900cd
Merge branch 'perps-internal-comp' into perps-stop-order
linkielink Nov 7, 2024
79cab68
Merge pull request #1215 from mars-protocol/perps-stop-order
linkielink Nov 7, 2024
03b821d
Merge branch 'perps-internal-comp' of https://github.com/mars-protoco…
linkielink Nov 7, 2024
736e677
Merge branch 'main' of https://github.com/mars-protocol/mars-v2-front…
linkielink Nov 7, 2024
aefc898
Merge branch 'perps' of https://github.com/mars-protocol/mars-v2-fron…
linkielink Nov 7, 2024
89a7aa0
fix: update cached API response
Patricie29 Nov 8, 2024
89af09d
fix: trade as default page if perps disabled
Patricie29 Nov 8, 2024
6c70830
Merge pull request #1217 from mars-protocol/bug-fixes
linkielink Nov 8, 2024
611e62b
fix: apys
linkielink Nov 8, 2024
534e6ee
env: update version
linkielink Nov 8, 2024
3c26c5e
feature: add spot and perps decimals
StefChatz Nov 8, 2024
32f3996
refactor: add detailed price
StefChatz Nov 8, 2024
6b5da09
Merge pull request #1219 from mars-protocol/spot-blance-decimals
linkielink Nov 8, 2024
e3dc103
tidy: refactor
linkielink Nov 8, 2024
82e3afd
fix: trade and perps logic
linkielink Nov 8, 2024
7ff8860
feature: update the prices used in oracle price
StefChatz Nov 9, 2024
57d531d
feature: only add current swap asset to oracle
StefChatz Nov 9, 2024
13b5f59
feature: filter denoms within computeMaxSwapAmount
StefChatz Nov 9, 2024
a96ac9a
feature: direcrlty pass denoms
StefChatz Nov 9, 2024
98ad699
refactor: update use of hc helper function
StefChatz Nov 9, 2024
5403c96
Merge pull request #1220 from mars-protocol/maxSwapAmoun-fix
linkielink Nov 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mars-v2-frontend",
"version": "2.7.4",
"version": "2.7.5",
"homepage": "./",
"private": false,
"license": "SEE LICENSE IN LICENSE FILE",
Expand All @@ -22,7 +22,7 @@
"dependencies": {
"@cosmjs/cosmwasm-stargate": "^0.32.4",
"@delphi-labs/shuttle-react": "^3.29.0",
"@keplr-wallet/cosmos": "^0.12.141",
"@keplr-wallet/cosmos": "^0.12.152",
"@tailwindcss/container-queries": "^0.1.1",
"@tanstack/react-table": "^8.20.5",
"@tippyjs/react": "^4.2.6",
Expand All @@ -35,7 +35,7 @@
"lodash.throttle": "^4.1.1",
"mobx": "^6.13.5",
"moment": "^2.30.1",
"next": "^14.2.15",
"next": "^15.0.2",
"react": "18.3.1",
"react-device-detect": "^2.2.3",
"react-dom": "^18.3.1",
Expand All @@ -46,35 +46,35 @@
"react-spring": "^9.7.4",
"react-toastify": "^10.0.6",
"react-use-clipboard": "^1.0.9",
"recharts": "^2.13.0",
"recharts": "^2.13.3",
"sharp": "^0.33.5",
"starknet": "^6.11.0",
"swr": "^2.2.5",
"tailwind-scrollbar-hide": "^1.1.7",
"zustand": "4.5.5"
},
"devDependencies": {
"@babel/eslint-parser": "^7.25.8",
"@eslint/compat": "^1.2.1",
"@babel/eslint-parser": "^7.25.9",
"@eslint/compat": "^1.2.2",
"@svgr/webpack": "^8.1.0",
"@types/debounce-promise": "^3.1.9",
"@types/lodash.debounce": "^4.0.9",
"@types/lodash.throttle": "^4.1.9",
"@types/node": "^22.7.7",
"@types/react": "18.3.11",
"@types/node": "^22.9.0",
"@types/react": "18.3.12",
"@types/react-dom": "18.3.1",
"@types/react-helmet": "^6.1.11",
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.10.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"autoprefixer": "^10.4.20",
"dotenv": "^16.4.5",
"dotenv-cli": "^7.4.2",
"eslint": "^9.13.0",
"eslint": "^9.14.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-functional": "^7.1.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"husky": "^9.1.6",
"identity-obj-proxy": "^3.0.0",
Expand All @@ -84,7 +84,7 @@
"shelljs": "^0.8.5",
"tailwindcss": "^3.4.14",
"typescript": "^5.6.3",
"typescript-eslint": "^8.10.0"
"typescript-eslint": "^8.13.0"
},
"engines": {
"npm": "please-use-yarn",
Expand Down
Binary file added public/images/bridges/discord.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/bridges/skip.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/bridges/telegram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 13 additions & 3 deletions public/tradingview.css
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,21 @@ button[class^='button-'][class*='secondary-']:hover {
background-image: linear-gradient(0deg, var(--tv-background), transparent) !important;
}

[class^='valuesWrapper-'] {
background: transparent !important;
}

[class^='noWrapWrapper-'] * {
pointer-events: none !important;
border: none !important;
pointer-events: none !important;
background: transparent !important;
outline: none !important;
}

[class^='noWrapWrapper-'] [class^='button-'],
[class^='noWrapWrapper-'] [class^='removeButton-'],
[class^='noWrapWrapper-'] [class^='editButton-'] {
pointer-events: auto !important;
background: var(--tv-background) !important;
cursor: pointer !important;
}

html.theme-dark ::selection {
Expand Down
16 changes: 13 additions & 3 deletions public/tradingview_default.css
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,21 @@ button[class^='button-'][class*='secondary-']:hover {
background-image: linear-gradient(0deg, var(--tv-background), transparent) !important;
}

[class^='valuesWrapper-'] {
background: transparent !important;
}

[class^='noWrapWrapper-'] * {
pointer-events: none !important;
border: none !important;
pointer-events: none !important;
background: transparent !important;
outline: none !important;
}

[class^='noWrapWrapper-'] [class^='button-'],
[class^='noWrapWrapper-'] [class^='removeButton-'],
[class^='noWrapWrapper-'] [class^='editButton-'] {
pointer-events: auto !important;
background: var(--tv-background) !important;
cursor: pointer !important;
}

html.theme-dark ::selection {
Expand Down
14 changes: 3 additions & 11 deletions src/api/accounts/getAccount.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { cacheFn, positionsCache, vaultPositionResponse } from 'api/cache'
import { getCreditManagerQueryClient, getPerpsQueryClient } from 'api/cosmwasm-client'
import getDepositedVaults from 'api/vaults/getDepositedVaults'
import { Positions } from 'types/generated/mars-credit-manager/MarsCreditManager.types'
Expand All @@ -16,19 +15,12 @@ export default async function getAccount(
const isPerpsEnabled = chainConfig.perps
const creditManagerQueryClient = await getCreditManagerQueryClient(chainConfig)

const accountPosition: Positions = await cacheFn(
() => creditManagerQueryClient.positions({ accountId }),
positionsCache,
`${chainConfig.id}/account/${accountId}`,
)
const accountPosition: Positions = await creditManagerQueryClient.positions({ accountId })

let perpsVaultPosition = null
if (isPerpsEnabled && address) {
const perpsQueryClient = await getPerpsQueryClient(chainConfig)
perpsVaultPosition = await cacheFn(
() => perpsQueryClient.vaultPosition({ accountId, userAddress: address }),
vaultPositionResponse,
`${chainConfig.id}/perpsVaultPosition/account/${accountId}`,
)
perpsVaultPosition = await perpsQueryClient.vaultPosition({ accountId, userAddress: address })
}

const accountKind = await creditManagerQueryClient.accountKind({ accountId: accountId })
Expand Down
7 changes: 4 additions & 3 deletions src/api/assets/getDexAssets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ export default async function getDexAssets(chainConfig: ChainConfig) {
const uri = new URL(chainConfig.endpoints.dexAssets)
try {
const assets = await fetch(uri.toString()).then(async (res) => {
const data = (await res.json()) as AstroportAsset[]
if (chainConfig.perps) data.push(...PERPS_ASSETS)
return convertAstroportAssetsResponse(data)
const data = (await res.json()) as AstroportAssetsCached

if (chainConfig.perps) data.tokens.push(...PERPS_ASSETS)
return convertAstroportAssetsResponse(data.tokens)
})
return assets
} catch (e) {
Expand Down
4 changes: 2 additions & 2 deletions src/api/assets/getDexPools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ export default async function getDexPools(chainConfig: ChainConfig) {
const uri = new URL(chainConfig.endpoints.dexPools)
try {
const pools = await fetch(uri.toString()).then(async (res) => {
const data = (await res.json()) as AstroportPool[]
return data
const data = (await res.json()) as AstroportPoolsCached
return data.pools
})
return pools
} catch (e) {
Expand Down
24 changes: 13 additions & 11 deletions src/api/campaign/getCampaignApys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,31 @@ export default async function getCampaignApys(
try {
await fetchWithTimeout(url.toString(), FETCH_TIMEOUT).then(async (res) => {
const data = (await res.json()) as any
if (Array.isArray(data[apyStructure[0]])) {
if (apyStructure[0] === denomStructure[0])
data[apyStructure[0]].forEach((apyData: any) => {
const dataObject = data[apyStructure[0]]
if (Array.isArray(dataObject[apyStructure[1]])) {
if (apyStructure[1] === denomStructure[0])
dataObject[apyStructure[1]].forEach((apyData: any) => {
apys.push({
apy: processApyData(apyData[apyStructure[1]], isApr, isPercent),
apy: processApyData(apyData[apyStructure[2]], isApr, isPercent),
denom: apyData[denomStructure[1]],
})
})
} else if (Array.isArray(data)) {
data.forEach((campaign: any) => {
} else if (Array.isArray(dataObject)) {
dataObject.forEach((campaign: any) => {
apys.push({
apy: processApyData(campaign[apyStructure[0]], isApr, isPercent),
apy: processApyData(campaign[apyStructure[1]], isApr, isPercent),
denom: campaign[denomStructure[0]],
})
})
} else {
const apyData =
apyStructure.length === 1 ? data[apyStructure[0]] : data[apyStructure[0]][apyStructure[1]]
apyStructure.length === 2
? dataObject[apyStructure[1]]
: dataObject[apyStructure[1]][apyStructure[2]]
const denomData =
denomStructure.length === 1
? data[denomStructure[0]]
: data[denomStructure[0]][denomStructure[1]]

? dataObject[denomStructure[0]]
: dataObject[denomStructure[0]][denomStructure[1]]
apys.push({
apy: processApyData(apyData, isApr, isPercent),
denom: denomData,
Expand Down
56 changes: 13 additions & 43 deletions src/api/vaults/getDepositedVaults.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
import moment from 'moment'

import {
cacheFn,
estimateWithdrawCache,
positionsCache,
previewRedeemCache,
unlockPositionsCache,
} from 'api/cache'
import { getClient, getCreditManagerQueryClient, getVaultQueryClient } from 'api/cosmwasm-client'
import getVaults from 'api/vaults/getVaults'
import { BN_ZERO } from 'constants/math'
Expand All @@ -28,15 +21,9 @@ async function getUnlocksAtTimestamp(
) {
try {
const client = await getClient(getUrl(chainConfig.endpoints.rpc))
const vaultExtension = (await cacheFn(
() =>
client.queryContractSmart(vaultAddress, {
vault_extension: { lockup: { unlocking_position: { lockup_id: unlockingId } } },
}),
unlockPositionsCache,
`unlockPositions/${vaultAddress}.id/${unlockingId}`,
60,
)) as VaultExtensionResponse
const vaultExtension = (await client.queryContractSmart(vaultAddress, {
vault_extension: { lockup: { unlocking_position: { lockup_id: unlockingId } } },
})) as VaultExtensionResponse

return Number(vaultExtension.release_at.at_time) / 1e6
} catch (ex) {
Expand Down Expand Up @@ -101,28 +88,16 @@ export async function getLpTokensForVaultPosition(
const amounts = flatVaultPositionAmount(vaultPosition.amount)
const totalAmount = amounts.locked.plus(amounts.unlocked).plus(amounts.unlocking).toString()

const lpAmount = await cacheFn(
() =>
vaultQueryClient.previewRedeem({
amount: totalAmount,
}),
previewRedeemCache,
`previewRedeem/vaults/${vault.address}/amount/${totalAmount}`,
60,
)
const lpAmount = await vaultQueryClient.previewRedeem({
amount: totalAmount,
})

const lpTokens = await cacheFn(
() =>
creditManagerQueryClient.estimateWithdrawLiquidity({
lpToken: {
amount: lpAmount,
denom: vault.denoms.lp,
},
}),
estimateWithdrawCache,
`lpToken/${vault.denoms.lp}/amount/${lpAmount}`,
60,
)
const lpTokens = await creditManagerQueryClient.estimateWithdrawLiquidity({
lpToken: {
amount: lpAmount,
denom: vault.denoms.lp,
},
})

const primaryLpToken = lpTokens.find((t) => t.denom === vault.denoms.primary) ?? {
amount: '0',
Expand Down Expand Up @@ -184,12 +159,7 @@ async function getDepositedVaults(
try {
const creditManagerQueryClient = await getCreditManagerQueryClient(chainConfig)

if (!positions)
positions = await cacheFn(
() => creditManagerQueryClient.positions({ accountId }),
positionsCache,
`depositedVaults/${accountId}`,
)
if (!positions) positions = await creditManagerQueryClient.positions({ accountId })

if (!positions.vaults.length) return []

Expand Down
16 changes: 0 additions & 16 deletions src/api/vaults/getVaults.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import getAssetParams from 'api/params/getAssetParams'
import { getVaultConfigs } from 'api/vaults/getVaultConfigs'
import { getVaultUtilizations } from 'api/vaults/getVaultUtilizations'
import { BN } from 'utils/helpers'
import { resolveHlsStrategies } from 'utils/resolvers'

export default async function getVaults(chainConfig: ChainConfig): Promise<Vault[]> {
const assetParams = await getAssetParams(chainConfig)
const vaultConfigs = await getVaultConfigs(chainConfig)
const $vaultUtilizations = getVaultUtilizations(chainConfig, vaultConfigs)
const vaultMetaDatas = chainConfig.vaults
const HlsAssets = assetParams.filter((asset) => asset.credit_manager.hls)
const hlsStrategies = resolveHlsStrategies('vault', HlsAssets)

const vaults: Vault[] = []
await $vaultUtilizations.then((vaultUtilizations) => {
Expand Down Expand Up @@ -38,17 +33,6 @@ export default async function getVaults(chainConfig: ChainConfig): Promise<Vault
},
}

const hlsStrategy = hlsStrategies.find(
(strategy) => strategy.denoms.deposit === vaultConfig.addr,
)
if (hlsStrategy) {
vault.hls = {
maxLTV: hlsStrategy.maxLTV,
maxLeverage: hlsStrategy.maxLeverage,
borrowDenom: hlsStrategy.denoms.borrow,
}
}

vaults.push(vault)
})
})
Expand Down
5 changes: 2 additions & 3 deletions src/chains/neutron/neutron-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,11 @@ const Neutron1: ChainConfig = {
rest: process.env.NEXT_PUBLIC_NEUTRON_REST ?? 'https://rest-kralum.neutron-1.neutron.org',
swap: 'https://neutron.astroport.fi/swap',
explorer: 'https://mintscan.io/neutron',
dexAssets: 'https://api.astroport.fi/api/tokens?chainId=neutron-1',
dexPools: 'https://api.astroport.fi/api/pools?chainId=neutron-1',
dexAssets: 'https://neutron-cache-api.onrender.com/neutron-1/tokens',
dexPools: 'https://neutron-cache-api.onrender.com/neutron-1/pools',
gasPrices: '/feemarket/v1/gas_price/untrn',
aprs: {
vaults: '',
stride: 'https://edge.stride.zone/api/stake-stats',
},
},
network: NETWORK.MAINNET,
Expand Down
19 changes: 9 additions & 10 deletions src/chains/neutron/pion-1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ const Pion1: ChainConfig = {
sell: 'factory/neutron1ke0vqqzyymlp5esr8gjwuzh94ysnpvj8er5hm7/USDC',
},
contracts: {
redBank: 'neutron14zjmuel0t8q9rqezp2vtj706ckl8eqtrkc2cjexsssh8vgpuzxdqjuqydr',
incentives: 'neutron1lkk4e6y9pjkev9patc3t6lwey7032f3eqh577v8dvk9ws8awsv4sk0t45a',
oracle: 'neutron1hkggq76w07x53z9hu2hhq8kn8n9e77vc0nztrl2h3sn4cgz9v0ps577a53',
params: 'neutron15tdtcemvkj3g7vuuz83twcekg86j3f58jet9lv08u0j7j8ztymsqd47l9z',
creditManager: 'neutron1gtqq647nrkgwxr3anrdty6fqfvfqav9kkwuu7el0gw754yx42dgs0s92zx',
accountNft: 'neutron128pgfadzvmck5qccgpcjwew4lgsn5e4ha82cu7rrnyg45rrpxessuqdnmt',
perps: 'neutron1mmjd5gz5943s4nnd5929s5hxfzw6lv3jrp3zthkxkanve70qax4qwyyzt5',
redBank: 'neutron1ecxhzp2d3jszlnlnu4rvt2aj4hsktmt9wwmc08vwqsxfc0t37huqxz5nzy',
incentives: 'neutron1ngls5thsvu0ekzrua6pq0ajtg0k48sfy68qsdyzu48eayj9xd3lssc988h',
oracle: 'neutron1s7l3zqg22zyn5rq7zv67um5qrtnulh33mwm28t5a3kdlrjq4z4lq5a4dte',
params: 'neutron1rljzsheama2w3hxx4z5g29wwxyh9gfc70mym5z4c6ep8a0vjjn4qmv3dzj',
creditManager: 'neutron1kejmclkxufzyrp38555g67je4parahqvw6xkhm523eysuhurf9tq388x60',
accountNft: 'neutron18axnu2zashqqrfy85f6w6l3p37w90m2ez242z7ptkgktscfx36asrssx0m',
perps: 'neutron1wmdenmmhjhhys9mz208v47l3a9uhx8hn6nkftf3588ccr0dajjcq9pqg4x',
pyth: 'neutron15ldst8t80982akgr8w8ekcytejzkmfpgdkeq4xgtge48qs7435jqp87u3t',
},
endpoints: {
Expand All @@ -29,12 +29,11 @@ const Pion1: ChainConfig = {
rest: process.env.NEXT_PUBLIC_NEUTRON_TEST_REST ?? 'https://rest-palvus.pion-1.ntrn.tech',
swap: 'https://testnet-neutron.astroport.fi/swap',
explorer: 'https://www.mintscan.io/neutron-testnet',
dexAssets: 'https://testnet.astroport.fi/api/tokens?chainId=pion-1',
dexPools: 'https://testnet.astroport.fi/api/pools?chainId=pion-1',
dexAssets: 'https://neutron-cache-api.onrender.com/pion-1/tokens',
dexPools: 'https://neutron-cache-api.onrender.com/pion-1/pools',
gasPrices: '/feemarket/v1/gas_price/untrn',
aprs: {
vaults: '',
stride: 'https://edge.stride.zone/api/stake-stats',
perpsVault: 'https://testnet-api.marsprotocol.io/v2/perps_vault?chain=neutron',
},
},
Expand Down
Loading