Skip to content

Commit 61d3db0

Browse files
authored
Merge pull request #34 from mars-protocol/v1.5.1
v1.5.1
2 parents 5a19e84 + 70e22a8 commit 61d3db0

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed

README.md

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -28,35 +28,33 @@ Copy `.env.example` to `.env` and modify the values to suit your needs.
2828

2929
We allow the use of environment variables to be passed to the Docker container to specify custom endpoints for the app. The variables are:
3030

31-
32-
|Variable|Description|Default|
33-
|--------|-----------|-------|
34-
|URL_OSMOSIS_GQL|The Osmosis Hive GraphQL endpoint to use|https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql|
35-
|URL_OSMOSIS_REST|The Osmosis node REST endpoint to use|https://lcd-osmosis.blockapsis.com|
36-
|URL_OSMOSIS_RPC|The Osmosis node RPC endpoint to use|https://rpc-osmosis.blockapsis.com|
37-
|URL_OSMOSIS_TEST_GQL|The Osmosis Testnet Hive GraphQL endpoint to use|https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql|
38-
|URL_OSMOSIS_TEST_REST|The Osmosis Testnet node REST endpoint to use|https://lcd.osmotest5.osmosis.zone|
39-
|URL_OSMOSIS_TEST_RPC|The Osmosis Testnet node RPC endpoint to use|https://rpc.osmotest5.osmosis.zone|
40-
|URL_NEUTRON_TEST_GQL|The Neutron Testnet Hive GraphQL endpoint to use|https://testnet-neutron-gql.marsprotocol.io/graphql|
41-
|URL_NEUTRON_TEST_REST|The Neutron Testnet node REST endpoint to use|https://rest-palvus.pion-1.ntrn.tech|
42-
|URL_NEUTRON_TEST_RPC|The Neutron Testnet node RPC endpoint to use|https://rpc-palvus.pion-1.ntrn.tech|
31+
| Variable | Description | Default |
32+
| --------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------ |
33+
| URL_OSMOSIS_GQL | The Osmosis Hive GraphQL endpoint to use | https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql |
34+
| URL_OSMOSIS_REST | The Osmosis node REST endpoint to use | https://lcd-osmosis.blockapsis.com |
35+
| URL_OSMOSIS_RPC | The Osmosis node RPC endpoint to use | https://rpc-osmosis.blockapsis.com |
36+
| URL_OSMOSIS_TEST_GQL | The Osmosis Testnet Hive GraphQL endpoint to use | https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql |
37+
| URL_OSMOSIS_TEST_REST | The Osmosis Testnet node REST endpoint to use | https://lcd.osmotest5.osmosis.zone |
38+
| URL_OSMOSIS_TEST_RPC | The Osmosis Testnet node RPC endpoint to use | https://rpc.osmotest5.osmosis.zone |
39+
| URL_NEUTRON_TEST_GQL | The Neutron Testnet Hive GraphQL endpoint to use | https://testnet-neutron-gql.marsprotocol.io/graphql |
40+
| URL_NEUTRON_TEST_REST | The Neutron Testnet node REST endpoint to use | https://rest-palvus.pion-1.ntrn.tech |
41+
| URL_NEUTRON_TEST_RPC | The Neutron Testnet node RPC endpoint to use | https://rpc-palvus.pion-1.ntrn.tech |
4342

4443
**Sample Docker run command**
4544

4645
This command will start the container in interactive mode with port 3000 bound to localhost and print logs to stdout.
4746

4847
```sh
4948
docker run -it -p 3000:3000 \
50-
-e NETWORK=mainnet \
51-
-e URL_OSMOSIS_GQL=https://your-osmosis-hive-endpoint.com \
52-
-e URL_OSMOSIS_REST=https://your-osmosis-rest-endpoint.com \
53-
-e URL_OSMOSIS_RPC=https://your-osmosis-rpc-endpoint.com \
54-
-e URL_OSMOSIS_TEST_GQL=https://your-osmosis-testnet-hive-endpoint.com \
55-
-e URL_OSMOSIS_TEST_REST=https://your-osmosis-testnet-rest-endpoint.com \
56-
-e URL_OSMOSIS_TEST_RPC=https://your-osmosis-testnet-rpc-endpoint.com \
57-
-e URL_NEUTRON_TEST_GQL=https://your-neutron-testnet-hive-endpoint.com \
58-
-e URL_NEUTRON_TEST_REST=https://your-neutron-testnet-rest-endpoint.com \
59-
-e URL_NEUTRON_TEST_RPC=https://your-neutron-testnet-rpc-endpoint.com marsprotocol/interface:latest
49+
-e URL_OSMOSIS_GQL=https://osmosis-node.marsprotocol.io/GGSFGSFGFG34/osmosis-hive-front/graphql \
50+
-e URL_OSMOSIS_REST=https://lcd-osmosis.blockapsis.com \
51+
-e URL_OSMOSIS_RPC=https://rpc-osmosis.blockapsis.com \
52+
-e URL_OSMOSIS_TEST_GQL=https://testnet-osmosis-node.marsprotocol.io/XF32UOOU55CX/osmosis-hive-front/graphql \
53+
-e URL_OSMOSIS_TEST_REST=https://lcd.osmotest5.osmosis.zone \
54+
-e URL_OSMOSIS_TEST_RPC=https://rpc.osmotest5.osmosis.zone \
55+
-e URL_NEUTRON_TEST_GQL=https://testnet-neutron-gql.marsprotocol.io/graphql \
56+
-e URL_NEUTRON_TEST_REST=https://rest-palvus.pion-1.ntrn.tech \
57+
-e URL_NEUTRON_TEST_RPC=https://rpc-palvus.pion-1.ntrn.tech marsprotocol/interface:latest
6058
```
6159

6260
## 3. Text and translations

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mars",
33
"homepage": "./",
4-
"version": "1.5.0",
4+
"version": "1.5.1",
55
"license": "SEE LICENSE IN LICENSE FILE",
66
"private": false,
77
"scripts": {

src/components/fields/Breakdown/BreakdownTable/BreakdownTable.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ export const BreakdownTable = (props: Props) => {
5858
: 'borrowedSecondary'
5959
const borrowedChange =
6060
props.newPosition.amounts[borrowKey] - props.prevPosition.amounts[borrowKey]
61+
const borrowDenom =
62+
borrowKey === 'borrowedPrimary' ? props.vault.denoms.primary : props.vault.denoms.secondary
6163

6264
const containerClasses = classNames([
6365
props.className,
@@ -79,7 +81,7 @@ export const BreakdownTable = (props: Props) => {
7981
break
8082
case AmountType.DEBT:
8183
amount = props.newPosition.amounts[borrowKey]
82-
denom = props.vault.denoms.secondary
84+
denom = borrowDenom
8385
break
8486
case AmountType.POSITION_PRIMARY:
8587
amount = props.newPosition.amounts.primary + props.newPosition.amounts.borrowedPrimary

src/hooks/queries/useEditPosition.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ export const useEditPosition = (props: Props) => {
5959
amount: (secondaryAmount + borrowedSecondaryAmount).toString(),
6060
})
6161

62-
let primaryAfterSwap = primaryAmount + borrowedPrimaryAmount
63-
let secondaryAfterSwap = secondaryAmount + borrowedSecondaryAmount
62+
let primaryAfterSwap = new BigNumber(primaryAmount).plus(borrowedPrimaryAmount)
63+
let secondaryAfterSwap = new BigNumber(secondaryAmount).plus(borrowedSecondaryAmount)
6464

6565
// If difference is larger than threshold, initiate a swap
6666
const difference = primaryBaseAmount - secondaryBaseAmount
@@ -91,8 +91,8 @@ export const useEditPosition = (props: Props) => {
9191
}),
9292
)
9393

94-
primaryAfterSwap = primaryAfterSwap + primaryAmountChange
95-
secondaryAfterSwap = secondaryAfterSwap + secondaryAmountChange
94+
primaryAfterSwap = primaryAfterSwap.plus(primaryAmountChange)
95+
secondaryAfterSwap = secondaryAfterSwap.plus(secondaryAmountChange)
9696
}
9797
const coins: Coin[] = [
9898
{

src/hooks/queries/useMarsOracle.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export const useMarsOracle = () => {
1818
const priceSourcesQuery = getContractQuery(
1919
'price_sources',
2020
oracleAddress || '',
21-
'{ price_sources: {} }',
21+
'{ price_sources: {limit: 20} }',
2222
)
2323

2424
whitelistedAssets

0 commit comments

Comments
 (0)