Merge pull request #34 from mars-protocol/v1.5.1

v1.5.1
This commit is contained in:
Linkie Link 2023-06-20 15:01:50 +02:00 committed by GitHub
commit 61d3db002e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 29 deletions

View File

@ -28,18 +28,17 @@ Copy `.env.example` to `.env` and modify the values to suit your needs.
We allow the use of environment variables to be passed to the Docker container to specify custom endpoints for the app. The variables are:
|Variable|Description|Default|
|--------|-----------|-------|
|URL_OSMOSIS_GQL|The Osmosis Hive GraphQL endpoint to use|https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql|
|URL_OSMOSIS_REST|The Osmosis node REST endpoint to use|https://lcd-osmosis.blockapsis.com|
|URL_OSMOSIS_RPC|The Osmosis node RPC endpoint to use|https://rpc-osmosis.blockapsis.com|
|URL_OSMOSIS_TEST_GQL|The Osmosis Testnet Hive GraphQL endpoint to use|https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql|
|URL_OSMOSIS_TEST_REST|The Osmosis Testnet node REST endpoint to use|https://lcd.osmotest5.osmosis.zone|
|URL_OSMOSIS_TEST_RPC|The Osmosis Testnet node RPC endpoint to use|https://rpc.osmotest5.osmosis.zone|
|URL_NEUTRON_TEST_GQL|The Neutron Testnet Hive GraphQL endpoint to use|https://testnet-neutron-gql.marsprotocol.io/graphql|
|URL_NEUTRON_TEST_REST|The Neutron Testnet node REST endpoint to use|https://rest-palvus.pion-1.ntrn.tech|
|URL_NEUTRON_TEST_RPC|The Neutron Testnet node RPC endpoint to use|https://rpc-palvus.pion-1.ntrn.tech|
| Variable | Description | Default |
| --------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------ |
| URL_OSMOSIS_GQL | The Osmosis Hive GraphQL endpoint to use | https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql |
| URL_OSMOSIS_REST | The Osmosis node REST endpoint to use | https://lcd-osmosis.blockapsis.com |
| URL_OSMOSIS_RPC | The Osmosis node RPC endpoint to use | https://rpc-osmosis.blockapsis.com |
| URL_OSMOSIS_TEST_GQL | The Osmosis Testnet Hive GraphQL endpoint to use | https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql |
| URL_OSMOSIS_TEST_REST | The Osmosis Testnet node REST endpoint to use | https://lcd.osmotest5.osmosis.zone |
| URL_OSMOSIS_TEST_RPC | The Osmosis Testnet node RPC endpoint to use | https://rpc.osmotest5.osmosis.zone |
| URL_NEUTRON_TEST_GQL | The Neutron Testnet Hive GraphQL endpoint to use | https://testnet-neutron-gql.marsprotocol.io/graphql |
| URL_NEUTRON_TEST_REST | The Neutron Testnet node REST endpoint to use | https://rest-palvus.pion-1.ntrn.tech |
| URL_NEUTRON_TEST_RPC | The Neutron Testnet node RPC endpoint to use | https://rpc-palvus.pion-1.ntrn.tech |
**Sample Docker run command**
@ -47,16 +46,15 @@ This command will start the container in interactive mode with port 3000 bound t
```sh
docker run -it -p 3000:3000 \
-e NETWORK=mainnet \
-e URL_OSMOSIS_GQL=https://your-osmosis-hive-endpoint.com \
-e URL_OSMOSIS_REST=https://your-osmosis-rest-endpoint.com \
-e URL_OSMOSIS_RPC=https://your-osmosis-rpc-endpoint.com \
-e URL_OSMOSIS_TEST_GQL=https://your-osmosis-testnet-hive-endpoint.com \
-e URL_OSMOSIS_TEST_REST=https://your-osmosis-testnet-rest-endpoint.com \
-e URL_OSMOSIS_TEST_RPC=https://your-osmosis-testnet-rpc-endpoint.com \
-e URL_NEUTRON_TEST_GQL=https://your-neutron-testnet-hive-endpoint.com \
-e URL_NEUTRON_TEST_REST=https://your-neutron-testnet-rest-endpoint.com \
-e URL_NEUTRON_TEST_RPC=https://your-neutron-testnet-rpc-endpoint.com marsprotocol/interface:latest
-e URL_OSMOSIS_GQL=https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql \
-e URL_OSMOSIS_REST=https://lcd-osmosis.blockapsis.com \
-e URL_OSMOSIS_RPC=https://rpc-osmosis.blockapsis.com \
-e URL_OSMOSIS_TEST_GQL=https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql \
-e URL_OSMOSIS_TEST_REST=https://lcd.osmotest5.osmosis.zone \
-e URL_OSMOSIS_TEST_RPC=https://rpc.osmotest5.osmosis.zone \
-e URL_NEUTRON_TEST_GQL=https://testnet-neutron-gql.marsprotocol.io/graphql \
-e URL_NEUTRON_TEST_REST=https://rest-palvus.pion-1.ntrn.tech \
-e URL_NEUTRON_TEST_RPC=https://rpc-palvus.pion-1.ntrn.tech marsprotocol/interface:latest
```
## 3. Text and translations

View File

@ -1,7 +1,7 @@
{
"name": "mars",
"homepage": "./",
"version": "1.5.0",
"version": "1.5.1",
"license": "SEE LICENSE IN LICENSE FILE",
"private": false,
"scripts": {

View File

@ -58,6 +58,8 @@ export const BreakdownTable = (props: Props) => {
: 'borrowedSecondary'
const borrowedChange =
props.newPosition.amounts[borrowKey] - props.prevPosition.amounts[borrowKey]
const borrowDenom =
borrowKey === 'borrowedPrimary' ? props.vault.denoms.primary : props.vault.denoms.secondary
const containerClasses = classNames([
props.className,
@ -79,7 +81,7 @@ export const BreakdownTable = (props: Props) => {
break
case AmountType.DEBT:
amount = props.newPosition.amounts[borrowKey]
denom = props.vault.denoms.secondary
denom = borrowDenom
break
case AmountType.POSITION_PRIMARY:
amount = props.newPosition.amounts.primary + props.newPosition.amounts.borrowedPrimary

View File

@ -59,8 +59,8 @@ export const useEditPosition = (props: Props) => {
amount: (secondaryAmount + borrowedSecondaryAmount).toString(),
})
let primaryAfterSwap = primaryAmount + borrowedPrimaryAmount
let secondaryAfterSwap = secondaryAmount + borrowedSecondaryAmount
let primaryAfterSwap = new BigNumber(primaryAmount).plus(borrowedPrimaryAmount)
let secondaryAfterSwap = new BigNumber(secondaryAmount).plus(borrowedSecondaryAmount)
// If difference is larger than threshold, initiate a swap
const difference = primaryBaseAmount - secondaryBaseAmount
@ -91,8 +91,8 @@ export const useEditPosition = (props: Props) => {
}),
)
primaryAfterSwap = primaryAfterSwap + primaryAmountChange
secondaryAfterSwap = secondaryAfterSwap + secondaryAmountChange
primaryAfterSwap = primaryAfterSwap.plus(primaryAmountChange)
secondaryAfterSwap = secondaryAfterSwap.plus(secondaryAmountChange)
}
const coins: Coin[] = [
{

View File

@ -18,7 +18,7 @@ export const useMarsOracle = () => {
const priceSourcesQuery = getContractQuery(
'price_sources',
oracleAddress || '',
'{ price_sources: {} }',
'{ price_sources: {limit: 20} }',
)
whitelistedAssets