Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix: allow setting Addresses.Delegates #2253

Merged
merged 2 commits into from
Jul 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
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: 1 addition & 0 deletions src/core/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ const configSchema = s({
config: optional(s({
API: 'object?',
Addresses: optional(s({
Delegates: optional(s(['multiaddr'])),
Swarm: optional(s(['multiaddr'])),
API: 'multiaddr?',
Gateway: 'multiaddr'
Expand Down
4 changes: 4 additions & 0 deletions test/core/config.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ describe('config', () => {
{ config: { Bootstrap: ['/ip4/104.236.176.52/tcp/4001/ipfs/QmSoLnSGccFuZQJzRadHn95W2CrSFmZuTdDWP8HXaHca9z'] } },
{ config: { Bootstrap: [] } },

{ config: { Addresses: { Delegates: ['/dns4/node0.preload.ipfs.io/tcp/443/https'] } } },
{ config: { Addresses: { Delegates: [] } } },
{ config: { Addresses: { Delegates: undefined } } },

{ config: undefined }
]

Expand Down