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

chore: remove MODAL_LOADED event #3737

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
4 changes: 0 additions & 4 deletions packages/core/src/utils/TypeUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -413,10 +413,6 @@ export type Event =
type: 'track'
event: 'MODAL_CREATED'
}
| {
type: 'track'
event: 'MODAL_LOADED'
}
| {
type: 'track'
event: 'MODAL_OPEN'
Expand Down
2 changes: 0 additions & 2 deletions packages/scaffold-ui/src/modal/w3m-modal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
ApiController,
ChainController,
CoreHelperUtil,
EventsController,
ModalController,
OptionsController,
RouterController,
Expand Down Expand Up @@ -55,7 +54,6 @@ export class W3mModal extends LitElement {
OptionsController.subscribeKey('enableEmbedded', val => (this.enableEmbedded = val))
]
)
EventsController.sendEvent({ type: 'track', event: 'MODAL_LOADED' })
}

public override firstUpdated() {
Expand Down
8 changes: 0 additions & 8 deletions packages/scaffold-ui/test/modal/w3m-modal.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { type CaipNetwork } from '@reown/appkit-common'
import {
ApiController,
ChainController,
EventsController,
ModalController,
OptionsController,
RouterController,
Expand Down Expand Up @@ -204,13 +203,6 @@ describe('W3mModal', () => {
})

describe('Initialization', () => {
it('should send modal loaded event', async () => {
const eventSpy = vi.spyOn(EventsController, 'sendEvent')
await fixture(html`<w3m-modal></w3m-modal>`)

expect(eventSpy).toHaveBeenCalledWith({ type: 'track', event: 'MODAL_LOADED' })
})

it('should prefetch API data', async () => {
const prefetchSpy = vi.spyOn(ApiController, 'prefetch')
await fixture(html`<w3m-modal></w3m-modal>`)
Expand Down
Loading