Skip to content
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

refactor(sdk): always send RPC requests via network and deeplink #1181

Merged
merged 4 commits into from
Dec 19, 2024
Merged
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,25 @@
});
} else {
try {
// Add to rpc method tracker first then send the event to simulate sending from network.
const rpcMethodTracker = instance.state.remote?.getRPCMethodTracker();
if (rpcMethodTracker) {
const rpcId = data?.data?.id;
if (rpcId) {
rpcMethodTracker[rpcId] = {

Check warning on line 82 in packages/sdk/src/services/RemoteCommunicationPostMessageStream/write.ts

View check run for this annotation

Codecov / codecov/patch

packages/sdk/src/services/RemoteCommunicationPostMessageStream/write.ts#L78-L82

Added lines #L78 - L82 were not covered by tests
id: rpcId,
method: targetMethod,
timestamp: Date.now(),
};
}

logger(

Check warning on line 89 in packages/sdk/src/services/RemoteCommunicationPostMessageStream/write.ts

View check run for this annotation

Codecov / codecov/patch

packages/sdk/src/services/RemoteCommunicationPostMessageStream/write.ts#L89

Added line #L89 was not covered by tests
`[RCPMS: _write()] rpcMethodTracker`,
rpcMethodTracker,
data?.data,

Check warning on line 92 in packages/sdk/src/services/RemoteCommunicationPostMessageStream/write.ts

View check run for this annotation

Codecov / codecov/patch

packages/sdk/src/services/RemoteCommunicationPostMessageStream/write.ts#L92

Added line #L92 was not covered by tests
);
}

// Only send analytics if we are not sending via network.
await SendAnalytics(
{
Expand Down
Loading