Skip to content

Commit

Permalink
feat: one time payment (#236)
Browse files Browse the repository at this point in the history
* One time payment progress

* Fix type errors

* feat: OTP Refine UI (#244)

Refine UI

Co-authored-by: Diana Fulga <[email protected]>

* OTP UI Progress

* Update Open Payments SDK (local only)

* One time payment UI

* Update SDK version

* Display error message

* Add error message component

* Remove `webNavigation`

* Fix broken lockfile

---------

Co-authored-by: Diana Fulga <[email protected]>
  • Loading branch information
raducristianpopa and Diana Fulga authored May 10, 2024
1 parent d425163 commit 2aad0ae
Show file tree
Hide file tree
Showing 18 changed files with 452 additions and 150 deletions.
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

0 comments on commit 2aad0ae

Please sign in to comment.