Skip to content

Commit

Permalink
Remove Thorswap URL
Browse files Browse the repository at this point in the history
  • Loading branch information
hippocampus-web3 committed Oct 10, 2023
1 parent 90c21d1 commit 4497943
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 19 deletions.
1 change: 0 additions & 1 deletion packages/xchain-midgard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ const data = midgardApi.getPool('BTC.BTC')
## Documentation

[`Midgard Thorchain endpoint`](https://midgard.thorchain.info/v2/doc)
[`Midgard Thorswap endpoint`](https://midgard.thorswap.net/v2/doc)
[`Midgard NineRelms endpoint`](https://midgard.ninerealms.com/v2/doc)

### Setting Headers for Nine Realms endpoints
Expand Down
1 change: 0 additions & 1 deletion packages/xchain-midgard/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export const MIDGARD_API_TS_URL = 'https://midgard.thorswap.net/'
export const MIDGARD_API_9R_URL = 'https://midgard.ninerealms.com/'
4 changes: 2 additions & 2 deletions packages/xchain-midgard/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { MIDGARD_API_TS_URL } from './config'
import { MIDGARD_API_9R_URL } from './config'
import { Configuration, DefaultApi } from './generated/midgardApi'

const baseUrl = MIDGARD_API_TS_URL
const baseUrl = MIDGARD_API_9R_URL
const defaultConfig = new Configuration({ basePath: baseUrl })

export * from './generated/midgardApi'
Expand Down
6 changes: 3 additions & 3 deletions packages/xchain-thorchain-amm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"@xchainjs/xchain-litecoin": "^0.12.2",
"@xchainjs/xchain-mayachain": "^0.2.5",
"@xchainjs/xchain-midgard": "^0.5.2",
"@xchainjs/xchain-thorchain": "^0.28.6",
"@xchainjs/xchain-thornode": "^0.3.7",
"@xchainjs/xchain-thorchain": "^0.28.8",
"@xchainjs/xchain-thornode": "^0.3.6",
"@xchainjs/xchain-thorchain-query": "^0.6.3",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo-providers": "^0.2.2",
Expand Down Expand Up @@ -89,8 +89,8 @@
"@xchainjs/xchain-litecoin": "^0.12.2",
"@xchainjs/xchain-mayachain": "^0.2.5",
"@xchainjs/xchain-midgard": "^0.5.2",
"@xchainjs/xchain-thorchain": "^0.28.6",
"@xchainjs/xchain-thornode": "^0.3.7",
"@xchainjs/xchain-thorchain": "^0.28.8",
"@xchainjs/xchain-thorchain-query": "^0.6.3",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo-providers": "^0.2.2",
Expand Down
12 changes: 6 additions & 6 deletions packages/xchain-thorchain-amm/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Basic validation of a request before running the
if sourceAsset <= 0
return "source asset is 0"
if source asset != RUNE && source asset not in active pool list (https://midgard.thorswap.net/v2/pools where status = "available")
if source asset != RUNE && source asset not in active pool list (https://midgard.ninerealms.com/v2/pools where status = "available")
return "source asset not on pool list"
if destinationAsset != RUNE && destinationAsset not in active pool list (https://midgard.thorswap.net/v2/pools where status = "available")
if destinationAsset != RUNE && destinationAsset not in active pool list (https://midgard.ninerealms.com/v2/pools where status = "available")
return "destination asset not on pool list"
If valueofRUNE(inbound fee + outbound fee) > valueOfRUNE(inboundAsset)
Expand Down Expand Up @@ -99,7 +99,7 @@ This will be the Min Outbound delay time. Could be more depending on network act
### Midgard Requirements

1. Mimir values
1. Outbound Queue (https://midgard.thorswap.net/v2/thorchain/queue)
1. Outbound Queue (https://midgard.ninerealms.com/v2/thorchain/queue)

### Logic

Expand All @@ -120,7 +120,7 @@ runeValue = runeValueOf(outputAmount)
if runeValue < minTxOutVolumeThreshold
Return 6 // likley next block.
sumValue = runeValue + scheduled_outbound_value (https://midgard.thorswap.net/v2/thorchain/queue)
sumValue = runeValue + scheduled_outbound_value (https://midgard.ninerealms.com/v2/thorchain/queue)
// reduce delay rate relative to the total scheduled value. In high volume
// scenarios, this causes the network to send outbound transactions slower,
Expand Down Expand Up @@ -356,8 +356,8 @@ Removes liquidity for a user

### Midgard Requirements

1. `LP Details https://midgard.thorswap.net/v2/member/{address}`
1. `Pool List https://midgard.thorswap.net/v2/pools `
1. `LP Details https://midgard.ninerealms.com/v2/member/{address}`
1. `Pool List https://midgard.ninerealms.com/v2/pools `

See if the the pool is valid
See if their wallet is a member of the pool.
Expand Down
2 changes: 1 addition & 1 deletion packages/xchain-thorchain-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@
"publishConfig": {
"access": "public"
}
}
}
2 changes: 1 addition & 1 deletion packages/xchain-thorchain-query/src/utils/thornode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export type ThornodeConfig = {
const defaultThornodeConfig: Record<Network, ThornodeConfig> = {
mainnet: {
apiRetries: 3,
thornodeBaseUrls: [`https://thornode.ninerealms.com`, `https://thornode.thorswap.net`],
thornodeBaseUrls: [`https://thornode.ninerealms.com`],
},
stagenet: {
apiRetries: 3,
Expand Down
4 changes: 2 additions & 2 deletions packages/xchain-thorchain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xchainjs/xchain-thorchain",
"version": "0.28.7",
"version": "0.28.8",
"description": "Custom Thorchain client and utilities used by XChainJS clients",
"keywords": [
"THORChain",
Expand Down Expand Up @@ -56,4 +56,4 @@
"axios": "^1.3.6",
"bech32-buffer": "^0.2.0"
}
}
}
4 changes: 2 additions & 2 deletions packages/xchain-thorchain/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ export const FallBackUrls = [
rpc: ['https://stagenet-rpc.ninerealms.com'],
},
[Network.Mainnet]: {
node: ['https://thornode-v1.ninerealms.com', 'https://thornode.thorswap.net/'],
rpc: ['https://rpc-v1.ninerealms.com', 'https://rpc.thorswap.net'],
node: ['https://thornode-v1.ninerealms.com'],
rpc: ['https://rpc-v1.ninerealms.com'],
},
},
]

0 comments on commit 4497943

Please sign in to comment.