Skip to content

Commit

Permalink
Merge branch 'main' into feat/referral-program
Browse files Browse the repository at this point in the history
  • Loading branch information
travis authored Nov 26, 2024
2 parents e1bc9f6 + 5af26ab commit 8a10563
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 13 deletions.
1 change: 1 addition & 0 deletions .env.tpl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# set these to your upload API service URL and the DID your service is using as its service DID
NEXT_PUBLIC_W3UP_SERVICE_URL=https://staging.up.web3.storage
NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://staging.up.web3.storage/receipt/
NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:staging.web3.storage
NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy-storacha.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
# add vars configuring console frontend to use staging w3up as backend
echo "NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:staging.web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://staging.up.storacha.network" >> .env
echo "NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://staging.up.storacha.network/receipt/" >> .env
echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage" >> .env
echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1NzhdvF6A5ufQX5vKNZuRhie" >> .env
echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51LO87hF6A5ufQX5viNsPTbuErzfavdrEFoBuaJJPfoIhzQXdOUdefwL70YewaXA32ZrSRbK4U4fqebC7SVtyeNcz00qmgNgueC" >> .env
Expand Down Expand Up @@ -130,6 +131,7 @@ jobs:
# add vars configuring console frontend to use staging w3up as backend
echo "NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://up.storacha.network" >> .env
echo "NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://up.storacha.network/receipt/" >> .env
echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:web3.storage" >> .env
echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCJ1qF6A5ufQX5vM5DWg4rA" >> .env
echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_51LO87hF6A5ufQX5vQTO5BHyz8y9ybJp4kg1GsBjYuqwluuwtQTkbeZzkoQweFQDlv7JaGjuIdUWAyuwXp3tmCfsM005lJK9aS8" >> .env
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
# add vars configuring console frontend to use staging w3up as backend
echo "NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:staging.web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://staging.up.web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://staging.up.web3.storage/receipt/" >> .env
echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:staging.web3.storage" >> .env
echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1NzhdvF6A5ufQX5vKNZuRhie" >> .env
echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_51LO87hF6A5ufQX5viNsPTbuErzfavdrEFoBuaJJPfoIhzQXdOUdefwL70YewaXA32ZrSRbK4U4fqebC7SVtyeNcz00qmgNgueC" >> .env
Expand Down Expand Up @@ -125,6 +126,7 @@ jobs:
# add vars configuring console frontend to use staging w3up as backend
echo "NEXT_PUBLIC_W3UP_SERVICE_DID=did:web:web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_SERVICE_URL=https://up.web3.storage" >> .env
echo "NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://up.web3.storage/receipt/" >> .env
echo "NEXT_PUBLIC_W3UP_PROVIDER=did:web:web3.storage" >> .env
echo "NEXT_PUBLIC_STRIPE_PRICING_TABLE_ID=prctbl_1OCJ1qF6A5ufQX5vM5DWg4rA" >> .env
echo "NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_live_51LO87hF6A5ufQX5vQTO5BHyz8y9ybJp4kg1GsBjYuqwluuwtQTkbeZzkoQweFQDlv7JaGjuIdUWAyuwXp3tmCfsM005lJK9aS8" >> .env
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [1.15.2](https://github.com/storacha/console/compare/w3console-v1.15.1...w3console-v1.15.2) (2024-11-25)


### Bug Fixes

* add missing receiptsEndpoint to W3UIProvider ([#144](https://github.com/storacha/console/issues/144)) ([eaa7e50](https://github.com/storacha/console/commit/eaa7e50386635723751af1fc7cb4cf4ff5cf6abc))

## [1.15.1](https://github.com/storacha/console/compare/w3console-v1.15.0...w3console-v1.15.1) (2024-10-22)


Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ By default, this app connects to `https://up.web3.storage`, and uses `did:web:we
NEXT_PUBLIC_W3UP_SERVICE_URL=https://your.w3up.service
NEXT_PUBLIC_W3UP_SERVICE_DID=did:your-service-did
NEXT_PUBLIC_W3UP_PROVIDER=did:your-provider-did
NEXT_PUBLIC_W3UP_RECEIPTS_URL=https://your.w3up.service/receipt/
```

An example `.env.local` file can be found in `.env.tpl`.
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "w3console",
"version": "1.15.1",
"version": "1.15.2",
"private": true,
"packageManager": "[email protected]+sha256.7a4261e50d9a44d9240baf6c9d6e10089dcf0a79d0007f2a26985a6927324177",
"scripts": {
Expand All @@ -23,7 +23,7 @@
"@ucanto/core": "^10.0.1",
"@ucanto/interface": "^10.0.1",
"@ucanto/transport": "^9.1.1",
"@w3ui/react": "2.5.0",
"@w3ui/react": "2.5.1",
"@web3-storage/access": "^19.0.0",
"@web3-storage/capabilities": "^17.3.0",
"@web3-storage/content-claims": "^3.2.1",
Expand Down
18 changes: 9 additions & 9 deletions pnpm-lock.yaml

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

8 changes: 6 additions & 2 deletions src/components/W3UIProvider.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
'use client'
import { Provider } from '@w3ui/react'
import { serviceConnection, servicePrincipal } from '@/components/services'
import { serviceConnection, servicePrincipal, receiptsURL } from '@/components/services'
import { ReactNode } from 'react'


export default function W3UIProvider ({ children }: { children: ReactNode }) {
return (
<Provider connection={serviceConnection} servicePrincipal={servicePrincipal}>
<Provider
connection={serviceConnection}
servicePrincipal={servicePrincipal}
receiptsEndpoint={receiptsURL}
>
<>{children}</>
</Provider>
)
Expand Down
6 changes: 6 additions & 0 deletions src/components/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ export const serviceURL = new URL(
// 'https://staging.up.web3.storage'
process.env.NEXT_PUBLIC_W3UP_SERVICE_URL ?? 'https://up.web3.storage'
)

export const receiptsURL = new URL(
// 'https://staging.up.web3.storage/receipt/'
process.env.NEXT_PUBLIC_W3UP_RECEIPTS_URL ?? 'https://up.web3.storage/receipt/'
)

export const servicePrincipal = DID.parse(
// 'did:web:staging.web3.storage'
process.env.NEXT_PUBLIC_W3UP_SERVICE_DID ?? 'did:web:web3.storage'
Expand Down

0 comments on commit 8a10563

Please sign in to comment.