mirror of
https://github.com/cerc-io/mars-interface.git
synced 2024-11-17 03:09:20 +00:00
v1.5.0-rc2
This commit is contained in:
parent
5a19e840bb
commit
41e3a7711a
42
README.md
42
README.md
@ -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
|
||||
|
@ -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
|
||||
|
@ -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[] = [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user