v1.5.0-rc2

This commit is contained in:
Linkie Link 2023-06-20 14:27:05 +02:00
parent 5a19e840bb
commit 41e3a7711a
No known key found for this signature in database
GPG Key ID: 5318B0F2564D38EA
3 changed files with 27 additions and 27 deletions

View File

@ -28,9 +28,8 @@ 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: 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 | | 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_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_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_RPC | The Osmosis node RPC endpoint to use | https://rpc-osmosis.blockapsis.com |
@ -47,16 +46,15 @@ This command will start the container in interactive mode with port 3000 bound t
```sh ```sh
docker run -it -p 3000:3000 \ docker run -it -p 3000:3000 \
-e NETWORK=mainnet \ -e URL_OSMOSIS_GQL=https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql \
-e URL_OSMOSIS_GQL=https://your-osmosis-hive-endpoint.com \ -e URL_OSMOSIS_REST=https://lcd-osmosis.blockapsis.com \
-e URL_OSMOSIS_REST=https://your-osmosis-rest-endpoint.com \ -e URL_OSMOSIS_RPC=https://rpc-osmosis.blockapsis.com \
-e URL_OSMOSIS_RPC=https://your-osmosis-rpc-endpoint.com \ -e URL_OSMOSIS_TEST_GQL=https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql \
-e URL_OSMOSIS_TEST_GQL=https://your-osmosis-testnet-hive-endpoint.com \ -e URL_OSMOSIS_TEST_REST=https://lcd.osmotest5.osmosis.zone \
-e URL_OSMOSIS_TEST_REST=https://your-osmosis-testnet-rest-endpoint.com \ -e URL_OSMOSIS_TEST_RPC=https://rpc.osmotest5.osmosis.zone \
-e URL_OSMOSIS_TEST_RPC=https://your-osmosis-testnet-rpc-endpoint.com \ -e URL_NEUTRON_TEST_GQL=https://testnet-neutron-gql.marsprotocol.io/graphql \
-e URL_NEUTRON_TEST_GQL=https://your-neutron-testnet-hive-endpoint.com \ -e URL_NEUTRON_TEST_REST=https://rest-palvus.pion-1.ntrn.tech \
-e URL_NEUTRON_TEST_REST=https://your-neutron-testnet-rest-endpoint.com \ -e URL_NEUTRON_TEST_RPC=https://rpc-palvus.pion-1.ntrn.tech marsprotocol/interface:latest
-e URL_NEUTRON_TEST_RPC=https://your-neutron-testnet-rpc-endpoint.com marsprotocol/interface:latest
``` ```
## 3. Text and translations ## 3. Text and translations

View File

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

View File

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