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

Remove Oasis Scan v1 API #2105

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .changelog/2105.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove Oasis Scan API v1
2 changes: 0 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,3 @@ Procfile text

# Auto-generated files
src/vendors/explorer/*/** linguist-generated=true
src/vendors/oasisscan/*/** linguist-generated=true
src/vendors/oasisscan/dump_validators.json linguist-generated=true
6 changes: 0 additions & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
"src/vendors/explorer/.openapi-generator-ignore": true,
"src/vendors/explorer/runtime.ts": true,
"src/vendors/explorer/index.ts": true,
"src/vendors/oasisscan/apis": true,
"src/vendors/oasisscan/models": true,
"src/vendors/oasisscan/.openapi-generator": true,
"src/vendors/oasisscan/.openapi-generator-ignore": true,
"src/vendors/oasisscan/runtime.ts": true,
"src/vendors/oasisscan/index.ts": true,
"src/vendors/oasisscan-v2/apis": true,
"src/vendors/oasisscan-v2/models": true,
"src/vendors/oasisscan-v2/.openapi-generator": true,
Expand Down
1 change: 0 additions & 1 deletion src/app/components/ErrorFormatter/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function ErrorFormatter(props: Props) {

const backendToLabel = {
[BackendAPIs.OasisMonitor]: t('backends.oasismonitor', 'Oasis Monitor API'),
[BackendAPIs.OasisScan]: t('backends.oasisscan', 'Oasis Scan API'),
[BackendAPIs.OasisScanV2]: t('backends.oasisscanV2', 'Oasis Scan API v2'),
[BackendAPIs.Nexus]: t('backends.nexus', 'Nexus API'),
}
Expand Down
1 change: 0 additions & 1 deletion src/app/components/Footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export const Footer = memo(() => {

const backendToLabel = {
[BackendAPIs.OasisMonitor]: t('footer.poweredBy.oasismonitor', 'Oasis Monitor API & Oasis gRPC'),
[BackendAPIs.OasisScan]: t('footer.poweredBy.oasisscan', 'Oasis Scan API & Oasis gRPC'),
[BackendAPIs.OasisScanV2]: t('footer.poweredBy.oasisscanV2', 'Oasis Scan API v2 & Oasis gRPC'),
[BackendAPIs.Nexus]: t('footer.poweredBy.nexus', 'Nexus API & Oasis gRPC'),
}
Expand Down
2 changes: 0 additions & 2 deletions src/app/pages/E2EPage/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { TextInput } from 'grommet/es6/components/TextInput'
import React, { useEffect } from 'react'
import { useNavigate } from 'react-router-dom'
import * as monitor from 'vendors/monitor'
import * as oasisscan from 'vendors/oasisscan'
import * as oasis from '@oasisprotocol/client'
import * as oasisRT from '@oasisprotocol/client-rt'
import { useDispatch, useStore } from 'react-redux'
Expand Down Expand Up @@ -43,7 +42,6 @@ function ExposeInternals() {
const store = useStore()
useEffect(() => {
window.monitor = monitor
window.oasisscan = oasisscan
window.oasis = oasis
window.oasisRT = oasisRT
window.store = store
Expand Down
21 changes: 0 additions & 21 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export const consensusDecimals = 9
// Moved outside backend.ts to avoid circular dependency
export enum BackendAPIs {
OasisMonitor = 'oasismonitor',
OasisScan = 'oasisscan',
OasisScanV2 = 'oasisscanV2',
Nexus = 'nexus',
}
Expand All @@ -24,7 +23,6 @@ type BackendProviders = {
ticker: string // from nic.stakingTokenSymbol()
min_delegation: number // from nic.stakingConsensusParameters().min_delegation
[BackendAPIs.OasisMonitor]: BackendApiUrls
[BackendAPIs.OasisScan]: BackendApiUrls
[BackendAPIs.OasisScanV2]: BackendApiUrls
[BackendAPIs.Nexus]: BackendApiUrls
}
Expand All @@ -42,12 +40,6 @@ export const config: BackendConfig = {
explorer: 'https://monitor.oasis.dev',
blockExplorer: 'https://oasismonitor.com/operation/{{txHash}}',
},
[BackendAPIs.OasisScan]: {
explorer: 'https://api.oasisscan.com/mainnet',
blockExplorer: 'https://oasisscan.com/transactions/{{txHash}}',
blockExplorerParatimes: 'https://oasisscan.com/paratimes/transactions/{{txHash}}?runtime={{runtimeId}}',
blockExplorerAccount: 'https://www.oasisscan.com/accounts/detail/{{address}}',
},
[BackendAPIs.OasisScanV2]: {
explorer: 'https://api.oasisscan.com/v2/mainnet',
blockExplorer: 'https://oasisscan.com/transactions/{{txHash}}',
Expand All @@ -69,12 +61,6 @@ export const config: BackendConfig = {
explorer: 'https://monitor.oasis.dev/api/testnet',
blockExplorer: 'https://testnet.oasismonitor.com/operation/{{txHash}}',
},
[BackendAPIs.OasisScan]: {
explorer: 'https://api.oasisscan.com/testnet',
blockExplorer: 'https://testnet.oasisscan.com/transactions/{{txHash}}',
blockExplorerParatimes: 'https://testnet.oasisscan.com/paratimes/tx/{{txHash}}',
blockExplorerAccount: 'https://testnet.oasisscan.com/accounts/detail/{{address}}',
},
[BackendAPIs.OasisScanV2]: {
explorer: 'https://api.oasisscan.com/testnet',
blockExplorer: 'https://testnet.oasisscan.com/transactions/{{txHash}}',
Expand All @@ -97,13 +83,6 @@ export const config: BackendConfig = {
explorer: 'http://localhost:9001',
blockExplorer: 'http://localhost:9001/data/transactions?operation_id={{txHash}}',
},
[BackendAPIs.OasisScan]: {
explorer: 'http://localhost:9001',
blockExplorer: 'http://localhost:9001/data/transactions?operation_id={{txHash}}',
blockExplorerParatimes:
'http://localhost:9001/data/paratimes/transactions/{{txHash}}?runtime={{runtimeId}}',
blockExplorerAccount: 'http://localhost:9001/data/accounts/detail/{{address}}',
},
[BackendAPIs.OasisScanV2]: {
explorer: 'http://localhost:9001',
blockExplorer: 'http://localhost:9001/data/transactions?operation_id={{txHash}}',
Expand Down
2 changes: 0 additions & 2 deletions src/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@
"appTitle": "ROSE Wallet",
"backends": {
"oasismonitor": "Oasis Monitor API",
"oasisscan": "Oasis Scan API",
"oasisscanV2": "Oasis Scan API v2",
"nexus": "Nexus API"
},
Expand Down Expand Up @@ -201,7 +200,6 @@
"github": "ROSE Wallet is <GithubLink>open source</GithubLink> and powered by",
"poweredBy": {
"oasismonitor": "Oasis Monitor API & Oasis gRPC",
"oasisscan": "Oasis Scan API & Oasis gRPC",
"oasisscanV2": "Oasis Scan API v2 & Oasis gRPC",
"nexus": "Nexus API & Oasis gRPC"
},
Expand Down
2 changes: 1 addition & 1 deletion src/types/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
type Backend = 'oasismonitor' | 'oasisscan' | 'oasisscanV2' | 'nexus'
type Backend = 'oasismonitor' | 'oasisscanV2' | 'nexus'

declare global {
namespace NodeJS {
Expand Down
Loading
Loading