Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

919 runescan explorer #922

Merged
merged 3 commits into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/xchain-thorchain-amm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.8.2 (2023-11-16)

## Update

- Runescan explorer

# v0.8.1 (2023-11-16)

## Update
Expand Down
8 changes: 4 additions & 4 deletions packages/xchain-thorchain-amm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@xchainjs/xchain-thorchain-amm",
"version": "0.8.1",
"version": "0.8.2",
"description": "module that exposes estimating & swappping cryptocurrency assets on thorchain",
"keywords": [
"THORChain",
Expand Down Expand Up @@ -55,7 +55,7 @@
"@xchainjs/xchain-litecoin": "^0.13.4",
"@xchainjs/xchain-mayachain": "^0.2.10",
"@xchainjs/xchain-midgard": "^0.5.2",
"@xchainjs/xchain-thorchain": "^0.28.12",
"@xchainjs/xchain-thorchain": "^0.28.13",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo-providers": "^0.2.7",
"axios": "^1.3.6",
Expand Down Expand Up @@ -91,7 +91,7 @@
"@xchainjs/xchain-litecoin": "^0.13.4",
"@xchainjs/xchain-mayachain": "^0.2.10",
"@xchainjs/xchain-midgard": "^0.5.2",
"@xchainjs/xchain-thorchain": "^0.28.12",
"@xchainjs/xchain-thorchain": "^0.28.13",
"@xchainjs/xchain-util": "^0.13.1",
"@xchainjs/xchain-utxo-providers": "^0.2.7",
"axios": "^1.3.6",
Expand All @@ -109,4 +109,4 @@
"publishConfig": {
"access": "public"
}
}
}
6 changes: 6 additions & 0 deletions packages/xchain-thorchain/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v0.28.13 (2023-11-16)

## Update

- Runescan explorer

# v0.28.12 (2023-11-16)

## Update
Expand Down
12 changes: 6 additions & 6 deletions packages/xchain-thorchain/__tests__/client.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -600,26 +600,26 @@ describe('Client Test', () => {
})

it('should return valid explorer url', () => {
expect(thorClient.getExplorerUrl()).toEqual('https://viewblock.io/thorchain?network=stagenet')
expect(thorClient.getExplorerUrl()).toEqual('https://runescan.io?network=stagenet')

thorClient.setNetwork(Network.Mainnet)
expect(thorClient.getExplorerUrl()).toEqual('https://viewblock.io/thorchain')
expect(thorClient.getExplorerUrl()).toEqual('https://runescan.io')
})

it('should return valid explorer address url', () => {
expect(thorClient.getExplorerAddressUrl('tthorabc')).toEqual(
'https://viewblock.io/thorchain/address/tthorabc?network=stagenet',
'https://runescan.io/address/tthorabc?network=stagenet',
)

thorClient.setNetwork(Network.Mainnet)
expect(thorClient.getExplorerAddressUrl('thorabc')).toEqual('https://viewblock.io/thorchain/address/thorabc')
expect(thorClient.getExplorerAddressUrl('thorabc')).toEqual('https://runescan.io/address/thorabc')
})

it('should return valid explorer tx url', () => {
expect(thorClient.getExplorerTxUrl('txhash')).toEqual('https://viewblock.io/thorchain/tx/txhash?network=stagenet')
expect(thorClient.getExplorerTxUrl('txhash')).toEqual('https://runescan.io/tx/txhash?network=stagenet')

thorClient.setNetwork(Network.Mainnet)
expect(thorClient.getExplorerTxUrl('txhash')).toEqual('https://viewblock.io/thorchain/tx/txhash')
expect(thorClient.getExplorerTxUrl('txhash')).toEqual('https://runescan.io/tx/txhash')
})

it('fetches fees from client', async () => {
Expand Down
14 changes: 6 additions & 8 deletions packages/xchain-thorchain/__tests__/util.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,30 +138,28 @@ describe('thorchain/util', () => {

describe('explorer url', () => {
it('should return valid explorer url', () => {
expect(getExplorerUrl(defaultExplorerUrls, 'testnet' as Network)).toEqual(
'https://viewblock.io/thorchain?network=testnet',
)
expect(getExplorerUrl(defaultExplorerUrls, 'testnet' as Network)).toEqual('https://runescan.io?network=testnet')

expect(getExplorerUrl(defaultExplorerUrls, 'mainnet' as Network)).toEqual('https://viewblock.io/thorchain')
expect(getExplorerUrl(defaultExplorerUrls, 'mainnet' as Network)).toEqual('https://runescan.io')
})

it('should return valid explorer address url', () => {
expect(
getExplorerAddressUrl({ urls: defaultExplorerUrls, network: 'testnet' as Network, address: 'tthorabc' }),
).toEqual('https://viewblock.io/thorchain/address/tthorabc?network=testnet')
).toEqual('https://runescan.io/address/tthorabc?network=testnet')

expect(
getExplorerAddressUrl({ urls: defaultExplorerUrls, network: 'mainnet' as Network, address: 'thorabc' }),
).toEqual('https://viewblock.io/thorchain/address/thorabc')
).toEqual('https://runescan.io/address/thorabc')
})

it('should return valid explorer tx url', () => {
expect(getExplorerTxUrl({ urls: defaultExplorerUrls, network: 'testnet' as Network, txID: 'txhash' })).toEqual(
'https://viewblock.io/thorchain/tx/txhash?network=testnet',
'https://runescan.io/tx/txhash?network=testnet',
)

expect(getExplorerTxUrl({ urls: defaultExplorerUrls, network: 'mainnet' as Network, txID: 'txhash' })).toEqual(
'https://viewblock.io/thorchain/tx/txhash',
'https://runescan.io/tx/txhash',
)
})
})
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.12",
"version": "0.28.13",
"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"
}
}
}
2 changes: 1 addition & 1 deletion packages/xchain-thorchain/src/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Asset } from '@xchainjs/xchain-util/lib'

import { ExplorerUrls } from './types'

const DEFAULT_EXPLORER_URL = 'https://viewblock.io/thorchain'
const DEFAULT_EXPLORER_URL = 'https://runescan.io'
const txUrl = `${DEFAULT_EXPLORER_URL}/tx`
const addressUrl = `${DEFAULT_EXPLORER_URL}/address`
const RUNE_TICKER = 'RUNE'
Expand Down
Loading