-
Notifications
You must be signed in to change notification settings - Fork 2
Upload fixes #12
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
Open
sirgawain0x
wants to merge
18
commits into
creativeplatform:main
Choose a base branch
from
sirgawain0x:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Upload fixes #12
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
65dc81f
account kit updates
sirgawain0x 3ec4bfe
upload updates
sirgawain0x 090d941
Merge pull request #59 from sirgawain0x/g2/upload-submit
sirgawain0x 6e70bc9
Merge pull request #60 from sirgawain0x/staging
sirgawain0x 75bd5df
lint fix
sirgawain0x ed7640a
Merge pull request #61 from sirgawain0x/g2/upload-submit
sirgawain0x 6ff3369
Merge pull request #62 from sirgawain0x/staging
sirgawain0x 163010c
meta
sirgawain0x fe00cb4
Merge pull request #63 from sirgawain0x/g2/bugfixes
sirgawain0x 51e1acc
Merge pull request #64 from sirgawain0x/staging
sirgawain0x f866735
updates
sirgawain0x 5e1ac36
Merge pull request #65 from sirgawain0x/staging
sirgawain0x 1d9972d
updates
sirgawain0x 0ec041d
remove
sirgawain0x 39b0d2e
update
sirgawain0x 4fa306a
Merge pull request #66 from sirgawain0x/staging
sirgawain0x 14b7ea7
onramp
sirgawain0x f83e7a5
Merge pull request #67 from sirgawain0x/staging
sirgawain0x File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,3 +0,0 @@ | ||
| [submodule "mini-app"] | ||
| path = mini-app | ||
| url = https://sirgawain0x@github.com/creativeplatform/mini-app-tv.git | ||
This file contains hidden or 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,42 @@ | ||
| // app/api/coinbase/session-token/route.ts | ||
| import { NextRequest, NextResponse } from "next/server"; | ||
|
|
||
| export async function POST(req: NextRequest) { | ||
| const { address, assets } = await req.json(); | ||
|
|
||
| if (!address) { | ||
| return NextResponse.json({ error: "Missing address" }, { status: 400 }); | ||
| } | ||
|
|
||
| // Prepare the request body for Coinbase | ||
| const body = { | ||
| addresses: [ | ||
| { | ||
| address, | ||
| blockchains: ["base"], // or more if needed | ||
| }, | ||
| ], | ||
| assets: assets || ["USDC"], | ||
| }; | ||
|
|
||
| // Call Coinbase Session Token API | ||
| const coinbaseRes = await fetch( | ||
| "https://api.developer.coinbase.com/onramp/v1/token", | ||
| { | ||
| method: "POST", | ||
| headers: { | ||
| "Content-Type": "application/json", | ||
| "CDP-API-KEY": process.env.COINBASE_CDP_API_KEY as string, | ||
| }, | ||
| body: JSON.stringify(body), | ||
| } | ||
| ); | ||
|
|
||
| if (!coinbaseRes.ok) { | ||
| const error = await coinbaseRes.text(); | ||
| return NextResponse.json({ error }, { status: 500 }); | ||
| } | ||
|
|
||
| const data = await coinbaseRes.json(); | ||
| return NextResponse.json({ sessionToken: data.sessionToken }); | ||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new error message "Snapshot URL is not defined" is a bit generic. Could we make it more specific by mentioning the actual environment variable name that's missing, similar to the previous message? This can be helpful for debugging.