Skip to content

Commit

Permalink
remove origin from debugging events, cleanup unused events (#510)
Browse files Browse the repository at this point in the history
Co-authored-by: Brian Chitester <[email protected]>
  • Loading branch information
brianchitester and Brian Chitester authored May 9, 2022
1 parent 2367f05 commit 61fe01d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/connection/EventListener.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ export interface EventListener {
}

export const EVENTS = {
REQUEST_CHILD_ETHEREUM_ACCOUNTS_START:
"walletlink_sdk.request_child_ethereum_accounts.start",
REQUEST_CHILD_ETHEREUM_ACCOUNTS_RESPONSE:
"walletlink_sdk.request_child_ethereum_accounts.response",
STARTED_CONNECTING: "walletlink_sdk.started.connecting",
CONNECTED_STATE_CHANGE: "walletlink_sdk.connected",
DISCONNECTED: "walletlink_sdk.disconnected",
Expand Down
7 changes: 0 additions & 7 deletions src/relay/WalletSDKRelay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
const sessionIdHash = this.getSessionIdHash();
this.eventListener?.onEvent(EVENTS.UNLINKED_ERROR_STATE, {
sessionIdHash,
origin: location.origin,
});
}
}
Expand All @@ -177,7 +176,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
this.eventListener?.onEvent(EVENTS.METADATA_DESTROYED, {
alreadyDestroyed,
sessionIdHash: this.getSessionIdHash(),
origin: location.origin,
});
return this.resetAndReload();
}),
Expand Down Expand Up @@ -344,7 +342,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
method: "relay::resetAndReload",
sessionMetadataChange: "__destroyed, 1",
sessionIdHash: this.getSessionIdHash(),
origin: location.origin,
});
this.connection.destroy();
/**
Expand All @@ -362,7 +359,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
this.eventListener?.onEvent(EVENTS.SKIPPED_CLEARING_SESSION, {
sessionIdHash: this.getSessionIdHash(),
storedSessionIdHash: Session.hash(storedSession.id),
origin: location.origin,
});
}
this.ui.reloadUI();
Expand Down Expand Up @@ -608,7 +604,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
sessionIdHash: this.getSessionIdHash(),
storedSessionIdHash: storedSession ? Session.hash(storedSession.id) : "",
isSessionMismatched: (storedSession?.id !== this._session.id).toString(),
origin: location.origin,
});

this.subscriptions.add(
Expand All @@ -624,7 +619,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
isSessionMismatched: (
storedSession?.id !== this._session.id
).toString(),
origin: location.origin,
});
},
error: err => {
Expand Down Expand Up @@ -707,7 +701,6 @@ export class WalletSDKRelay extends WalletSDKRelayAbstract {
eventId: message.id,
method: `relay::${response.method}`,
sessionIdHash: this.getSessionIdHash(),
origin: location.origin,
});
if (isRequestEthereumAccountsResponse(response)) {
WalletSDKRelay.accountRequestCallbackIds.forEach(id =>
Expand Down

0 comments on commit 61fe01d

Please sign in to comment.