mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
Merge branch 'codex/feature/spam-blocker-challenge'
# Conflicts: # package.json # src/components/settings-modal/advanced-settings/__tests__/advanced-settings.test.tsx # src/components/settings-modal/advanced-settings/advanced-settings.tsx # src/stores/__tests__/publish-stores.test.ts # yarn.lock
This commit is contained in:
+12
-12
@@ -9,11 +9,11 @@ const act = (React as { act?: (cb: () => void | Promise<void>) => void | Promise
|
||||
const testState = vi.hoisted(() => ({
|
||||
account: {
|
||||
mediaIpfsGatewayUrl: 'https://media.old.example',
|
||||
chainProviders: {
|
||||
eth: { chainId: 1, urls: ['https://eth.old.example'] },
|
||||
sol: { chainId: 101, urls: ['https://sol.old.example'] },
|
||||
},
|
||||
pkcOptions: {
|
||||
chainProviders: {
|
||||
eth: { chainId: 1, urls: ['https://eth.old.example'] },
|
||||
sol: { chainId: 101, urls: ['https://sol.old.example'] },
|
||||
},
|
||||
httpRoutersOptions: ['https://router.old.example'],
|
||||
ipfsGatewayUrls: ['https://ipfs.old.example'],
|
||||
pkcRpcClientsOptions: ['ws://old.example/key'],
|
||||
@@ -86,11 +86,11 @@ describe('AdvancedSettings', () => {
|
||||
vi.clearAllMocks();
|
||||
testState.account = {
|
||||
mediaIpfsGatewayUrl: 'https://media.old.example',
|
||||
chainProviders: {
|
||||
eth: { chainId: 1, urls: ['https://eth.old.example'] },
|
||||
sol: { chainId: 101, urls: ['https://sol.old.example'] },
|
||||
},
|
||||
pkcOptions: {
|
||||
chainProviders: {
|
||||
eth: { chainId: 1, urls: ['https://eth.old.example'] },
|
||||
sol: { chainId: 101, urls: ['https://sol.old.example'] },
|
||||
},
|
||||
httpRoutersOptions: ['https://router.old.example'],
|
||||
ipfsGatewayUrls: ['https://ipfs.old.example'],
|
||||
pkcRpcClientsOptions: ['ws://old.example/key'],
|
||||
@@ -154,11 +154,11 @@ describe('AdvancedSettings', () => {
|
||||
|
||||
expect(testState.setAccountMock).toHaveBeenCalledWith({
|
||||
mediaIpfsGatewayUrl: 'https://media.new.example',
|
||||
chainProviders: {
|
||||
eth: { chainId: 1, urls: ['https://eth.one.example'] },
|
||||
sol: { chainId: 101, urls: ['https://sol.one.example'] },
|
||||
},
|
||||
pkcOptions: {
|
||||
chainProviders: {
|
||||
eth: { chainId: 1, urls: ['https://eth.one.example'] },
|
||||
sol: { chainId: 101, urls: ['https://sol.one.example'] },
|
||||
},
|
||||
dataPath: '/tmp/next-plebbit',
|
||||
httpRoutersOptions: ['https://router.one.example'],
|
||||
ipfsGatewayUrls: ['https://ipfs.one.example', 'https://ipfs.two.example'],
|
||||
|
||||
@@ -237,7 +237,7 @@ const AdvancedSettings = () => {
|
||||
|
||||
const mediaIpfsGatewayUrl = mediaIpfsGatewayUrlRef.current?.value.trim();
|
||||
|
||||
const pubsubHttpClientsOptions = pubsubProvidersRef.current?.value
|
||||
const pubsubKuboRpcClientsOptions = pubsubProvidersRef.current?.value
|
||||
.split('\n')
|
||||
.map((url) => url.trim())
|
||||
.filter((url) => url !== '');
|
||||
@@ -272,11 +272,11 @@ const AdvancedSettings = () => {
|
||||
await setAccount({
|
||||
...account,
|
||||
mediaIpfsGatewayUrl,
|
||||
chainProviders,
|
||||
pkcOptions: {
|
||||
...protocolOptions,
|
||||
ipfsGatewayUrls,
|
||||
pubsubKuboRpcClientsOptions: pubsubHttpClientsOptions,
|
||||
chainProviders,
|
||||
pubsubKuboRpcClientsOptions,
|
||||
httpRoutersOptions,
|
||||
pkcRpcClientsOptions,
|
||||
dataPath,
|
||||
|
||||
Reference in New Issue
Block a user