Skip to content

Commit 90c102a

Browse files
authored
Merge pull request #5552 from decentraland/release/release-20230807
Release 2023 08 07
2 parents b843135 + d1b5b93 commit 90c102a

File tree

493 files changed

+35731
-21707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

493 files changed

+35731
-21707
lines changed

browser-interface/package-lock.json

Lines changed: 42 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

browser-interface/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
"@dcl/hashing": "^1.1.3",
6363
"@dcl/kernel-interface": "^2.0.0-20230512115658.commit-b582e05",
6464
"@dcl/legacy-ecs": "^6.11.11",
65-
"@dcl/protocol": "^1.0.0-5623934099.commit-07e0626",
65+
"@dcl/protocol": "^1.0.0-5752058730.commit-921fc5d",
6666
"@dcl/rpc": "^1.1.1",
67-
"@dcl/scene-runtime": "7.0.6-20230721154039.commit-22b60b9",
67+
"@dcl/scene-runtime": "7.0.6-20230803143954.commit-ad6c961",
6868
"@dcl/schemas": "^7.4.1",
6969
"@dcl/urn-resolver": "^2.2.0",
7070
"@types/mocha": "^10.0.1",

browser-interface/packages/config/index.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ export const commConfigurations = {
110110

111111
export enum ETHEREUM_NETWORK {
112112
MAINNET = 'mainnet',
113-
GOERLI = 'goerli',
114113
SEPOLIA = 'sepolia'
115114
}
116115

@@ -195,18 +194,6 @@ export namespace ethereumConfigurations {
195194
CatalystProxy: assertValue(contractInfo.mainnet.CatalystProxy),
196195
MANAToken: assertValue(contractInfo.mainnet.MANAToken)
197196
}
198-
export const goerli = {
199-
wss: 'wss://rpc.decentraland.org/goerli',
200-
http: 'https://rpc.decentraland.org/goerli',
201-
etherscan: 'https://goerli.etherscan.io',
202-
names: 'https://api.thegraph.com/subgraphs/name/decentraland/marketplace-goerli',
203-
204-
// contracts
205-
LANDProxy: assertValue(contractInfo.goerli.LANDProxy),
206-
EstateProxy: assertValue(contractInfo.goerli.EstateProxy),
207-
CatalystProxy: assertValue(contractInfo.goerli.CatalystProxy || contractInfo.goerli.Catalyst),
208-
MANAToken: assertValue(contractInfo.goerli.MANAToken)
209-
}
210197
export const sepolia = {
211198
wss: 'wss://rpc.decentraland.org/sepolia',
212199
http: 'https://rpc.decentraland.org/sepolia',

browser-interface/packages/entryPoints/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async function hasStoredSession(address: string, networkId: number) {
136136

137137
const profile = await localProfilesRepo.get(
138138
address,
139-
networkId === 1 ? ETHEREUM_NETWORK.MAINNET : networkId === 5 ? ETHEREUM_NETWORK.GOERLI : ETHEREUM_NETWORK.SEPOLIA
139+
networkId === 1 ? ETHEREUM_NETWORK.MAINNET : ETHEREUM_NETWORK.SEPOLIA
140140
)
141141

142142
return { result: !!profile, profile: profile || null } as any

browser-interface/packages/lib/web3/fetchCatalystNodesFromContract.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,12 @@ export async function fetchCatalystNodesFromContract(): Promise<CatalystNode[]>
3737
{ domain: 'https://peer.kyllian.me' },
3838
{ domain: 'https://peer.melonwave.com' }
3939
]
40-
} else if (net === ETHEREUM_NETWORK.GOERLI) {
41-
return [{ domain: 'https://peer.decentraland.zone' }, { domain: 'https://peer-ap1.decentraland.zone' }]
4240
} else if (net === ETHEREUM_NETWORK.SEPOLIA) {
43-
return [{ domain: 'https://peer-ue-2.decentraland.zone' }]
41+
return [
42+
{ domain: 'https://peer.decentraland.zone' },
43+
{ domain: 'https://peer-ap1.decentraland.zone' },
44+
{ domain: 'https://peer-ue-2.decentraland.zone' }
45+
]
4446
}
4547
}
4648

browser-interface/packages/lib/web3/getEthereumNetworkFromProvider.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { requestManager } from './provider'
44
export async function getEthereumNetworkFromProvider(): Promise<ETHEREUM_NETWORK> {
55
const web3Network = await requestManager.net_version()
66
const chainId = parseInt(web3Network, 10)
7-
const web3net =
8-
chainId === 1 ? ETHEREUM_NETWORK.MAINNET : chainId === 5 ? ETHEREUM_NETWORK.GOERLI : ETHEREUM_NETWORK.SEPOLIA
7+
const web3net = chainId === 1 ? ETHEREUM_NETWORK.MAINNET : ETHEREUM_NETWORK.SEPOLIA
98
return web3net
109
}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import type { RpcServerPort } from '@dcl/rpc'
2+
import * as codegen from '@dcl/rpc/dist/codegen'
3+
import type { PortContext } from './context'
4+
import { VideoTracksActiveStreamsRequest, VideoTracksActiveStreamsData, CommsApiServiceDefinition } from 'shared/protocol/decentraland/kernel/apis/comms_api.gen'
5+
import { isWorldLoaderActive } from 'shared/realm/selectors'
6+
import { store } from 'shared/store/isolatedStore'
7+
import { getLivekitActiveVideoStreams } from 'shared/comms/selectors'
8+
import { ensureRealmAdapter } from 'shared/realm/ensureRealmAdapter'
9+
import { ActiveVideoStreams } from 'shared/comms/adapters/types'
10+
11+
export function registerCommsApiServiceServerImplementation(port: RpcServerPort<PortContext>) {
12+
codegen.registerService(port, CommsApiServiceDefinition, async () => ({
13+
async getActiveVideoStreams(req: VideoTracksActiveStreamsRequest, ctx: PortContext) {
14+
15+
const realmAdapter = await ensureRealmAdapter()
16+
const isWorld = isWorldLoaderActive(realmAdapter)
17+
if (!isWorld){
18+
ctx.logger.error('API only available for Worlds')
19+
return { streams: [] }
20+
}
21+
22+
// TODO: scene permissions?
23+
const activeVideoStreams: Map<string, ActiveVideoStreams> | undefined = getLivekitActiveVideoStreams(store.getState())
24+
25+
if (!activeVideoStreams)
26+
return { streams: [] }
27+
28+
let streams: VideoTracksActiveStreamsData[] = []
29+
30+
for (let [sid, videoStreamData] of activeVideoStreams) {
31+
if (videoStreamData.videoTracks.size > 0) {
32+
for (let [videoSid, _] of videoStreamData.videoTracks) {
33+
streams.push({
34+
identity: videoStreamData.identity,
35+
trackSid: `livekit-video://${sid}/${videoSid}`
36+
})
37+
}
38+
}
39+
}
40+
41+
return { streams }
42+
}
43+
})
44+
)
45+
}

browser-interface/packages/shared/apis/host/RestrictedActions.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ export function registerRestrictedActionsServiceServerImplementation(port: RpcSe
153153
},
154154
async openExternalUrl(req: OpenExternalUrlRequest, ctx: PortContext) {
155155
if (!ctx.sdk7) throw new Error('API only available for SDK7')
156+
if (ctx.sceneData.isPortableExperience){
157+
assertHasPermission(PermissionItem.PI_OPEN_EXTERNAL_LINK, ctx)
158+
}
156159
if (!isPositionValid(lastPlayerPosition, ctx)) {
157160
ctx.logger.error('Error: Player is not inside of scene', lastPlayerPosition)
158161
return { success: false }
@@ -170,7 +173,7 @@ export function registerRestrictedActionsServiceServerImplementation(port: RpcSe
170173
return { success: false }
171174
}
172175

173-
const response = await getRendererModules(store.getState())?.restrictedActions?.openNftDialog({ urn: req.urn })
176+
const response = await getRendererModules(store.getState())?.restrictedActions?.openNftDialog({ urn: req.urn, sceneNumber: ctx.sceneData.sceneNumber })
174177
return { success: response?.success ?? false }
175178
},
176179
async setCommunicationsAdapter(req: CommsAdapterRequest, ctx: PortContext) {
@@ -197,7 +200,7 @@ export function registerRestrictedActionsServiceServerImplementation(port: RpcSe
197200
if (!isPositionValid(lastPlayerPosition, ctx) || !req.worldCoordinates)
198201
ctx.logger.error('Error: Player is not inside of scene', lastPlayerPosition)
199202
else
200-
getRendererModules(store.getState())?.restrictedActions?.teleportTo({ worldCoordinates: req.worldCoordinates })
203+
getRendererModules(store.getState())?.restrictedActions?.teleportTo({ worldCoordinates: req.worldCoordinates, sceneNumber: ctx.sceneData.sceneNumber })
201204

202205
return {}
203206
},

browser-interface/packages/shared/apis/host/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import { registerPlayersServiceServerImplementation } from './Players'
1818
import { registerPortableExperiencesServiceServerImplementation } from './PortableExperiences'
1919
import { registerSignedFetchServiceServerImplementation } from './SignedFetch'
2020
import { registerSceneServiceServerImplementation } from './Scene'
21+
import { registerCommsApiServiceServerImplementation } from './CommsAPI'
2122

2223
export async function registerServices(serverPort: RpcServerPort<PortContext>) {
2324
registerDevToolsServiceServerImplementation(serverPort)
@@ -37,4 +38,5 @@ export async function registerServices(serverPort: RpcServerPort<PortContext>) {
3738
registerPortableExperiencesServiceServerImplementation(serverPort)
3839
registerSignedFetchServiceServerImplementation(serverPort)
3940
registerSceneServiceServerImplementation(serverPort)
41+
registerCommsApiServiceServerImplementation(serverPort)
4042
}

browser-interface/packages/shared/comms/actions.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { action } from 'typesafe-actions'
22
import { RoomConnection } from './interface'
3+
import { LivekitAdapter } from './adapters/LivekitAdapter'
34

45
export const SET_COMMS_ISLAND = '[COMMS] setCommsIsland'
56
export const setCommsIsland = (island: string | undefined) => action(SET_COMMS_ISLAND, { island })
@@ -12,3 +13,7 @@ export type SetRoomConnectionAction = ReturnType<typeof setRoomConnection>
1213
export const HANDLE_ROOM_DISCONNECTION = '[COMMS] handleRoomDisconnection'
1314
export const handleRoomDisconnection = (room: RoomConnection) => action(HANDLE_ROOM_DISCONNECTION, { context: room })
1415
export type HandleRoomDisconnection = ReturnType<typeof handleRoomDisconnection>
16+
17+
export const SET_LIVEKIT_ADAPTER = '[COMMS] setLiveKitAdapter'
18+
export const setLiveKitAdapter = (livekitAdapter: LivekitAdapter | undefined) => action(SET_LIVEKIT_ADAPTER, livekitAdapter)
19+
export type SetLiveKitAdapterAction = ReturnType<typeof setLiveKitAdapter>

0 commit comments

Comments
 (0)