mirror of
https://github.com/Qortal/qortal-ui.git
synced 2025-02-11 09:45:52 +00:00
Merge pull request #341 from AlphaX-Qortal/master
Rename IS_USING_GATEWAY to IS_USING_PUBLIC_NODE
This commit is contained in:
commit
1041964df4
@ -1,5 +1,5 @@
|
||||
// IS_USING_GATEWAY
|
||||
export const IS_USING_GATEWAY = 'IS_USING_GATEWAY'
|
||||
// IS_USING_PUBLIC_NODE
|
||||
export const IS_USING_PUBLIC_NODE = 'IS_USING_PUBLIC_NODE'
|
||||
|
||||
// ADMIN_ACTION
|
||||
export const ADMIN_ACTION = 'ADMIN_ACTION'
|
||||
|
@ -6,7 +6,7 @@ import {
|
||||
getPublishesFromAdmins,
|
||||
getGroupAdmins,
|
||||
getPublishesFromAdminsAdminSpace,
|
||||
isRunningGateway,
|
||||
isUsingPublicNode,
|
||||
createBuyOrderTx,
|
||||
requestQueueGetAtAddresses,
|
||||
getUserWalletFunc,
|
||||
@ -313,8 +313,8 @@ class WebBrowser extends LitElement {
|
||||
let data = event.data
|
||||
|
||||
switch (data.action) {
|
||||
case actions.IS_USING_GATEWAY: {
|
||||
const res = await isRunningGateway()
|
||||
case actions.IS_USING_PUBLIC_NODE: {
|
||||
const res = await isUsingPublicNode()
|
||||
return res
|
||||
}
|
||||
|
||||
@ -792,7 +792,7 @@ class WebBrowser extends LitElement {
|
||||
response = JSON.stringify(dataSentBack)
|
||||
break
|
||||
}
|
||||
const isGateway = await isRunningGateway()
|
||||
const isGateway = await isUsingPublicNode()
|
||||
const foreignBlockchain = data.foreignBlockchain
|
||||
const atAddresses = data.crosschainAtInfo.map((order) => order.qortalAtAddress)
|
||||
const atPromises = atAddresses.map((atAddress) =>
|
||||
|
@ -1202,13 +1202,13 @@ export const getPublishesFromAdminsAdminSpace = async (admins, groupId) => {
|
||||
return sortedData[0]
|
||||
}
|
||||
|
||||
export const isRunningGateway = async () => {
|
||||
export const isUsingPublicNode = async () => {
|
||||
let isGateway = true
|
||||
|
||||
const gateways = ['ext-node.qortal.link']
|
||||
const publicNodes = ['ext-node.qortal.link']
|
||||
const nodeInfo = window.parent.reduxStore.getState().app.nodeConfig.knownNodes[window.parent.reduxStore.getState().app.nodeConfig.node]
|
||||
|
||||
if (nodeInfo && (nodeInfo.domain && !gateways.some(gateway => nodeInfo.domain.includes(gateway)))) {
|
||||
if (nodeInfo && (nodeInfo.domain && !publicNodes.some(publicNode => nodeInfo.domain.includes(publicNode)))) {
|
||||
isGateway = false
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user