Skip to content

Commit

Permalink
fix: add missing receiptsEndpoint to W3UIProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
BravoNatalie committed Nov 22, 2024
1 parent 3449961 commit ecee4e1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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/receipts'
process.env.NEXT_PUBLIC_W3UP_RECEIPTS_URL ?? 'https://up.web3.storage/receipts'
)

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 ecee4e1

Please sign in to comment.