-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Tag listener * Monetization tag * Add stop & resume * Move message handler in contentScript * Add contentScript file changes --------- Co-authored-by: Diana Fulga <diana.fulga@breakointit.eu>
- Loading branch information
1 parent
930c0eb
commit 3f56d12
Showing
15 changed files
with
541 additions
and
600 deletions.
There are no files selected for viewing
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
File renamed without changes.
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,46 @@ | ||
import { | ||
MessageManager, | ||
ContentToBackgroundAction, | ||
ContentToBackgroundActionPayload, | ||
type ContentToBackgroundMessage | ||
} from '@/shared/messages' | ||
import { WalletAddress } from '@interledger/open-payments/dist/types' | ||
import browser from 'webextension-polyfill' | ||
|
||
export const message = new MessageManager<ContentToBackgroundMessage>(browser) | ||
|
||
export const checkWalletAddressUrlCall = async ( | ||
payload: ContentToBackgroundActionPayload[ContentToBackgroundAction.CHECK_WALLET_ADDRESS_URL] | ||
) => { | ||
return await message.send<WalletAddress>({ | ||
action: ContentToBackgroundAction.CHECK_WALLET_ADDRESS_URL, | ||
payload | ||
}) | ||
} | ||
|
||
export const startMonetization = async ( | ||
payload: ContentToBackgroundActionPayload[ContentToBackgroundAction.START_MONETIZATION] | ||
) => { | ||
return await message.send({ | ||
action: ContentToBackgroundAction.START_MONETIZATION, | ||
payload | ||
}) | ||
} | ||
|
||
export const stopMonetization = async ( | ||
payload: ContentToBackgroundActionPayload[ContentToBackgroundAction.STOP_MONETIZATION] | ||
) => { | ||
return await message.send({ | ||
action: ContentToBackgroundAction.STOP_MONETIZATION, | ||
payload | ||
}) | ||
} | ||
|
||
export const resumeMonetization = async ( | ||
payload: ContentToBackgroundActionPayload[ContentToBackgroundAction.RESUME_MONETIZATION] | ||
) => { | ||
return await message.send({ | ||
action: ContentToBackgroundAction.RESUME_MONETIZATION, | ||
payload | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.