mirror of
https://github.com/luxfi/wallet.git
synced 2026-10-30 15:13:19 +00:00
Every Lux-family RPC in this repo pointed somewhere that answers 404.
luxd serves exactly one prefix, /v1 (node/server/http/server.go:33), and
the `bc/` segment is required — so both dead shapes were dead twice over:
the eight extension chains used the retired /ext, and the brand files used
a /<network>/ path segment that no host has ever routed.
Env belongs to the hostname, never to a path. api.lux.network/testnet/...
is now api.lux-test.network, and pchainRpc() derives from the brand's
gateway instead of sniffing "testnet" out of it.
Two entries were pointing at the wrong network entirely:
- 36911 is SPC (universe NETWORKS.yaml), not a Hanzo chain, and was
aimed at api.hanzo.ai — which is the Hanzo API, not an RPC gateway:
it answers 200 to a bogus GET and 405 to a JSON-RPC POST.
- 36963 is sovereign on api.hanzo.network, not a chain inside the Lux
gateway.
The bare api.zoo.network/rpc forms 404 as well; Zoo mainnet and testnet
now use their own hosts.
Separately, Zoo shipped chainIdHex 0x30da8 for chain 200200 and 0x30da9
for 200201 — 200104 and 200105. A wallet that disagrees with its own node
about which chain it is on cannot switch networks. Verified against live
eth_chainId: 96369/96368/200200/200201/36963 all match now.
The extension test suite could not run at all: jest.config.js spread two
keys the shared preset never exported, throwing at config load, and the
preset aliased `wallet/*` to each consumer's own rootDir rather than to
pkgs/wallet. Both are fixed here; the suite still stops later inside a
published @l.x/api mock, which is a separate repair.
Co-authored-by: Hanzo Dev <[email protected]>
47 lines
1.6 KiB
JavaScript
47 lines
1.6 KiB
JavaScript
const preset = require('../../config/jest-presets/jest/jest-preset')
|
|
|
|
const fileExtensions = ['eot', 'gif', 'jpeg', 'jpg', 'otf', 'png', 'ttf', 'woff', 'woff2', 'mp4']
|
|
|
|
// The shared preset exports only moduleNameMapper, setupFilesAfterEach,
|
|
// transformIgnorePatterns, clearMocks and globals. Spreading the two keys it
|
|
// does NOT export threw `preset.moduleFileExtensions is not iterable` at config
|
|
// load, so every test in this package was unrunnable. Jest's own defaults are
|
|
// what the preset was assumed to be contributing, so state them here.
|
|
const baseFileExtensions = ['js', 'mjs', 'cjs', 'jsx', 'ts', 'mts', 'cts', 'tsx', 'json', 'node']
|
|
|
|
module.exports = {
|
|
...preset,
|
|
preset: 'jest-expo',
|
|
transform: {
|
|
'^.+\\.(t|j)sx?$': [
|
|
'babel-jest',
|
|
{
|
|
configFile: './src/test/babel.config.js',
|
|
},
|
|
],
|
|
},
|
|
moduleNameMapper: {
|
|
...preset.moduleNameMapper,
|
|
'^react-native$': 'react-native-web',
|
|
},
|
|
moduleFileExtensions: ['web.js', 'web.jsx', 'web.ts', 'web.tsx', ...fileExtensions, ...baseFileExtensions],
|
|
resolver: '<rootDir>/src/test/jest-resolver.js',
|
|
displayName: 'Extension Wallet',
|
|
testMatch: ['<rootDir>/src/**/*.(spec|test).[jt]s?(x)', '<rootDir>/config/**/*.(spec|test).[jt]s?(x)'],
|
|
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/e2e/'],
|
|
collectCoverageFrom: [
|
|
'src/app/**/*.{js,ts,tsx}',
|
|
'src/background/**/*.{js,ts,tsx}',
|
|
'src/contentScript/**/*.{js,ts,tsx}',
|
|
'config/**/*.{js,ts,tsx}',
|
|
'!src/**/*.stories.**',
|
|
'!**/node_modules/**',
|
|
],
|
|
coverageThreshold: {
|
|
global: {
|
|
lines: 0,
|
|
},
|
|
},
|
|
setupFiles: ['../../config/jest-presets/jest/setup.js', './jest-setup.js'],
|
|
}
|