diff --git a/.env.example b/.env.example
index 01e7fed..5cc7d68 100644
--- a/.env.example
+++ b/.env.example
@@ -1,7 +1,7 @@
# OSMOSIS-1 #
NEXT_PUBLIC_OSMOSIS_RPC=https://rpc-osmosis.blockapsis.com
NEXT_PUBLIC_OSMOSIS_REST=https://lcd-osmosis.blockapsis.com
-NEXT_PUBLIC_OSMOSIS_GQL=https://osmosis.rpc.p2p.world/4dqst8e8Cgd2HMb2HDNkimP7NIkcbjuk/hive/graphql
+NEXT_PUBLIC_OSMOSIS_GQL=https://mainnet-osmosis-gql.marsprotocol.io/graphql
# PION-1 #
NEXT_PUBLIC_NEUTRON_TEST_RPC=https://rpc-palvus.pion-1.ntrn.tech/
@@ -11,4 +11,4 @@ NEXT_PUBLIC_NEUTRON_TEST_GQL=https://testnet-neutron-gql.marsprotocol.io/graphql
# NEUTRON-1 #
NEXT_PUBLIC_NEUTRON_RPC=https://rpc-kralum.neutron-1.neutron.org
NEXT_PUBLIC_NEUTRON_REST=https://rest-kralum.neutron-1.neutron.org
-NEXT_PUBLIC_NEUTRON_GQL=https://neutron.rpc.p2p.world/qgrnU6PsQZA8F9S5Fb8Fn3tV3kXmMBl2M9bcc9jWLjQy8p/hive/graphql
+NEXT_PUBLIC_NEUTRON_GQL=https://mainnet-neutron-gql.marsprotocol.io/graphql
diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml
index f39eff6..aea5514 100644
--- a/.github/workflows/docker-image.yml
+++ b/.github/workflows/docker-image.yml
@@ -22,4 +22,4 @@ jobs:
uses: docker/build-push-action@v4
with:
push: true
- tags: marsprotocol/interface:latest, marsprotocol/interface:${{ github.run_number }}
+ tags: marsprotocol/interface:${{ github.run_number }}
diff --git a/package.json b/package.json
index 7993150..3c0d4a3 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "mars",
"homepage": "./",
- "version": "1.7.4",
+ "version": "1.7.5",
"private": false,
"license": "SEE LICENSE IN LICENSE FILE",
"scripts": {
diff --git a/src/components/common/NumberInput/NumberInput.tsx b/src/components/common/NumberInput/NumberInput.tsx
index 495b068..aebf2f3 100644
--- a/src/components/common/NumberInput/NumberInput.tsx
+++ b/src/components/common/NumberInput/NumberInput.tsx
@@ -3,7 +3,7 @@ import React, { useCallback, useEffect, useState } from 'react'
import styles from './NumberInput.module.scss'
-BigNumber.config({ EXPONENTIAL_AT: [-24, 20] })
+BigNumber.config({ EXPONENTIAL_AT: 1e9 })
interface Props {
value: number
diff --git a/src/components/common/Wallet/WalletConnectedButton.tsx b/src/components/common/Wallet/WalletConnectedButton.tsx
index ae208dc..0e53382 100644
--- a/src/components/common/Wallet/WalletConnectedButton.tsx
+++ b/src/components/common/Wallet/WalletConnectedButton.tsx
@@ -119,7 +119,7 @@ export const WalletConnectedButton = () => {
2,
true,
false,
- ` ${baseCurrency.symbol}`,
+ ` ${networkConfig.assets.base.symbol}`,
)}`
) : (
diff --git a/src/components/fields/PositionInput/TokenInput/TokenInput.tsx b/src/components/fields/PositionInput/TokenInput/TokenInput.tsx
index e458b7d..4816b53 100644
--- a/src/components/fields/PositionInput/TokenInput/TokenInput.tsx
+++ b/src/components/fields/PositionInput/TokenInput/TokenInput.tsx
@@ -10,7 +10,7 @@ import useStore from 'store'
import styles from './TokenInput.module.scss'
-BigNumber.config({ EXPONENTIAL_AT: [-24, 20] })
+BigNumber.config({ EXPONENTIAL_AT: 1e9 })
interface Props {
tokens: string[]
diff --git a/src/components/redbank/RedbankColumns.module.scss b/src/components/redbank/RedbankColumns.module.scss
index cdc82ce..ac1004d 100644
--- a/src/components/redbank/RedbankColumns.module.scss
+++ b/src/components/redbank/RedbankColumns.module.scss
@@ -63,6 +63,14 @@
&.tia {
background-image: $colorGradientTIA;
}
+
+ &.wsteth {
+ background-image: $colorGradientWstETH;
+ }
+
+ &.stkatom {
+ background-image: $colorGradientStkATOM;
+ }
}
.logo {
diff --git a/src/configs/neutron-1.ts b/src/configs/neutron-1.ts
index 5bdad19..72b73e6 100644
--- a/src/configs/neutron-1.ts
+++ b/src/configs/neutron-1.ts
@@ -1,9 +1,13 @@
import atom from 'images/atom.svg'
import axlusdc from 'images/axlusdc.svg'
+import axlweth from 'images/axlweth.svg'
+import dydx from 'images/dydx.svg'
import mars from 'images/mars.svg'
import ntrn from 'images/ntrn.svg'
import osmo from 'images/osmo.svg'
import statom from 'images/statom.svg'
+import stkatom from 'images/stkatom.svg'
+import wsteth from 'images/wsteth.svg'
import colors from 'styles/_assets.module.scss'
import { ChainInfoID } from 'types/enums/wallet'
@@ -47,6 +51,45 @@ export const ASSETS: NetworkAssets = {
logo: statom,
decimals: 6,
},
+ stkatom: {
+ symbol: 'stkATOM',
+ id: 'stkATOM',
+ name: 'Persistence Staked Atom',
+ denom: 'ibc/3649CE0C8A2C79048D8C6F31FF18FA69C9BC7EB193512E0BD03B733011290445',
+ logo: stkatom,
+ color: colors.stkatom,
+ decimals: 6,
+ },
+ axlweth: {
+ symbol: 'WETH.axl',
+ id: 'axlWETH',
+ name: 'Axelar Wrapped Ethereum',
+ denom: 'ibc/A585C2D15DCD3B010849B453A2CFCB5E213208A5AB665691792684C26274304D',
+ color: colors.weth,
+ logo: axlweth,
+ decimals: 18,
+ priceFeedId: 'ff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace',
+ },
+ wsteth: {
+ symbol: 'wstETH',
+ id: 'wstETH',
+ name: 'Lido Wrapped Staked Ethereum',
+ denom: 'factory/neutron1ug740qrkquxzrk2hh29qrlx3sktkfml3je7juusc2te7xmvsscns0n2wry/wstETH',
+ color: colors.wsteth,
+ logo: wsteth,
+ decimals: 18,
+ priceFeedId: '6df640f3b8963d8f8358f791f352b8364513f6ab1cca5ed3f1f7b5448980e784',
+ },
+ dydx: {
+ symbol: 'DYDX',
+ id: 'DYDX',
+ name: 'DyDx',
+ denom: 'ibc/2CB87BCE0937B1D1DFCEE79BE4501AAF3C265E923509AEAC410AD85D27F35130',
+ logo: dydx,
+ color: colors.dydx,
+ decimals: 18,
+ priceFeedId: '6489800bb8974169adfe35937bf6736507097d13c190d760c557108c7e93a81b',
+ },
}
const OTHER_ASSETS: { [denom: string]: OtherAsset } = {
@@ -98,7 +141,16 @@ export const NETWORK_CONFIG: NetworkConfig = {
},
assets: {
base: ASSETS.ntrn,
- whitelist: [ASSETS.axlusdc, ASSETS.ntrn, ASSETS.atom, ASSETS.statom],
+ whitelist: [
+ ASSETS.axlusdc,
+ ASSETS.ntrn,
+ ASSETS.atom,
+ ASSETS.statom,
+ ASSETS.stkatom,
+ ASSETS.axlweth,
+ ASSETS.wsteth,
+ ASSETS.dydx,
+ ],
other: [OTHER_ASSETS.usd, OTHER_ASSETS.mars, OTHER_ASSETS.osmo],
currencies: [
OTHER_ASSETS.usd,
@@ -106,6 +158,10 @@ export const NETWORK_CONFIG: NetworkConfig = {
ASSETS.ntrn,
ASSETS.atom,
ASSETS.statom,
+ ASSETS.stkatom,
+ ASSETS.axlweth,
+ ASSETS.wsteth,
+ ASSETS.dydx,
OTHER_ASSETS.mars,
],
},
diff --git a/src/functions/messages/getRedbankBorrowMsgOptions.ts b/src/functions/messages/getRedbankBorrowMsgOptions.ts
index 66bd210..4aee56c 100644
--- a/src/functions/messages/getRedbankBorrowMsgOptions.ts
+++ b/src/functions/messages/getRedbankBorrowMsgOptions.ts
@@ -1,3 +1,4 @@
+import BigNumber from 'bignumber.js'
import { FEE_EST_AMOUNT } from 'constants/appConstants'
export const getRedbankBorrowMsgOptions = (
@@ -8,7 +9,7 @@ export const getRedbankBorrowMsgOptions = (
msg: {
borrow: {
denom,
- amount: amount === 0 ? FEE_EST_AMOUNT : amount.toFixed(0),
+ amount: amount === 0 ? FEE_EST_AMOUNT : new BigNumber(amount).toFixed(0),
},
},
}
diff --git a/src/functions/messages/getRedbankDepositMsgOptions.ts b/src/functions/messages/getRedbankDepositMsgOptions.ts
index 511f54e..e579b47 100644
--- a/src/functions/messages/getRedbankDepositMsgOptions.ts
+++ b/src/functions/messages/getRedbankDepositMsgOptions.ts
@@ -1,9 +1,11 @@
+import BigNumber from 'bignumber.js'
+
export const getRedbankDepositMsgOptions = (
amount: number,
denom: string,
): RedbankDepositMsgOptions => {
return {
msg: { deposit: {} },
- funds: [{ denom, amount: amount.toFixed(0) }],
+ funds: [{ denom, amount: new BigNumber(amount).toFixed(0) }],
}
}
diff --git a/src/functions/messages/getRedbankRepayMsgOptions.ts b/src/functions/messages/getRedbankRepayMsgOptions.ts
index e2f5f07..e4d9624 100644
--- a/src/functions/messages/getRedbankRepayMsgOptions.ts
+++ b/src/functions/messages/getRedbankRepayMsgOptions.ts
@@ -1,3 +1,4 @@
+import BigNumber from 'bignumber.js'
import { FEE_EST_AMOUNT } from 'constants/appConstants'
export const getRedbankRepayMsgOptions = (
@@ -27,7 +28,7 @@ export const getRedbankRepayMsgOptions = (
funds: [
{
denom,
- amount: adjustedAmount === 0 ? FEE_EST_AMOUNT : adjustedAmount.toFixed(0),
+ amount: adjustedAmount === 0 ? FEE_EST_AMOUNT : new BigNumber(adjustedAmount).toFixed(0),
},
],
}
diff --git a/src/functions/messages/getRedbankWithdrawMsgOptions.ts b/src/functions/messages/getRedbankWithdrawMsgOptions.ts
index 18a32db..71408e3 100644
--- a/src/functions/messages/getRedbankWithdrawMsgOptions.ts
+++ b/src/functions/messages/getRedbankWithdrawMsgOptions.ts
@@ -1,3 +1,4 @@
+import BigNumber from 'bignumber.js'
import { FEE_EST_AMOUNT } from 'constants/appConstants'
export const getRedbankWithdrawMsgOptions = (
@@ -12,7 +13,7 @@ export const getRedbankWithdrawMsgOptions = (
// If we want to withdraw all our amount, the SC accepts sending no amount and will default to withdrawing all available.
if (amount && amount > 0) {
- msg.withdraw.amount = amount === 0 ? FEE_EST_AMOUNT : amount.toFixed(0)
+ msg.withdraw.amount = amount === 0 ? FEE_EST_AMOUNT : new BigNumber(amount).toFixed(0)
}
return { msg }
diff --git a/src/hooks/queries/useDepositAndDebt.tsx b/src/hooks/queries/useDepositAndDebt.tsx
index be3e04b..5ef1676 100644
--- a/src/hooks/queries/useDepositAndDebt.tsx
+++ b/src/hooks/queries/useDepositAndDebt.tsx
@@ -39,6 +39,10 @@ export interface DepositAndDebtData {
TIADebt: string
stOSMODeposits: string
stOSMODebt: string
+ wstETHDeposits: string
+ wstETHDebt: string
+ stkATOMDeposits: string
+ stkATOMDebt: string
}
}
diff --git a/src/hooks/queries/useEditPosition.tsx b/src/hooks/queries/useEditPosition.tsx
index ccea271..3c4756d 100644
--- a/src/hooks/queries/useEditPosition.tsx
+++ b/src/hooks/queries/useEditPosition.tsx
@@ -195,7 +195,7 @@ export const useEditPosition = (props: Props) => {
})
}
- BigNumber.config({ EXPONENTIAL_AT: [-7, 30] })
+ BigNumber.config({ EXPONENTIAL_AT: 1e9 })
const minimumReceive = new BigNumber(isV2 || !minLpToReceive ? 0 : minLpToReceive)
.times(1 - slippage)
.integerValue(BigNumber.ROUND_CEIL)
diff --git a/src/images/stkatom.svg b/src/images/stkatom.svg
new file mode 100644
index 0000000..c067926
--- /dev/null
+++ b/src/images/stkatom.svg
@@ -0,0 +1,42 @@
+
diff --git a/src/images/wsteth.svg b/src/images/wsteth.svg
new file mode 100644
index 0000000..656b024
--- /dev/null
+++ b/src/images/wsteth.svg
@@ -0,0 +1,26 @@
+
diff --git a/src/libs/parse.ts b/src/libs/parse.ts
index 07bdcc5..4b43dde 100644
--- a/src/libs/parse.ts
+++ b/src/libs/parse.ts
@@ -7,8 +7,7 @@ import { ViewType } from 'types/enums'
import { countDecimals } from './math'
-BigNumber.config({ EXPONENTIAL_AT: [-24, 20] })
-
+BigNumber.config({ EXPONENTIAL_AT: 1e9 })
type Formatter = (amount: string, symbol: string, decimals: number) => string
const rm = BigNumber.ROUND_HALF_CEIL
diff --git a/src/store/slices/vaults.ts b/src/store/slices/vaults.ts
index e705b24..7923071 100644
--- a/src/store/slices/vaults.ts
+++ b/src/store/slices/vaults.ts
@@ -85,7 +85,7 @@ export const vaultsSlice = (set: NamedSet, get: GetState): VaultsS
const promises = lpTokens.map(async (lpToken) => {
// Needed as lpTokenValues are very large from vaults
- BigNumber.config({ EXPONENTIAL_AT: [-7, 30] })
+ BigNumber.config({ EXPONENTIAL_AT: 1e9 })
const amount = new BigNumber(lpToken.locked)
.plus(lpToken.unlocked || 0)
diff --git a/src/styles/_assets.module.scss b/src/styles/_assets.module.scss
index 5da60e2..69496ff 100644
--- a/src/styles/_assets.module.scss
+++ b/src/styles/_assets.module.scss
@@ -18,6 +18,8 @@
ntrn: $colorTokenNTRN;
tia: $colorTokenTIA;
stosmo: $colorTokenStOSMO;
+ wsteth: $colorTokenWstETH;
+ stkatom: $colorTokenStkATOM;
/* COLORS */
success: $colorInfoProfit;
diff --git a/src/styles/_master.scss b/src/styles/_master.scss
index 40c2085..40dcedc 100644
--- a/src/styles/_master.scss
+++ b/src/styles/_master.scss
@@ -45,6 +45,8 @@ $colorTokenNTRN: #284fe0;
$colorTokenASTRO: #2233e2;
$colorTokenStOSMO: #e50571;
$colorTokenTIA: #8623ff;
+$colorTokenWstETH: #00a3ff;
+$colorTokenStkATOM: #c73238;
$colorGradientOSMO: linear-gradient(to bottom, #3a02e2, #e700ca);
$colorGradientATOM: linear-gradient(to bottom, #2e3148, #6f7390);
@@ -60,6 +62,8 @@ $colorGradientNTRN: linear-gradient(to bottom, #284fe0, #31d99c);
$colorGradientStOSMO: linear-gradient(to bottom, #e50571, #fb5da9);
$colorGradientTIA: linear-gradient(to bottom, #8623ff, #cfa7ff);
$colorGradientUSDT: linear-gradient(to bottom, #50af95, #b9dfd5);
+$colorGradientWstETH: linear-gradient(to bottom, #00a3ff, #99daff);
+$colorGradientStkATOM: linear-gradient(to bottom, #2e3148, #c73238);
/* Alpha Colors */
$alphaWhite10: rgba(255, 255, 255, 0.1);
diff --git a/src/types/interfaces/asset.d.ts b/src/types/interfaces/asset.d.ts
index 40e7a53..1a2b69c 100644
--- a/src/types/interfaces/asset.d.ts
+++ b/src/types/interfaces/asset.d.ts
@@ -19,6 +19,8 @@ interface Asset {
| 'WETH.axl'
| 'TIA'
| 'stOSMO'
+ | 'wstETH'
+ | 'stkATOM'
id:
| 'OSMO'
| 'NTRN'
@@ -36,6 +38,8 @@ interface Asset {
| 'stATOM'
| 'TIA'
| 'stOSMO'
+ | 'wstETH'
+ | 'stkATOM'
prefix?: string
contract_addr?: string
logo: string
diff --git a/src/types/interfaces/redbank.d.ts b/src/types/interfaces/redbank.d.ts
index 1ffca19..0796786 100644
--- a/src/types/interfaces/redbank.d.ts
+++ b/src/types/interfaces/redbank.d.ts
@@ -35,6 +35,10 @@ interface RedBankData {
TIAMarketIncentive: MarketIncentive | MultiAssetMarketIncentive[]
stOSMOMarket: Market
stOSMOMarketIncentive: MarketIncentive | MultiAssetMarketIncentive[]
+ wstETHMarket: Market
+ wstETHMarketIncentive: MarketIncentive | MultiAssetMarketIncentive[]
+ stkATOMMarket: Market
+ stkATOMMarketIncentive: MarketIncentive | MultiAssetMarketIncentive[]
collateral: UserCollateral[]
unclaimedRewards: string | Coin[]
}