Viewer testnet error

This commit is contained in:
Mentor Palokaj 2021-10-30 11:26:18 +02:00
parent b5dfc95c4c
commit 2739c38108
2 changed files with 5418 additions and 1144 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 14 MiB

After

Width:  |  Height:  |  Size: 9.3 MiB

View File

@ -13,7 +13,7 @@ export async function callApi( path ) {
testnet: 'https://rocketeer.fans/testnetapi'
}
const querySaysTestnet = window.location.pathname.includes( 'testnet' )
const querySaysTestnet = window.location.href.includes( 'testnet' )
const isLocal = window.location.hostname === 'localhost'
const chain = ( isLocal || querySaysTestnet ) ? 'testnet' : 'mainnet'
const callPath = api[ chain ] + path