Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewkmin committed Jan 22, 2025
1 parent 4a53e17 commit fa1f11c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/iframe-stamper/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,6 @@ export class IframeStamper {
}

onMessageHandler(event: MessageEvent): void {
console.log("full event data", event.data);
console.log("pending requests", this.pendingRequests);

const { type, value, requestId } = event.data || {};

// Handle messages without requestId (like PUBLIC_KEY_READY)
Expand Down Expand Up @@ -279,18 +276,15 @@ export class IframeStamper {
* Generic function to abstract away request creation
* @param type
* @param payload
* @returns
* @returns expected shape <T>
*/
private createRequest<T>(
type: IframeEventType,
payload: any = {}
): Promise<T> {
console.log("creating request");
return new Promise((resolve, reject) => {
const requestId = generateUUID();

console.log("new request id", requestId);

this.pendingRequests.set(requestId, {
resolve,
reject,
Expand Down Expand Up @@ -411,7 +405,6 @@ export class IframeStamper {
* Function to sign a payload with the underlying iframe
*/
async stamp(payload: string): Promise<TStamp> {
console.log("calling stamp");
if (this.iframePublicKey === null) {
throw new Error(
"null iframe public key. Have you called/awaited .init()?"
Expand Down

0 comments on commit fa1f11c

Please sign in to comment.