-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: sdk7 renderer restricted actions #5033
Merged
Merged
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3e88353
add proto
pbosio a28c012
wired kernel-renderer rpc services
pbosio 88ad22e
add sceneNumber to openurl method request
pbosio bf6909a
add service implementation script
pbosio 1c37bd5
implement openExternalUrl
pbosio 52886e2
inject rpc context to externalurlprompthud
pbosio 37613d6
add ExternalUrlPromptHUD test
pbosio 9d51b74
add frame count contraint
pbosio c2b415d
add url prompt service test
pbosio e1081a2
wired nft prompt with rpc service
pbosio a635ca0
implement `OpenNftDialog` service method
pbosio 95549a4
set frame input restriction
pbosio 4644092
increase restriction time
pbosio 75ce96e
log exceptions
pbosio 26876f8
apply @kuruk-mm feedback
pbosio dba7fc7
Merge branch 'dev' into feat/sdk7-renderer-restricted-actions
pbosio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
browser-interface/packages/renderer-protocol/services/restrictedActionsService.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { RpcClientPort } from '@dcl/rpc' | ||
import * as codegen from '@dcl/rpc/dist/codegen' | ||
import { RestrictedActionsServiceDefinition } from 'shared/protocol/decentraland/renderer/renderer_services/restricted_actions.gen' | ||
import defaultLogger from 'lib/logger' | ||
|
||
// eslint-disable-next-line @typescript-eslint/ban-types | ||
export function registerRestrictedActionsService<Context extends {}>( | ||
clientPort: RpcClientPort | ||
): codegen.RpcClientModule<RestrictedActionsServiceDefinition, Context> | undefined { | ||
try { | ||
return codegen.loadService<Context, RestrictedActionsServiceDefinition>(clientPort, RestrictedActionsServiceDefinition) | ||
} catch (e) { | ||
defaultLogger.error('EmotesService could not be loaded') | ||
return undefined | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
renderer-protocol/proto/decentraland/renderer/renderer_services/restricted_actions.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
syntax = "proto3"; | ||
package decentraland.renderer.renderer_services; | ||
|
||
message OpenExternalUrlRequest { | ||
string url = 1; | ||
int32 scene_number = 2; | ||
} | ||
|
||
message OpenNftDialogRequest { | ||
string urn = 1; | ||
} | ||
|
||
message SuccessResponse { | ||
bool success = 1; | ||
} | ||
|
||
service RestrictedActionsService { | ||
// OpenExternalUrl prompts the user to open an external link | ||
rpc OpenExternalUrl(OpenExternalUrlRequest) returns (SuccessResponse) {} | ||
|
||
// OpenNftDialog opens an NFT dialog. | ||
rpc OpenNftDialog(OpenNftDialogRequest) returns (SuccessResponse) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we not saying the same thing twice? Maybe renaming to
Response
would be better because it can be a non-successful response. Right?