Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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: 0 additions & 1 deletion packages/boba/gateway/.env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
REACT_APP_INFURA_ID=
REACT_APP_ETHERSCAN_API=
REACT_APP_POLL_INTERVAL=15000
REACT_APP_GAS_POLL_INTERVAL=30000
SKIP_PREFLIGHT_CHECK=true
Expand Down
1 change: 0 additions & 1 deletion packages/boba/gateway/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ gateway.boba.betwork.
| Environment Vars | Required | Default Valu | Description |
| ---------------------------- | -------- | ------------ | --------------------------------------------------------------- |
| REACT_APP_INFURA_ID | Yes | '' | API key for infura account |
| REACT_APP_ETHERSCAN_API | Yes | '' | API key for etherscan acount. |
| REACT_APP_POLL_INTERVAL | Yes | 20000 | Interval to poll the fetch api about the records |
| SKIP_PREFLIGHT_CHECK | N/A | N/A | N/A |
| REACT_APP_WALLET_VERSION | Yes | N/A | This will be useful while prepare the build. |
Expand Down
40 changes: 0 additions & 40 deletions packages/boba/gateway/src/api/etherScanAxios.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/boba/gateway/src/containers/history/TX_Pending.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ import "react-datepicker/dist/react-datepicker.css"
import { Grid, Box } from '@mui/material'

import { orderBy } from 'lodash'
// import { selectNetwork } from 'selectors/setupSelector'

// import { getNetwork } from 'util/masterConfig'

import moment from 'moment'

Expand Down Expand Up @@ -157,19 +154,7 @@ function TX_Pending({ searchHistory, transactions }) {
//if totalNumberOfPages === 0, set to one so we don't get the strange "page 1 of 0" display
if (totalNumberOfPages === 0) totalNumberOfPages = 1

// const currentNetwork = useSelector(selectNetwork())
// const nw = getNetwork()

// const chainLink = (item) => {
// let network = nw[currentNetwork]
// let chain = item.chain === 'L1pending' ? 'L1' : item.chain;
// if (!!network && !!network[chain]) {
// return `${network[chain].transaction}${item.hash}`;
// }
// return '';
// }

console.log("PendingToShow:", paginatedTransactions)

return (
<S.HistoryContainer>
Expand Down
21 changes: 0 additions & 21 deletions packages/boba/gateway/src/services/networkService.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ import LZEndpointMockJson from "../deployment/contracts/crosschain/LZEndpointMoc
import { getNftImageUrl } from 'util/nftImage'
import { getNetwork } from 'util/masterConfig'

import etherScanInstance from 'api/etherScanAxios'
import omgxWatcherAxiosInstance from 'api/omgxWatcherAxios'
import coinGeckoAxiosInstance from 'api/coinGeckoAxios'
import verifierWatcherAxiosInstance from 'api/verifierWatcherAxios'
Expand Down Expand Up @@ -1002,29 +1001,10 @@ class NetworkService {
if (this.networkGateway === 'local') return
if (this.account === null) return

let txL1 = []
let txL1pending = []
let txL2 = []
let txL0 = []

const responseL1 = await etherScanInstance(
this.networkGateway,
'L1'
).get(`&address=${this.account}`)

if (responseL1.status === 200) {
const transactionsL1 = await responseL1.data
if (transactionsL1.status === '1') {
//thread in ChainID
txL1 = transactionsL1.result.map(v => ({
...v,
blockNumber: parseInt(v.blockNumber), //fix bug - sometimes this is string, sometimes an integer
timeStamp: parseInt(v.timeStamp), //fix bug - sometimes this is string, sometimes an integer
chain: 'L1'
}))
}
}

const responseL2 = await omgxWatcherAxiosInstance(
this.networkGateway
).post('get.l2.transactions', {
Expand Down Expand Up @@ -1068,7 +1048,6 @@ class NetworkService {
//add the chain: 'L1pending' field
txL1pending = responseL1pending.data.map(v => ({ ...v, chain: 'L1pending' }))
const annotated = [
...txL1,
...txL2,
...txL0,
...txL1pending //the new data product
Expand Down
1 change: 0 additions & 1 deletion packages/boba/gateway/src/util/constant.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const APP_CHAIN = process.env.REACT_APP_CHAIN
export const SENTRY_DSN = process.env.REACT_APP_SENTRY_DSN || null
export const APP_ZENDESK_KEY = process.env.REACT_APP_ZENDESK_KEY || null
export const INFURA_ID = process.env.REACT_APP_INFURA_ID
export const ETHERSCAN_API_KEY = process.env.REACT_APP_ETHERSCAN_API
export const MAX_HEALTH_BLOCK_LAG = process.env.REACT_APP_MAX_HEALTH_BLOCK_LAG
export const WALLET_VERSION = process.env.REACT_APP_WALLET_VERSION
export const APP_STATUS = process.env.REACT_APP_STATUS || 'normal'
Expand Down
5 changes: 1 addition & 4 deletions packages/boba/gateway/src/util/masterConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

import {
APP_CHAIN, ETHERSCAN_API_KEY, INFURA_ID, MAX_HEALTH_BLOCK_LAG,
APP_CHAIN, INFURA_ID, MAX_HEALTH_BLOCK_LAG,
} from './constant'

let NETWORK
Expand All @@ -31,7 +31,6 @@ if (APP_CHAIN === 'goerli') {
chainId: 5,
chainIdHex: '0x5',
rpcUrl: `https://goerli.infura.io/v3/${INFURA_ID}`,
blockExplorer: `https://api-goerli.etherscan.io/api?module=account&action=txlist&startblock=0&endblock=99999999&sort=asc&apikey=${ETHERSCAN_API_KEY}`,
transaction: `https://goerli.etherscan.io/tx/`
},
L2: {
Expand Down Expand Up @@ -79,7 +78,6 @@ if (APP_CHAIN === 'goerli') {
chainId: 1,
chainIdHex: '0x1',
rpcUrl: `https://mainnet.infura.io/v3/${INFURA_ID}`,
blockExplorer: `https://api.etherscan.io/api?module=account&action=txlist&startblock=0&endblock=99999999&sort=asc&apikey=${ETHERSCAN_API_KEY}`,
transaction: ` https://etherscan.io/tx/`,
},
L2: {
Expand Down Expand Up @@ -118,7 +116,6 @@ if (APP_CHAIN === 'goerli') {
chainId: 31337,
chainIdHex: '0x7A69',
rpcUrl: `http://${window.location.hostname}:9545`,
blockExplorer: null, //does not exist on local
},
L2: {
name: "Local L2",
Expand Down