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

feat: one time payment #236

Merged
merged 12 commits into from
May 10, 2024
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"test:ci": "pnpm test -- --reporters=default --reporters=github-actions"
},
"dependencies": {
"@interledger/open-payments": "^6.7.0",
"@interledger/open-payments": "^6.10.0",
"@noble/ed25519": "^2.1.0",
"@noble/hashes": "^1.4.0",
"assert": "^2.1.0",
Expand All @@ -32,6 +32,7 @@
"constants-browserify": "^1.0.0",
"crypto-browserify": "^3.12.0",
"events": "^3.3.0",
"framer-motion": "^11.1.9",
"http-message-signatures": "^1.0.4",
"httpbis-digest-headers": "^1.0.0",
"loglevel": "^1.9.1",
Expand Down
122 changes: 75 additions & 47 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 3 additions & 13 deletions src/background/services/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Background {

bindTabHandlers() {
this.browser.tabs.onRemoved.addListener(this.tabEvents.onRemovedTab)
// this.browser.tabs.onUpdated.addListener(this.tabEvents.onUpdatedTab)
this.browser.tabs.onUpdated.addListener(this.tabEvents.onUpdatedTab)
}

bindMessageHandler() {
Expand All @@ -58,11 +58,9 @@ export class Background {
return

case PopupToBackgroundAction.PAY_WEBSITE:
this.logger.debug(
PopupToBackgroundAction.PAY_WEBSITE,
message.payload
return success(
await this.monetizationService.pay(message.payload.amount)
)
throw new Error('Not implemented')

case ContentToBackgroundAction.CHECK_WALLET_ADDRESS_URL:
return success(
Expand Down Expand Up @@ -121,12 +119,4 @@ export class Background {
}
})
}

bindOnTabActivated() {
// this.browser.tabs.onActivated.addListener()
}

bindOnTabUpdated() {
// this.browser.tabs.onUpdated.addListener()
}
}
Loading
Loading